Tue 26 Apr 2011 03:16:36 PM UTC, comment #2:
Hi Rik,
I tried your suggestion to verify the link step and it seems you are right...
builds/octave-3.4.0> ./run-octave
GNU Octave, version 3.4.0
Copyright (C) 2011 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.
Octave was configured for "x86_64-unknown-linux-gnu".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html
Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type `news'.
error: `lookup' undefined near line 103 column 12
error: called from:
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/set/ismember.m at line 103, column 10
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/miscellaneous/unimplemented.m at line 51, column 5
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/set/unique.m at line 143, column 9
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/optimization/__all_opts__.m at line 56, column 11
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/optimization/PKG_ADD at line 1, column 0
octave:1> dot (1:3, 1:3)
error: `lookup' undefined near line 103 column 12
error: called from:
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/set/ismember.m at line 103, column 10
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/miscellaneous/unimplemented.m at line 51, column 5
octave:1>
So my question becomes why do I receive the error usr/bin/ld: attempted static link of dynamic object, and how do I get around it?
Thanks,
Paida
|
Thu 21 Apr 2011 07:24:15 PM UTC, original submission:
Hello,
I have experienced some problems getting Octave-3.4.0 built on a cray machine running SUSE Linux Enterprise Server 11 (x86_64) on x86_64 architecture. I am using the GNU compiler with XTPE_COMPILE_TARGET=native.gcc (GCC) 4.5.2 20101216 (Cray Inc.)
The configure script runs just fine but I run into a few issues during the make process. I run gmake in parallel, and I run into multiple issues.
./configure --with-hdf5-includedir=/opt/cray/hdf5/1.8.5.0/hdf5-intel/include --with-hdf5-libdir=/opt/cray/hdf5/1.8.5.0/hdf5-intel/lib --enable-static --disable-shared
Note I enable static to get close to getting around problem number 1, I finish the linking by hand
1)
/usr/bin/ld: attempted static link of dynamic object `/opt/fftw/3.2.2.1/lib/libfftw3.so'
collect2: ld returned 1 exit status
gmake[3]: *** [octave] Error 1
gmake[3]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/src'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0'
gmake: *** [all] Error 2
I then rerun gmake in serial vs parallel
gmake[2]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave'
Making all in src
gmake[2]: Entering directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/src'
gmake all-am
gmake[3]: Entering directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/src'
/bin/sh ../libtool --tag=CC --mode=link cc -fPIC -g -O2 -DHAVE_CONFIG_H -Wall -W -Wshadow -Wformat -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -g -O2 -o octave main.o ./liboctinterp.la ../liboctave/liboctave.la ../libcruft/libcruft.la ../libcruft/libranlib.la ../libgnu/libgnu.la -L/opt/cray/hdf5/1.8.5.0/hdf5-intel/lib -lhdf5 -lz -lreadline -lncurses -ldl -L/opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64 -L/opt/cray/portals/2.2.0-1.0301.22039.18.1.ss/lib64 -L/opt/cray/mpt/5.0.1/xt/seastar/mpich2-gnu/lib/44 -L/opt/cray/mpt/5.0.1/xt/seastar/mpich2-gnu/lib -L/opt/cray/mpt/5.0.1/xt/seastar/sma/lib64 -L/opt/xt-libsci/10.4.6/gnu/lib/44 -L/opt/xt-libsci/10.4.6/gnu/lib -L/opt/cray/hdf5/1.8.5.0/hdf5-gnu/lib/44 -L/opt/cray/hdf5/1.8.5.0/hdf5-gnu/lib -L/opt/cray/xt-sysroot/3.1.29.securitypatch.20100707/usr/lib64 -L/opt/cray/xt-sysroot/3.1.29.securitypatch.20100707/lib64 -L/opt/cray/xt-sysroot/3.1.29.securitypatch.20100707/usr/lib/alps -L/usr/lib/alps -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4 -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4/../../.. -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lz -lsci_mc12_mp -lgfortran -lm -lmpichf90 -lmpich -lrt -lsma -lportals -lpmi -lalpslli -lalpsutil -lpthread -lgomp -lgfortranbegin
libtool: link: cc -fPIC -g -O2 -DHAVE_CONFIG_H -Wall -W -Wshadow -Wformat -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -g -O2 -o octave main.o ./.libs/liboctinterp.a /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/.libs/liboctave.a -L/opt/cray/mpt/5.0.1/xt/seastar/mpich2-gnu/lib/44 -L/opt/cray/hdf5/1.8.5.0/hdf5-gnu/lib/44 -L/usr/lib/alps -L/opt/cray/hdf5/1.8.5.0/hdf5-intel/lib ../liboctave/.libs/liboctave.a /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/libcruft/.libs/libcruft.a ../libcruft/.libs/libcruft.a /opt/fftw/3.2.2.1/lib/libfftw3.so /opt/fftw/3.2.2.1/lib/libfftw3f.so /opt/gcc/4.4.4/snos/lib/../lib64/libstdc++.so ../libcruft/.libs/libranlib.a ../libgnu/.libs/libgnu.a -lreadline -lncurses -L/opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64 -L/opt/cray/portals/2.2.0-1.0301.22039.18.1.ss/lib64 -L/opt/cray/mpt/5.0.1/xt/seastar/mpich2-gnu/lib -L/opt/cray/mpt/5.0.1/xt/seastar/sma/lib64 -L/opt/xt-libsci/10.4.6/gnu/lib/44 -L/opt/xt-libsci/10.4.6/gnu/lib -L/opt/cray/hdf5/1.8.5.0/hdf5-gnu/lib -L/opt/cray/xt-sysroot/3.1.29.securitypatch.20100707/usr/lib64 -L/opt/cray/xt-sysroot/3.1.29.securitypatch.20100707/lib64 -L/opt/cray/xt-sysroot/3.1.29.securitypatch.20100707/usr/lib/alps -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4 -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4/../../.. -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lz -lsci_mc12_mp /opt/gcc/4.4.4/snos/lib/../lib64/libgfortran.so -lm -lmpichf90 -lmpich -lsma -lportals /opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64/libpmi.so -ldl -lalpslli -lalpsutil -lpthread /opt/gcc/4.4.4/snos/lib/../lib64/libgomp.so -lrt /opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4/libgfortranbegin.a -pthread -Wl,-rpath -Wl,/opt/fftw/3.2.2.1/lib -Wl,-rpath -Wl,/opt/gcc/4.4.4/snos/lib/../lib64 -Wl,-rpath -Wl,/opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64 -Wl,-rpath -Wl,/opt/fftw/3.2.2.1/lib -Wl,-rpath -Wl,/opt/gcc/4.4.4/snos/lib/../lib64 -Wl,-rpath -Wl,/opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64
/usr/bin/ld: attempted static link of dynamic object `/opt/fftw/3.2.2.1/lib/libfftw3.so'
collect2: ld returned 1 exit status
gmake[3]: *** [octave] Error 1
gmake[3]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/src'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0'
gmake: *** [all] Error 2
To fix I change all .so references to .a as shown below BUT I GET A LOT OF WARNING MESSAGES FROM THE LINKER
cd /autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/src
cc -fPIC -g -O2 -DHAVE_CONFIG_H -Wall -W -Wshadow -Wformat -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -g -O2 -o octave main.o ./.libs/liboctinterp.a /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/.libs/liboctave.a -L/opt/cray/mpt/5.0.1/xt/seastar/mpich2-gnu/lib/44 -L/opt/cray/hdf5/1.8.5.0/hdf5-gnu/lib/44 -L/usr/lib/alps -L/opt/cray/hdf5/1.8.5.0/hdf5-intel/l /builds/octave-3.4.0/libcruft/.libs/libcruft.a ../libcruft/.libs/libcruft.a /opt/fftw/3.2.2.1/lib/libfftw3.a /opt/fftw/3.2.2.1/lib/libfftw3f.a /opt/gcc/4.4.4/snos/lib/../lib64/libstdc++.a ../libcruft/.libs/libranlib.a ../libgnu/.libs/libgnu.a -lreadline -lncurses -L/opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64 -L/opt/cray/portals/2.2.0-1.0301.22039.18.1.ss/lib64 -L/opt/cray/mpt/5.0.1/xt/seastar/mpich2-gnu/lib -L/opt/cray/mpt/5.0.1/xt/seastar/sma/lib64 -L/opt/xt-libsci/10.4.6/gnu/lib/44 -L/opt/xt-libsci/10.4.6/gnu/lib -L/opt/cray/hdf5/1.8.5.0/hdf5-gnu/lib -L/opt/cray/xt-sysroot/3.1.29.securitypatch.20100707/usr/lib64 -L/opt/cray/xt-sysroot/3.1.29.securitypatch.20100707/lib64 -L/opt/cray/xt-sysroot/3.1.29.securitypatch.20100707/usr/lib/alps -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4 -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4/../../.. -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -lz -lsci_mc12_mp /opt/gcc/4.4.4/snos/lib/../lib64/libgfortran.a -lm -lmpichf90 -lmpich -lsma -lportals /opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64/libpmi.a -ldl -lalpslli -lalpsutil -lpthread /opt/gcc/4.4.4/snos/lib/../lib64/libgomp.a -lrt /opt/gcc/4.4.4/snos/lib/gcc/x86_64-suse-linux/4.4.4/libgfortranbegin.a -pthread -Wl,-rpath -Wl,/opt/fftw/3.2.2.1/lib -Wl,-rpath -Wl,/opt/gcc/4.4.4/snos/lib/../lib64 -Wl,-rpath -Wl,/opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64 -Wl,-rpath -Wl,/opt/fftw/3.2.2.1/lib -Wl,-rpath -Wl,/opt/gcc/4.4.4/snos/lib/../lib64 -Wl,-rpath -Wl,/opt/cray/pmi/1.0-1.0000.7901.22.1.ss/lib64
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/.libs/liboctave.a(liboctave_la-oct-shlib.o): In function `octave_dlopen_shlib':
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/oct-shlib.cc:196: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/.libs/liboctave.a(liboctave_la-file-ops.o): In function `octave_tempnam(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/file-ops.cc:659: warning: the use of `tempnam' is dangerous, better use `mkstemp'
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/.libs/liboctave.a(liboctave_la-oct-passwd.o): In function `octave_passwd::getpwent(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/oct-passwd.cc:114: warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/.libs/liboctave.a(liboctave_la-oct-passwd.o): In function `octave_passwd::getpwnam(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/oct-passwd.cc:152: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/.libs/liboctave.a(liboctave_la-oct-passwd.o): In function `octave_passwd::getpwuid(unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/oct-passwd.cc:133: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/.libs/liboctave.a(liboctave_la-oct-passwd.o): In function `octave_passwd::setpwent(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/oct-passwd.cc:171: warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/.libs/liboctave.a(liboctave_la-oct-passwd.o): In function `octave_passwd::endpwent(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/oct-passwd.cc:191: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/liboctave/.libs/liboctave.a(glob.o): In function `rpl_glob':
/ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/libgnu/glob.c:752: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
cd ../
gmake -j 16 to continue the parallel build process
2)
gmake[4]: Entering directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/doc/interpreter'
gmake[4]: `munge-texi' is up to date.
gmake[4]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/doc/interpreter'
./munge-texi ../.. ../../scripts/DOCSTRINGS ../../src/DOCSTRINGS < tips.txi > tips.texi-t
mv tips.texi-t tips.texi
gmake[4]: Entering directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/doc/interpreter'
gmake[4]: `munge-texi' is up to date.
gmake[4]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/doc/interpreter'
./munge-texi ../.. ../../scripts/DOCSTRINGS ../../src/DOCSTRINGS < var.txi > var.texi-t
mv var.texi-t var.texi
restore=: && backupdir=".am$$" && \
am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \
rm -rf $backupdir && mkdir $backupdir && \
if (/bin/sh /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/build-aux/missing --run makeinfo --version) >/dev/null 2>&1; then \
for f in octave.info octave.info-[0-9] octave.info-[0-9][0-9] octave.i[0-9] octave.i[0-9][0-9]; do \
if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
done; \
else :; fi && \
cd "$am__cwd"; \
if /bin/sh /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/build-aux/missing --run makeinfo -I . \
-o octave.info octave.texi; \
then \
rc=0; \
CDPATH="${ZSH_VERSION+.}:" && cd .; \
else \
rc=$?; \
CDPATH="${ZSH_VERSION+.}:" && cd . && \
$restore $backupdir/* `echo "./octave.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
../../run-octave -f -q -H ./mk_doc_cache.m doc-cache ../../scripts/DOCSTRINGS ../../src/DOCSTRINGS || { rm -f doc-cache; exit 1; }
error: `lookup' undefined near line 103 column 12
error: called from:
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/set/ismember.m at line 103, column 10
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/miscellaneous/unimplemented.m at line 51, column 5
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/set/unique.m at line 143, column 9
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/optimization/__all_opts__.m at line 56, column 11
error: /ncrc/home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/scripts/optimization/PKG_ADD at line 1, column 0
gmake[3]: *** [doc-cache] Error 1
gmake[3]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/doc/interpreter'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0/doc'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/autofs/na2_home2/Paidemwoyo.Munhutu/builds/octave-3.4.0'
gmake: *** [all] Error 2
It seems as though an octave executable is put together that can be run by using the run_octave script but it gives errors related to the lookup functionality. It seems that in your release notes this function was rewritten for performance and I noticed that in previous releases it was an .m file but now is a .cc file. I am currently stuck here and would appreciate some guidance.
Please note I have tried several compilers with this, intel, pgi, cray and pathscale but I have concluded that gnu gets me the furthest in the build process.
Please let me know if my link step has broken octave or if this is indeed a bug.
Regards,
Paida
|