Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#54067 closed defect (fixed)

upc @5.2.0.1: error: unknown type name 'isl_constraint'

Reported by: caverac Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: upc

Description

Hello!

I've been trying to install UPC on El Capitan and always fails at the same point. Tried cleaning and installing again. Here is the output, and below is the attached log

--->  Computing dependencies for upc
--->  Fetching archive for upc
--->  Attempting to fetch upc-5.2.0.1_1.darwin_15.x86_64.tbz2 from https://packages.macports.org/upc
--->  Attempting to fetch upc-5.2.0.1_1.darwin_15.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/upc
--->  Attempting to fetch upc-5.2.0.1_1.darwin_15.x86_64.tbz2 from http://lil.fr.packages.macports.org/upc
--->  Fetching distfiles for upc
--->  Verifying checksums for upc
--->  Extracting upc
--->  Configuring upc
--->  Building upc
Error: Failed to build upc: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_upc/upc/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port upc failed

Thanks for your help

Attachments (1)

main.log (3.7 MB) - added by caverac 7 years ago.

Change History (17)

Changed 7 years ago by caverac

Attachment: main.log added

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: upc berkeley_upc mpi removed
Owner: set to tenomoto
Status: newassigned
Summary: UPC Buildingupc @5.2.0.1: error: unknown type name 'isl_constraint'

Maybe an incompatibility with the latest isl version 0.18.

Old gcc versions aren't compatible with isl 0.18 either and we had to create a new "isl14" port to provide the old 0.14 version. If you can't find a way to fix upc to work with isl 0.18, that would be an option.

comment:2 Changed 7 years ago by caverac

Thanks for the reply, should I try to upgrade gcc then? Thanks!!

comment:3 Changed 7 years ago by kencu (Ken)

It might be a bit easier than the fixes that had to be done to gcc48 (and the other gccs 47 and 49 to come). I see these options in the gupc configure script <http://gccupc.org/gupc-changes/configure-.html>:

  --with-isl-include=PATH Specify directory for installed isl include files
  --with-isl-lib=PATH     Specify the directory for the installed isl library

and so if you modify the the portfile to require isl14 instead of isl, and directed those PATHs to the isl14 versions with those configure arguments, you might wind up getting an easier fix than usual.

comment:4 Changed 7 years ago by caverac

I am truly sorry for the next question, but am a complete newb with this, should I follow the steps posted here to modify the porfile? Thanks!

Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 7 years ago by kencu (Ken)

Ah - well there is a bit of a learning curve to this, but it's easily within the reach of anyone interested. And the more contributors we have, the better.

The portfile is where all the instructions are. Find it like this port file upc. You can edit it in place with your favourite text editor. I use bbedit.

bbedit `port file upc`

will open it up for you. Then look around a bit, get your bearings, and see if you can make sense of things. The configuration lines are easy enough to find. You can make some changes as above, if you see what makes sense to you to do.

If you really mess up, just sudo port sync and everything will be put back to it's original state.

If you fix it, save your changes somewhere or they will get overwritten next time you upgrade / sync.

There's obviously a lot more to this than what I've written here, but if you have any programming experience at all, this will get you started. The macports website has lots and lots more information.

comment:6 Changed 7 years ago by caverac

Thanks for the detailed reply. I tried this

fgrep -A 2 -B 2 isl `port file upc`

And got

depends_lib         port:gmp port:mpfr port:libiconv port:libmpc \
                    path:lib/pkgconfig/isl.pc:isl \
                    port:ld64 \
                    path:lib/libgcc/libgcc_s.1.dylib:libgcc
--
                    --with-mpfr=${prefix} \
                    --with-mpc=${prefix} \
                    --with-isl=${prefix} \
                    --disable-bootstrap \
                    --disable-multilib \

Then changed in the dependencies to isl14. Actually wasn't sure about this, but also installed the port isl14. Didn't know how to change the path to isl14, because the include and the lib have different paths, but in the portfile, there's only one option --with-isl.

After this, tried to download the upc again and this is what I get

--->  Computing dependencies for upc
--->  Fetching archive for upc
--->  Attempting to fetch upc-5.2.0.1_1.darwin_15.x86_64.tbz2 from https://packages.macports.org/upc
--->  Attempting to fetch upc-5.2.0.1_1.darwin_15.x86_64.tbz2 from http://lil.fr.packages.macports.org/upc
--->  Attempting to fetch upc-5.2.0.1_1.darwin_15.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/upc
--->  Fetching distfiles for upc
--->  Verifying checksums for upc
--->  Extracting upc
--->  Configuring upc
--->  Building upc
Error: Failed to build upc: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_upc/upc/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port upc failed

Same error as before. Should I try something else? Thanks!

comment:7 Changed 7 years ago by kencu (Ken)

You're making progress! -- but you have to change the isl includes and lib to the isl14 ones for this to work, otherwise you just get the same thing as before.

to find a port's installed files, you use port contents, in this case, port contents isl14. Doing that, you'll see that all the isl14 files are filed away under /opt/local/libexec/isl14.

So you could try --with-isl=/opt/local/libexec/isl14, or more generically in the case of other people who might have different macports prefixes, it should be --with-isl=${prefix}/libexec/isl14

that has a reasonable fighting chance of working... good luck!

comment:8 Changed 7 years ago by kencu (Ken)

Yeah - nope. That fails too, sorry to say. But we're on the right path.

Most likely, the upc build is searching for and finding the isl headers in /opt/local/include and so it never looks for and finds the isl14 headers in /opt/local/libexec/isl14/include, and so it's including the wrong isl headers.

So, not as easy. have to do something more to fix that. A good place to check is the gcc48 Portfile, where this has been fixed already.

Perhaps -include the isl14 headers before the usual headers with something like configure.args-preappend (if I recall correctly)...

comment:9 Changed 7 years ago by caverac

Actually was posting this when I got your comment :)

Portfile changed since last build; discarding previous state.
--->  Computing dependencies for upc
--->  Fetching archive for upc
--->  Attempting to fetch upc-5.2.0.1_1.darwin_15.x86_64.tbz2 from https://packages.macports.org/upc
--->  Attempting to fetch upc-5.2.0.1_1.darwin_15.x86_64.tbz2 from http://lil.fr.packages.macports.org/upc
--->  Attempting to fetch upc-5.2.0.1_1.darwin_15.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/upc
--->  Fetching distfiles for upc
--->  Verifying checksums for upc
--->  Extracting upc
--->  Configuring upc
--->  Building upc
Error: Failed to build upc: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_upc/upc/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port upc failed

Problem's still there

comment:10 Changed 7 years ago by kencu (Ken)

Aha -- stealing this little bit from the gcc48 Portfile fix and adding to the upc Portfile as well seems to almost get us there:

post-extract {
    xinstall -d -m 0755 ${build.dir}/gcc
    ln -s ${prefix}/libexec/isl14/include/isl ${build.dir}/gcc
}

All the includes are correct!

just left now with one little linker error:

Wdeprecated]
Undefined symbols for architecture x86_64:
  "_isl_options_set_schedule_fuse", referenced from:
      optimize_isl(scop*) in libbackend.a(graphite-optimize-isl.o)
ld: symbol(s) not found for architecture x86_64

which I bet is the same thing Marcus fixed with this patch file in the gcc48 build:

patchfiles-append   patch-libisl.diff

So we are almost done! But my wife is calling me for dinner...

comment:11 Changed 7 years ago by kencu (Ken)

This is more complicated than most, sorry. To find the patchfile, find the gcc48 Portfile port file gcc48,

/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc48/Portfile

and then go to it's enclosing folder:

cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc48

then there is a folder in there called "files"

cd files

and you can see what Marcus did with that patch

bbedit patch-libisl.diff

and we see that on a number of occasions he forced the build to link against the older isl library by changing the link references to isl.13 directly, instead of just isl.

-    LIBS="${_isl_saved_LIBS} -lisl"
+    LIBS="${_isl_saved_LIBS} -lisl.13"

So most likely, that's what we have to do as well in the upc configure script.

comment:12 Changed 7 years ago by caverac

I am sorry that this is taking so long, really appreciate the time you're putting in this. This is what I did

  1. In the configure file of upc
LIBS="${_isl_saved_LIBS} -lisl.14"
  1. In the Portfile of upc
path:lib/pkgconfig/isl.pc:isl14
(...)
--with-isl=/opt/local/libexec/isl14
(...)
post-extract {
    xinstall -d -m 0755 ${build.dir}/gcc
    ln -s ${prefix}/libexec/isl14/include/isl ${build.dir}/gcc
}
  1. Installed and got the same error.
  1. Went back to see the configure file, but the line I changed in the first step went back to
LIBS="${_isl_saved_LIBS} -lisl"

If this file is build with autoconfig, any change that I make on it, will revert back when I try to install again, doesn't it?

comment:13 Changed 7 years ago by kencu (Ken)

Hey - it worked!

$ port -v installed upc
The following ports are currently installed:
  upc @5.2.0.1_1 (active) platform='darwin 16' archs='x86_64' date='2017-05-02T20:33:32-0700'

In the end, I just did what we said -- changed the isl depends to isl14:

    port:isl14 \

added this to the portfile:

patchfiles-append   patch-libisl.diff
post-extract {
    xinstall -d -m 0755 ${build.dir}/gcc
    ln -s ${prefix}/libexec/isl14/include/isl ${build.dir}/gcc
}

changed the isl bit to this (but perhaps just could have used --with-isl=${prefix}/libexec/isl14):

  --with-isl-include=${prefix}/libexec/isl14 \
  --with-isl-lib=${prefix}/libexec/isl14/lib \

and patched the configure script to change the references from -lisl to -lisl.13 in the patch-libisl.diff patchfile

--- ./configure.orig	2017-05-02 20:25:05.000000000 -0700
+++ ./configure	2017-05-02 20:25:38.000000000 -0700
@@ -6000,7 +6000,7 @@
 $as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
   fi
 
-  isllibs="${isllibs} -lisl"
+  isllibs="${isllibs} -lisl.13"
 
 
 
@@ -6011,7 +6011,7 @@
 
     CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}"
     LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
-    LIBS="${_isl_saved_LIBS} -lisl"
+    LIBS="${_isl_saved_LIBS} -lisl.13"
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible ISL" >&5
 $as_echo_n "checking for compatible ISL... " >&6; }

I'll set up a git pull and see if it gets inhaled for you to do this easily -- but if you're impatient you can just do it as described here if you follow.

Success! Best, K

comment:14 Changed 7 years ago by kencu (Ken)

here you go. The PR is submitted and in place: <https://github.com/macports/macports-ports/pull/460>

now you're just waiting for a kind soul to commit it to the main MacPorts repository.

Best, K

comment:15 Changed 7 years ago by caverac

Great!!! It definitely works. Thanks again for all your help K, really appreciate it

comment:16 Changed 7 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.