Opened 9 years ago

Closed 8 years ago

#49633 closed defect (fixed)

octave-3.8.2 build failure because of symbol(s) not found for architecture x86_64

Reported by: nico.mack@… Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: octave

Description

octave version 3.8.2 fails to build against libc++ runtime on OSX10.8.5 with XCode 5.1.1 installed. Macports was previously cleaned

sudo port clean --all all
sudo port uninstall installed
sudo port selfupdate
sudo port install octave

Attachments (2)

octave.log (10.0 MB) - added by nico.mack@… 9 years ago.
macports.conf (5.2 KB) - added by nico.mack@… 9 years ago.

Change History (10)

Changed 9 years ago by nico.mack@…

Attachment: octave.log added

comment:1 Changed 9 years ago by mf2k (Frank Schima)

Cc: michaelld@… openmaintainer@… removed
Owner: changed from macports-tickets@… to michaelld@…
Port: octave added

In the future, please fill in the Port field and do not Cc openmaintainer@… because it is not a valid email address.

comment:2 Changed 9 years ago by michaelld (Michael Dickens)

There is a very strange mix of missing symbols, some of which are "std::FOO::" and some of which are "std::__1::FOO::". The latter are used exclusively by libc++, while the former are used exclusively by libstdc++. Thus, it seems like no matter the best of intentions on your end to try to force using libc++, that 'port' is making use of both of these C++ runtimes. It's not clear to me if this is happening just within the octave build, or maybe if this comes from some dependency/ies. Octave builds fine on 10.9+ using libc++, so I don't see why it wouldn't do the same on 10.8 when tweaked to use libc++. That said, if you haven't done the "official" tweak for 10.8 and prior to use libc++ then I suggest you uninstall everything (again), do the tweak, then try installing octave again. I'm really not sure I can help much more here, at least not with more info on your 'port' setup.

Changed 9 years ago by nico.mack@…

Attachment: macports.conf added

comment:3 Changed 9 years ago by nico.mack@…

Prior to installing octave from scratch, I did modify my macports config file (see attachment) by adding the following items

cxx_stdlib         libc++
buildfromsource    always
delete_la_files    yes

I assume that's what you mean by "official" tweak for 10.8, right?

comment:4 Changed 9 years ago by michaelld (Michael Dickens)

Yes, I was going for the instructions here. Which is what it looks like you did given the "uninstall installed" and such from the top.

Looking through the logfile again, the 2 interesting things I see are: (1) this is the first linking of a dynamic library; all the other linking are for static libraries. (2) -stdlib=FOO is not passed through libtool into the actual command. Thus, can you try the following & see if it works:

cd $(port work octave)/octave*/liboctave
/usr/bin/clang++ -dynamiclib  -stdlib=libc++ -o .libs/liboctave.2.dylib   -Wl,-force_load,array/.libs/libarray.a -Wl,-force_load,cruft/.libs/libcruft.a -Wl,-force_load,cruft/ranlib/.libs/libranlib.a -Wl,-force_load,numeric/.libs/libnumeric.a -Wl,-force_load,operators/.libs/liboperators.a -Wl,-force_load,system/.libs/libsystem.a -Wl,-force_load,util/.libs/libutil.a -Wl,-force_load,../libgnu/.libs/libgnu.a  -lcurl -lcholmod -lumfpack -lSuiteSparse -lamd -lcamd -lcolamd -lccolamd -lcxsparse -larpack -lqrupdate -lfftw3_threads -lfftw3 -lfftw3f_threads -lfftw3f -llapack -lcblas -lf77blas -latlas -lreadline -lncurses -L/opt/local/lib -lpcre -ldl -L/opt/local/lib/gcc5/gcc/x86_64-apple-darwin12/5.2.0 -L/opt/local/lib/gcc5/gcc/x86_64-apple-darwin12/5.2.0/../../.. -lgfortran -lquadmath -lm  -Os -arch x86_64 -pthread   -pthread -install_name  /opt/local/lib/octave/3.8.2/liboctave.2.dylib -compatibility_version 3 -current_version 3.0 -Wl,-single_module

The above is just the same link command, but with "-stdlib=libc++" added in. Not sure if this will make a difference, but it's worth a try. If it does work, then that says the issue is in how libtool passes -stdlib, which is not a big surprise given that libtool is not written with OS X / Clang in mind.

comment:5 in reply to:  4 Changed 9 years ago by nico.mack@…

Replying to michaelld@…:

Yes, I was going for the instructions here. Which is what it looks like you did given the "uninstall installed" and such from the top.

Looking through the logfile again, the 2 interesting things I see are: (1) this is the first linking of a dynamic library; all the other linking are for static libraries. (2) -stdlib=FOO is not passed through libtool into the actual command. Thus, can you try the following & see if it works:

cd $(port work octave)/octave*/liboctave
/usr/bin/clang++ -dynamiclib  -stdlib=libc++ -o .libs/liboctave.2.dylib   -Wl,-force_load,array/.libs/libarray.a -Wl,-force_load,cruft/.libs/libcruft.a -Wl,-force_load,cruft/ranlib/.libs/libranlib.a -Wl,-force_load,numeric/.libs/libnumeric.a -Wl,-force_load,operators/.libs/liboperators.a -Wl,-force_load,system/.libs/libsystem.a -Wl,-force_load,util/.libs/libutil.a -Wl,-force_load,../libgnu/.libs/libgnu.a  -lcurl -lcholmod -lumfpack -lSuiteSparse -lamd -lcamd -lcolamd -lccolamd -lcxsparse -larpack -lqrupdate -lfftw3_threads -lfftw3 -lfftw3f_threads -lfftw3f -llapack -lcblas -lf77blas -latlas -lreadline -lncurses -L/opt/local/lib -lpcre -ldl -L/opt/local/lib/gcc5/gcc/x86_64-apple-darwin12/5.2.0 -L/opt/local/lib/gcc5/gcc/x86_64-apple-darwin12/5.2.0/../../.. -lgfortran -lquadmath -lm  -Os -arch x86_64 -pthread   -pthread -install_name  /opt/local/lib/octave/3.8.2/liboctave.2.dylib -compatibility_version 3 -current_version 3.0 -Wl,-single_module

The above is just the same link command, but with "-stdlib=libc++" added in. Not sure if this will make a difference, but it's worth a try. If it does work, then that says the issue is in how libtool passes -stdlib, which is not a big surprise given that libtool is not written with OS X / Clang in mind.

Hi Michael, I tried the link command and it appears to work fine. When I look into the .lib folder I see the liboctave.2.dylib library (20210164 bytes)

comment:6 Changed 9 years ago by michaelld (Michael Dickens)

OK; interesting. I looked more into libtool & it can pass the -stdlib flag, but for some reason it isn't for this specific case. Not sure when I'll be able to debug further, but I'm pretty sure we've found the issue. So, one option you have is to continue issuing "sudo port install octave", let it crash, track down the actual issued command and insert the -stdlib into it & then issue the new command by hand on the commandline; repeat.

comment:7 Changed 8 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Owner: changed from michaelld@… to mcalhoun@…
Status: newassigned

Octave has undergone significant changes recently (r148698).
Any chance this issue has been resolved?

comment:8 Changed 8 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: assignedclosed

With no further updates, let us assume this is now fixed.
If not, we can open a ticket specifically for octave 4.

Note: See TracTickets for help on using tickets.