Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#39476 closed defect (fixed)

arpack's openmpi variant conflicts with gcc45

Reported by: mkae (Marko Käning) Owned by: mamoll (Mark Moll)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: dstrubbe (David Strubbe), cooljeanius (Eric Gallager), jrhope, david.halpern@…
Port: arpack

Description

How to recover from this:

The following installed ports are outdated:
arpack                         3.1.2_1 < 3.1.3_0         
gconf                          2.28.1_5 < 2.32.4_0       
ImageMagick                    6.8.5-5_0 < 6.8.6-0_0     
poppler                        0.22.4_1 < 0.22.5_0       
py27-pyobjc-cocoa              2.4_0 < 2.5.1_0           
py27-setuptools                0.7.2_0 < 0.7.4_0         
Error: arpack: Variant openmpi conflicts with gcc45
Error: Unable to open port: Error evaluating variants
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

???

Attachments (8)

main.log (51.6 KB) - added by mkae (Marko Käning) 11 years ago.
Full log
config.log (42.0 KB) - added by mkae (Marko Käning) 11 years ago.
arpack's config log
Portfile-arpack.diff4 (964 bytes) - added by dstrubbe (David Strubbe) 11 years ago.
vertreko_01_main.log (82.7 KB) - added by vertreko@… 11 years ago.
Log of broken arpack build 6/22/2013 @ 10:30 am PDT
diff_01_02.txt (16.3 KB) - added by vertreko@… 11 years ago.
diff of log with/without original LDFLAGS ordering
config.2.log (41.8 KB) - added by mkae (Marko Käning) 11 years ago.
config.log
main.2.log (84.5 KB) - added by mkae (Marko Käning) 11 years ago.
latest log after cleaning, applying the patch and increasing revision (i.e. this is the first real build)
config.3.log (9.1 KB) - added by mkae (Marko Käning) 11 years ago.

Download all attachments as: .zip

Change History (78)

comment:1 Changed 11 years ago by cooljeanius (Eric Gallager)

This was introduced in r107140, which was done to fix #39365

Last edited 11 years ago by cooljeanius (Eric Gallager) (previous) (diff)

comment:2 Changed 11 years ago by mamoll (Mark Moll)

This can be fixed like so:

sudo port -f uninstall arpack
sudo port install arpack +openmpi -gcc45

Let me know if that works.

comment:3 Changed 11 years ago by mkae (Marko Käning)

Now that I tried to install arpack from source I can't even download the sources:

:debug:fetch Fetching distfile failed:: The requested URL returned error: 404
:notice:fetch --->  Attempting to fetch arpack-ng-3.1.3.tar.gz from http://forge.scilab.org/index.php/p/arpack-ng/downl
oads/get

Will try in the evening again, perhaps it is only a temporary issue.

Version 0, edited 11 years ago by mkae (Marko Käning) (next)

comment:4 Changed 11 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:5 Changed 11 years ago by mkae (Marko Käning)

Cc: mk@… removed

comment:6 Changed 11 years ago by mkae (Marko Käning)

This is what I got:

:info:configure checking for dummy main to link with Fortran 77 libraries... none
:info:configure checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
:info:configure checking for sgemm_ in -lblas -llapack... yes
:info:configure checking for cheev_... yes
:info:configure checking for MPI mode... checking for mpif77... mpif77
:info:configure checking for MPI_Init... no:info:configure checking for MPI_Init in -lfmpi... no
:info:configure checking for MPI_Init in -lfmpich... no
:info:configure checking for MPI_Init in -lmpif77... no:info:configure checking for MPI_Init in -lmpi... no
:info:configure checking for MPI_Init in -lmpich... no
:info:configure configure: error: could not compile a MPI test program
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_arpack/arpack/work/arpack-ng-3.1.3" && ./configure --prefix=/opt/local home=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_arpack/arpack/work/arpack-ng-3.1.3 FFLAGS='-O2 -m64' --enable-mpi LDFLAGS='/usr/lib/libblas.dylib /usr/lib/liblapack.dylib' --with-blas="-lblas -llapack"
:info:configure Exit code: 1
:error:configure org.macports.configure for port arpack returned: configure failure: command execution failed
:debug:configure Error code: NONE

comment:7 Changed 11 years ago by mamoll (Mark Moll)

I can see this is a little confusing, but you need to install openmpi with one the gccXX variants. So try this:

sudo port deactivate opempi
sudo port install openmpi +gcc47
sudo port install arpack +openmpi -gcc45 -gcc47

comment:8 Changed 11 years ago by mkae (Marko Käning)

When I follow the instructions I get

$ sudo port install openmpi +gcc47
--->  Computing dependencies for openmpi
--->  Activating openmpi @1.7.1_0+gcc47
--->  Cleaning openmpi
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.
$ sudo port install arpack +openmpi -gcc45 -gcc47
--->  Computing dependencies for arpack
--->  Configuring arpack
Error: org.macports.configure for port arpack returned: configure failure: command execution failed
Please see the log file for port arpack for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_arpack/arpack/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port arpack failed

The same thing as in comment:6

Last edited 11 years ago by mkae (Marko Käning) (previous) (diff)

comment:9 Changed 11 years ago by mamoll (Mark Moll)

Can you do this:

sudo port clean arpack
sudo port install arpack +openmpi -gcc45 -gcc47

And copy/paste the output of configure if it still fails?

comment:10 Changed 11 years ago by mkae (Marko Käning)

Here we are:

$ sudo port clean arpack
Password:
--->  Cleaning arpack
$ sudo port install arpack +openmpi -gcc45 -gcc47
--->  Computing dependencies for arpack
--->  Fetching archive for arpack
--->  Attempting to fetch arpack-3.1.3_0+accelerate+openmpi.darwin_10.x86_64.tbz2 from http://lil.fr.packages.macports.org/arpack
--->  Attempting to fetch arpack-3.1.3_0+accelerate+openmpi.darwin_10.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/arpack
--->  Attempting to fetch arpack-3.1.3_0+accelerate+openmpi.darwin_10.x86_64.tbz2 from http://packages.macports.org/arpack
--->  Fetching distfiles for arpack
--->  Verifying checksum(s) for arpack
--->  Extracting arpack
--->  Applying patches to arpack
--->  Configuring arpack
Error: org.macports.configure for port arpack returned: configure failure: command execution failed
Please see the log file for port arpack for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_arpack/arpack/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port arpack failed

Changed 11 years ago by mkae (Marko Käning)

Attachment: main.log added

Full log

comment:11 Changed 11 years ago by mamoll (Mark Moll)

Cc: dstrubbe@… added

comment:12 Changed 11 years ago by dstrubbe (David Strubbe)

This is hard to understand. Can you post config.log (/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_arpack/arpack/work/arpack-ng-3.1.3/config.log)? Also, if you do port installed openmpi what does it show?

Changed 11 years ago by mkae (Marko Käning)

Attachment: config.log added

arpack's config log

comment:13 Changed 11 years ago by mkae (Marko Käning)

$ port installed openmpi
The following ports are currently installed:
  openmpi @1.7.1_0+gcc47 (active)

comment:14 Changed 11 years ago by dstrubbe (David Strubbe)

This is interference from another OpenMPI installation:

configure:16364: checking for mpif77
configure:16380: found /usr/bin/mpif77
configure:16391: result: mpif77
configure:16409: checking for MPI_Init
configure:16416: mpif77 -o conftest -O2 -m64 /usr/lib/libblas.dylib /usr/lib/liblapack.dylib conftest.f  >&5
--------------------------------------------------------------------------
Unfortunately, this installation of Open MPI was not compiled with
Fortran 77 support.  As such, the mpif77 compiler is non-functional.

--------------------------------------------------------------------------

Apparently we have to set MPIF77 explicitly to avoid this. I had thought setting F77 would be enough, but apparently not. Attached patch accomplishes this.

Changed 11 years ago by dstrubbe (David Strubbe)

Attachment: Portfile-arpack.diff4 added

comment:15 Changed 11 years ago by vertreko@…

Hi. I'm having this problem too. I found the Portfile for arpack, patched it, did a 'sudo port clean arpack' followed by 'sudo port install arpack'. I got the errors in vertreko_01_main.log while building the port.

Last edited 11 years ago by vertreko@… (previous) (diff)

Changed 11 years ago by vertreko@…

Attachment: vertreko_01_main.log added

Log of broken arpack build 6/22/2013 @ 10:30 am PDT

comment:16 Changed 11 years ago by dstrubbe (David Strubbe)

This is a totally different issue. You are using OSX 10.6, apparently, and I guess Accelerate in that version just doesn't have one of the needed symbols. What do you get if you do "nm /usr/lib/libblas.dylib | grep lsame" ? Also, I am guessing you have atlas installed, right?

comment:17 in reply to:  16 Changed 11 years ago by vertreko@…

Replying to dstrubbe@…:

This is a totally different issue. You are using OSX 10.6, apparently, and I guess Accelerate in that version just doesn't have one of the needed symbols. What do you get if you do "nm /usr/lib/libblas.dylib | grep lsame" ? Also, I am guessing you have atlas installed, right?

I'm on Snow Leopard 10.6.8. Other answers:

$ nm /usr/lib/libblas.dylib | grep lsame
000000000000a0dd t _lsame_
$ port installed atlas
The following ports are currently installed:
  atlas @3.9.75_0+gcc46
  atlas @3.9.76_0+gcc46
  atlas @3.10.1_2+gcc46
  atlas @3.10.1_5+gcc46 (active)

comment:18 Changed 11 years ago by dstrubbe (David Strubbe)

Well, you do have the symbol. Try this modification:

-    configure.args-append  LDFLAGS='/usr/lib/libblas.dylib /usr/lib/liblapack.dylib' --with-blas="-lblas -llapack"
+    configure.args-append  LDFLAGS='/usr/lib/liblapack.dylib /usr/lib/libblas.dylib' --with-blas="-llapack -lblas"

At any rate, if you are just looking to get some version of arpack installed, probably using +atlas instead will work for you.

comment:19 Changed 11 years ago by vertreko@…

Yeah, given your question re: atlas I started 'sudo port install arpack -accelerate +atlas'. Unfortunately, after it scanned for linker errors it decided it needed to rebuild atlas, and in order to do that, it needed to compile and install gcc46, which it's been working on for the last half hour - LOL! I've gone down the rabbit hole, and have the uncomfortable feeling that it will end with me deleting /opt ...

Last edited 11 years ago by vertreko@… (previous) (diff)

comment:20 in reply to:  19 Changed 11 years ago by vertreko@…

Replying to vertreko@…:

Yeah, given your question re: atlas I started 'sudo port install arpack -accelerate +atlas'. Unfortunately, after it scanned for linker errors it decided it needed to rebuild atlas, and in order to do that, it needed to compile and install gcc46, which it's been working on for the last half hour - LOL! I've gone down the rabbit hole, and have the uncomfortable feeling that it will end with me deleting /opt ...

Fears unfounded. After gcc46 was built things went pretty smoothly. Octave seems to be working with the new arpack+atlas.

comment:21 Changed 11 years ago by dstrubbe (David Strubbe)

Ok, glad to hear that succeeded. Would you mind trying out +accelerate also with the reordered configure.args-append above too, to check whether that fix works?

Last edited 11 years ago by dstrubbe (David Strubbe) (previous) (diff)

comment:22 in reply to:  21 ; Changed 11 years ago by vertreko@…

Replying to dstrubbe@…:

Ok, glad to hear that succeeded. Would you mind trying out +accelerate also with the reordered configure.args-append above too, to check whether that fix works?

Is there a way to build a port variant if you don't want to subsequently tag it as the "active" one? I'm happy to try to build arpack with the change but I don't want to mess up my installation.

comment:23 in reply to:  22 Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to vertreko@…:

Is there a way to build a port variant if you don't want to subsequently tag it as the "active" one? I'm happy to try to build arpack with the change but I don't want to mess up my installation.

Use port destroot instead of port install, to perform all stages except the install and activate phases. You’ll have to manually run port clean afterwards, of course.

comment:24 Changed 11 years ago by vertreko@…

Same error. Diffing the two main.log files shows the different flag ordering, but the linker still died without finding _lsame_. Log diff attached.

Changed 11 years ago by vertreko@…

Attachment: diff_01_02.txt added

diff of log with/without original LDFLAGS ordering

comment:25 Changed 11 years ago by dstrubbe (David Strubbe)

Are you building universal?

comment:26 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicates #39486, #39535.

comment:27 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:28 Changed 11 years ago by jrhope

Cc: jrh@… added

Cc Me!

comment:29 in reply to:  25 ; Changed 11 years ago by mkae (Marko Käning)

Replying to dstrubbe@…:

Are you building universal?

No.

comment:30 in reply to:  29 Changed 11 years ago by dstrubbe (David Strubbe)

What if you deactivate atlas? Would it work then?

comment:31 Changed 11 years ago by mkae (Marko Käning)

Nope, the same error occurs.

comment:32 Changed 11 years ago by dstrubbe (David Strubbe)

Hm, what about going back to the style we had for 3.1.2?

configure.args-append --with-blas="/usr/lib/libblas.dylib" --with-lapack="/usr/lib/liblapack.dylib"

comment:33 Changed 11 years ago by mamoll (Mark Moll)

Fine with me. I don't remember why this was changed.

comment:34 Changed 11 years ago by dstrubbe (David Strubbe)

Sorry, let me be clearer about who my comments are addressed to.

mk: doesn't the patch I attached solve your problem about openmpif77? If not, can you specify what problem you still experience?

vertreko: Would the +accelerate build work if you deactivate atlas? Are you building univeral? Would it work if you subsituted for the configure.args-append line:

configure.args-append --with-blas="/usr/lib/libblas.dylib" --with-lapack="/usr/lib/liblapack.dylib"

mmoll: The version I mention that we had for 3.1.2 doesn't work anymore for 3.1.3 due to apparent bugs in ld and/or libtool. I changed it as a workaround. But it may be that the workaround is not successful on MacOS 10.6.

comment:35 Changed 11 years ago by mf2k (Frank Schima)

Cc: david.halpern@… added

Cc reporter of duplicate #39570.

comment:36 Changed 11 years ago by dstrubbe (David Strubbe)

This ticket is getting confused. There are 3 separate issues reported here. I want to be clear that the first one, that is duplicated in the other tickets that are being funneled into here, namely receiving this message on upgrade

Error: arpack: Variant openmpi conflicts with gcc45

is easily solved, as mentioned above, via

sudo port -f uninstall arpack
sudo port install arpack +openmpi

comment:37 Changed 11 years ago by mkae (Marko Käning)

OK, I am responding to the initial issue.

:debug:configure Using compiler 'Mac OS X gcc 4.2'
:debug:configure Executing proc-pre-org.macports.configure-configure-0
:debug:configure Executing proc-pre-org.macports.configure-configure-1
:debug:configure openmpi is installed with the following variants: +gcc47
:debug:configure   required: gcc43, forbidden:
:debug:configure   rejected, because required variant gcc43 is missing
:debug:configure openmpi is installed with the following variants: +gcc47
:debug:configure   required: gcc44, forbidden:
:debug:configure   rejected, because required variant gcc44 is missing
:debug:configure openmpi is installed with the following variants: +gcc47
:debug:configure   required: gcc45, forbidden:
:debug:configure   rejected, because required variant gcc45 is missing
:debug:configure openmpi is installed with the following variants: +gcc47
:debug:configure   required: gcc46, forbidden:
:debug:configure   rejected, because required variant gcc46 is missing
:debug:configure openmpi is installed with the following variants: +gcc47
:debug:configure   required: gcc47, forbidden:
:debug:configure   accepted
:debug:configure openmpi is installed with the following variants: +gcc47
:debug:configure   required: g95, forbidden:
:debug:configure   rejected, because required variant g95 is missing
:debug:configure Executing org.macports.configure (arpack)

which eventually leads to what I had described in comment:6!

All this happens even if I use the patch Portfile-arpack.diff4!

comment:38 in reply to:  37 Changed 11 years ago by dstrubbe (David Strubbe)

Replying to mk@…:

OK, I am responding to the initial issue.

:debug:configure openmpi is installed with the following variants: +gcc47
:debug:configure   required: gcc47, forbidden:
:debug:configure   accepted

which eventually leads to what I had described in comment:6!

All this happens even if I use the patch Portfile-arpack.diff4!

That all looks fine, and successful to me (since the right one was 'accepted'). That is just checking the various conditions, I don't think those are errors or warnings. If the MPI_Init part failed in configure again, please look for the relevant part in config.log (i.e. what I put up above), or attach the whole thing.

Changed 11 years ago by mkae (Marko Käning)

Attachment: config.2.log added

config.log

comment:39 Changed 11 years ago by mkae (Marko Käning)

I did attach the log file now.

comment:40 in reply to:  39 Changed 11 years ago by dstrubbe (David Strubbe)

Replying to mk@…:

I did attach the log file now.

I'm still not seeing any errors. MPI_Init for openmpif77 was accepted, so the patch solved that problem. Down at the bottom it says: configure: exit 0 So, looks like the configure stage was successful.

comment:41 Changed 11 years ago by mkae (Marko Käning)

I see tons of errors in config.2.log.

85    configure:2866: /opt/local/bin/openmpif77 -V >&5
86	gfortran-mp-4.7: error: unrecognized command line option '-V'
87	gfortran-mp-4.7: fatal error: no input files
88	compilation terminated.
89	configure:2877: $? = 1
90	configure:2866: /opt/local/bin/openmpif77 -qversion >&5
91	gfortran-mp-4.7: error: unrecognized command line option '-qversion'
92	gfortran-mp-4.7: fatal error: no input files
---
277	conftest.c:11:28: error: ac_nonexistent.h: No such file or directory
---
567	ld: library not found for -lfmpi
577	ld: library not found for -lfmpich
587	ld: library not found for -lmpif77

comment:42 Changed 11 years ago by dstrubbe (David Strubbe)

Configure works by trying all kinds of things and seeing which work and which don't. It's only an error if it says it is. Anyway, just look at your main.log to see where (if anywhere) an error occurred.

comment:43 Changed 11 years ago by mkae (Marko Käning)

The error I am seeing is in comment:6.

comment:44 in reply to:  43 Changed 11 years ago by dstrubbe (David Strubbe)

Replying to mk@…:

The error I am seeing is in comment:6.

I'm sorry, that's not possible unless there is a horrible bug in macports. Your config.log says configure exit status was 0. You state that the corresponding main.log has configure exit status was 1. Also, the content you say is in your main.log, a summary of the configure command, is not found in config.log. Please look very carefully at your files. Perhaps your build succeeded and you are looking at the wrong log file.

comment:45 Changed 11 years ago by mkae (Marko Käning)

OK, here is the proof that I didn't screw up:

markos-imac:~ marko$ j arpack
/Users/marko/WC/SVN/MacPorts/math/arpack
markos-imac:arpack marko$ sudo port clean
Password:
--->  Cleaning arpack
markos-imac:arpack marko$ sudo port install arpack +openmpi
--->  Computing dependencies for arpack
--->  Configuring arpack
Error: org.macports.configure for port arpack returned: configure failure: command execution failed
Please see the log file for port arpack for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_arpack/arpack/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port arpack failed
markos-imac:arpack marko$ grep error /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_arpack/arpack/main.log
:info:configure configure: error: could not compile a MPI test program
:error:configure org.macports.configure for port arpack returned: configure failure: command execution failed
markos-imac:arpack marko$ 

comment:46 in reply to:  45 Changed 11 years ago by dstrubbe (David Strubbe)

Replying to mk@…:

OK, here is the proof that I didn't screw up:

Sure, I can believe that is what happened you when tried to install, but the config.log you supplied must not be from that build attempt. Can you also do port clean --all arpack just to be sure? If you really have a failure to compile an MPI test program, I think the most likely reason is you are somehow still using the unpatched Portfile.

comment:47 Changed 11 years ago by mkae (Marko Käning)

I did the clean.

And, as I realize now, you were absolutely right! -> I DID screw up on my end!!! :-(

After increasing the revision in my local port file MacPorts indeed used the local portfile which wasn't the case during all my other tries. :-| My god, I was sure it would be doing it. But I totally forgot was, that this specific MP installation hadn't enabled my local SVN tree in /opt/local/etc/macports/sources.conf.

I'll upload the main.log which still throws an error, but at least a different one.

SORRY, and thanks for your patience with me.

Changed 11 years ago by mkae (Marko Käning)

Attachment: main.2.log added

latest log after cleaning, applying the patch and increasing revision (i.e. this is the first real build)

comment:48 Changed 11 years ago by mkae (Marko Käning)

I see now that I am at comment:17.

So I guess I should try building with gcc46, just like in comment:20...

comment:49 Changed 11 years ago by mkae (Marko Käning)

So, now that I have openmpi installed in its gcc46 variant arpack won't want to install anymore because of that:

markos-imac:arpack marko$ sudo port installed openmpi
The following ports are currently installed:
  openmpi @1.7.2_0+gcc46 (active)
  openmpi @1.7.2_0+gcc47
markos-imac:arpack marko$ sudo port install +openmpi +gcc46 -gcc47 -gcc45
Error: arpack: Variant openmpi conflicts with gcc46
Error: Unable to open port: Error evaluating variants
markos-imac:arpack marko$ 

What am I missing?

comment:50 Changed 11 years ago by mamoll (Mark Moll)

You should install arpack as follows:

sudo port install +openmpi -gcc46 -gcc47 -gcc45

comment:51 Changed 11 years ago by mamoll (Mark Moll)

Perhaps the port should be changed so that *mpi and gcc* do no conflict with each other. The gcc* variants, if selected, can simply be ignored when one of the *mpi variants is selected. This would make for a more complex Portfile but a less confusing user experience.

Last edited 11 years ago by mamoll (Mark Moll) (previous) (diff)

comment:52 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #39614.

comment:53 in reply to:  50 Changed 11 years ago by mkae (Marko Käning)

Replying to mmoll@…:

You should install arpack as follows:

sudo port install +openmpi -gcc46 -gcc47 -gcc45

Now I am coming a bit further:

:info:build libtool: link: /opt/local/bin/openmpif77 -dynamiclib  -o .libs/libarpack.2.dylib   -Wl,-force_load,./SRC/.libs/libarpacksrc.a -Wl,-force_load,./UTIL/.libs/libarpackutil.a  -lblas -llapack  -O2 -m64   -install_name  /opt/local/lib/libarpack.2.dylib -compatibility_version 3 -current_version 3.0 -Wl,-single_module
:info:build Undefined symbols for architecture x86_64:
:info:build   "_lsame_", referenced from:
:info:build       _slanhs_ in liblapack.a(slanhs.o)
:info:build       _slanst_ in liblapack.a(slanst.o)
:info:build       _slasr_ in liblapack.a(slasr.o)
:info:build       _slascl_ in liblapack.a(slascl.o)
:info:build       _slaset_ in liblapack.a(slaset.o)
:info:build       _slarf_ in liblapack.a(slarf.o)
:info:build       _slacpy_ in liblapack.a(slacpy.o)
:info:build       ...

:info:build ld: symbol(s) not found for architecture x86_64
:info:build collect2: ld returned 1 exit status
:info:build make[1]: *** [libarpack.la] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_Users_marko_WC_SVN_MacPorts_math_arpack/arpack/work/arpack-ng-3.1.3'
:info:build make: *** [all-recursive] Error 1
:info:build make: Leaving directory `/opt/local/var/macports/build/_Users_marko_WC_SVN_MacPorts_math_arpack/arpack/work/arpack-ng-3.1.3'
:info:build Command failed:  cd "/opt/local/var/macports/build/_Users_marko_WC_SVN_MacPorts_math_arpack/arpack/work/arpack-ng-3.1.3" && /usr/bin/make -j2 -w all
:info:build Exit code: 2
:error:build org.macports.build for port arpack returned: command execution failed

comment:54 Changed 11 years ago by mamoll (Mark Moll)

I am guessing you have atlas installed. Can you try this:

sudo port clean arpack
sudo port install +openmpi -gcc46 -gcc47 -gcc45 -accelerate +atlas

If that doesn't work, try this:

sudo port clean arpack
sudo port deactivate atlas
sudo port install +openmpi -gcc46 -gcc47 -gcc45 +accelerate -atlas

comment:55 Changed 11 years ago by mkae (Marko Käning)

Yes, I did have atlas installed and your first hint did the trick:

$ port installed atlas
The following ports are currently installed:
  atlas @3.10.1_5+gcc47 (active)
sudo port clean arpack
sudo port install +openmpi -gcc46 -gcc47 -gcc45 -accelerate +atlas

Eventually!!!

Thanks!!!

mmoll, do you think this ticket now can therefore be considered to be closed?

comment:56 in reply to:  55 Changed 11 years ago by dstrubbe (David Strubbe)

Replying to mk@…:

Yes, I did have atlas installed and your first hint did the trick:

mk, What version of OSX are you using? Would you mind trying a couple things about building with +accelerate, to see if that works? (you can use "port destroot" as mentioned above to avoid messing with your successful installation) It sounds like you were seeing the same issue vertreko reported above, which was not resolved.

Would the +accelerate build work if you deactivate atlas?

Would it work if you applied

-    configure.args-append  LDFLAGS='/usr/lib/libblas.dylib /usr/lib/liblapack.dylib' --with-blas="-lblas -llapack"
+    configure.args-append  LDFLAGS='/usr/lib/liblapack.dylib /usr/lib/libblas.dylib' --with-blas="-llapack -lblas"

Would it work if you subsituted for the configure.args-append line:

configure.args-append --with-blas="/usr/lib/libblas.dylib" --with-lapack="/usr/lib/liblapack.dylib"

comment:57 Changed 11 years ago by mkae (Marko Käning)

I am running Snow Leopard here.

If I deactivate atlas before building arpack I can install it successfully as well, i.e. the second suggestions in comment:54 is also a valid workaround!

OK, I haven't made those changes to the Portfile since I wasn't sure for which situation I should test it.

Last edited 11 years ago by mkae (Marko Käning) (previous) (diff)

comment:58 Changed 11 years ago by dstrubbe (David Strubbe)

I wonder if either of the two options I suggested for configure.args-append would make it work if atlas is activated, and you build arpack with +accelerate.

comment:59 Changed 11 years ago by mkae (Marko Käning)

OK, I left atlas installed.

The 1st change in comment:56 does NOT work with

$ sudo port -s install +openmpi -gcc46 -gcc47 -gcc45 +accelerate -atlas

One gets the error shown in comment:53.

The 2nd change suggested by you leads to another error:

:info:configure checking whether make sets $(MAKE)... yes
:info:configure checking whether to enable maintainer-specific portions of Makefiles... no
:info:configure checking whether the Fortran 77 compiler works... no
:info:configure configure: error: in `/opt/local/var/macports/build/_Users_marko_WC_SVN_MacPorts_math_arpack/arpack/work/arpack-ng-3.1.3':
:info:configure configure: error: Fortran 77 compiler cannot create executables
:info:configure See `config.log' for more details
:info:configure Command failed:  cd "/opt/local/var/macports/build/_Users_marko_WC_SVN_MacPorts_math_arpack/arpack/work/arpack-ng-3.1.3" && ./configure --prefix=/opt/local home=/opt/local/var/macports/build/_Users_marko_WC_SVN_MacPorts_math_arpack/arpack/work/arpack-ng-3.1.3 FFLAGS='-O2 -m64' --enable-mpi --with-blas="/usr/lib/libblas.dylib" --with-lapack="/usr/lib/liblapack.dylib"
:info:configure Exit code: 77
:error:configure org.macports.configure for port arpack returned: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
    while executing
"$procedure $targetname"
:info:configure Warning: targets not executed for arpack: org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:configure Please see the log file for port arpack for details:
    /opt/local/var/macports/logs/_Users_marko_WC_SVN_MacPorts_math_arpack/arpack/main.log

comment:60 Changed 11 years ago by dstrubbe (David Strubbe)

Hm, the 2nd one sounds like the Portfile just got broken. Let me be clearer about the change I meant:

-    configure.args-append  LDFLAGS='/usr/lib/libblas.dylib /usr/lib/liblapack.dylib' --with-blas="-lblas -llapack"
+    configure.args-append --with-blas="/usr/lib/libblas.dylib" --with-lapack="/usr/lib/liblapack.dylib"

Is that what you did?

comment:61 Changed 11 years ago by mkae (Marko Käning)

Yep.

$ svn diff Portfile 
Index: Portfile
===================================================================
--- Portfile	(revision 108309)
+++ Portfile	(working copy)
@@ -135,7 +135,9 @@
     # the change of LDFLAGS is required to avoid linking against the ATLAS ones if they are present;
     # if we specify /usr/lib/libblas.dylib directly, the linking fails. http://forge.scilab.org/index.php/p/arpack-ng/issues/1220/
     configure.args-delete  LDFLAGS=''
-    configure.args-append  LDFLAGS='/usr/lib/libblas.dylib /usr/lib/liblapack.dylib' --with-blas="-lblas -llapack"
+#    configure.args-append  LDFLAGS='/usr/lib/libblas.dylib /usr/lib/liblapack.dylib' --with-blas="-lblas -llapack"
+# 	 configure.args-append  LDFLAGS='/usr/lib/liblapack.dylib /usr/lib/libblas.dylib' --with-blas="-llapack -lblas"
+    configure.args-append --with-blas="/usr/lib/libblas.dylib" --with-lapack="/usr/lib/liblapack.dylib"
     patchfiles-append      patch-ARPACK-cdot-and-zdot.diff
     if {[variant_isset openmpi] || [variant_isset mpich]} {
         patchfiles-append patch-PARPACK-cdot-and-zdot.diff

comment:62 Changed 11 years ago by dstrubbe (David Strubbe)

I am mystified as to how this can cause

configure: error: Fortran 77 compiler cannot create executables

Can you post the config.log?

Changed 11 years ago by mkae (Marko Käning)

Attachment: config.3.log added

comment:63 Changed 11 years ago by dstrubbe (David Strubbe)

Oh, I understand. How about removing also the line:

configure.args-delete  LDFLAGS=''

and trying to build?

comment:64 Changed 11 years ago by mkae (Marko Käning)

dstrubbe, with above portfile patch but also excluding the line you suggested I get something unseen so far:

:info:build libtool: link: /opt/local/bin/openmpif77 -dynamiclib  -o .libs/libarpack.2.dylib   -Wl,-force_load,./SRC/.libs/libarpacksrc.a -Wl,-force_load,./UTIL/.libs/libarpackutil.a   -O2 -m64   -install_name  /opt/local/lib/libarpack.2.dylib -compatibility_version 3 -current_version 3.0 -Wl,-single_module
:info:build Undefined symbols for architecture x86_64:
:info:build   "_sgemv_", referenced from:
:info:build       _sgetv0_ in libarpacksrc.a(sgetv0.o)
:info:build       _snaitr_ in libarpacksrc.a(snaitr.o)
:info:build       _snapps_ in libarpacksrc.a(snapps.o)
:info:build       _sneigh_ in libarpacksrc.a(sneigh.o)
:info:build       _ssaitr_ in libarpacksrc.a(ssaitr.o)
:info:build       _ssapps_ in libarpacksrc.a(ssapps.o)
:info:build       _sneupd_ in libarpacksrc.a(sneupd.o)
:info:build       ...
:info:build   "_snrm2_", referenced from:
:info:build       _sgetv0_ in libarpacksrc.a(sgetv0.o)
.
.
.

comment:65 Changed 11 years ago by dstrubbe (David Strubbe)

Yes, this is due to a bug in libtool apparently. You can see it has stripped LAPACK from the link line. This is what motivated my workaround in the Portfile originally.

comment:66 Changed 11 years ago by mkae (Marko Käning)

This issue is not pressing for me, I just try to help solving this. So, let me know what to try next if you have time.

comment:67 Changed 11 years ago by michaelbartz@…

Thanks for all the work on this. I re-read the entire ticket and realized that I was a member of the group that needed to only re-install arpack. I would like to point out that under certain conditions you cannot use the default installation for arpack. My port of octave-devel installed arpack and it required the +atlas rather than the +accelerate variant.

arpack @3.1.3_0+atlas+openmpi (active)

comment:68 Changed 11 years ago by dstrubbe (David Strubbe)

mk, thanks for trying some more options. Seems like the best we can say is: for Snow Leopard, +accelerate will only work if atlas is not active.

comment:69 Changed 11 years ago by mamoll (Mark Moll)

Resolution: fixed
Status: newclosed

The original issue was fixed in r110931.

comment:70 Changed 10 years ago by dstrubbe (David Strubbe)

Cc: dstrubbe@… added; dstrubbe@… removed
Note: See TracTickets for help on using tickets.