SourceForge has been redesigned. Learn more.
Close

#766 Undefined references prevent building shared libraries

Developer_(v3.11.x)
closed-fixed
5
2014-08-28
2011-07-22
Avi
No

I have successfully built ATLAS 3.9.46 on a Core2, passing the make check and make ptcheck, but when I try to make shared, I get a boatload of "undefined reference" errors. I have attached a compressed copy of the error stream below, but here is an excerpt:

make[4]: Entering directory `/home/ATLAS/C2/lib'
Makefile:13: warning: overriding commands for target `shared_all'
Makefile:6: warning: ignoring old commands for target `shared_all'
Makefile:20: warning: overriding commands for target `shared_all'
Makefile:13: warning: ignoring old commands for target `shared_all'
Makefile:27: warning: overriding commands for target `shared_all'
Makefile:20: warning: ignoring old commands for target `shared_all'
gcc -fPIC -mstackrealign -m32 -shared -o libtatlas.dll -Wl,"rpath-link /usr/local/atlas/lib" \ -Wl,--whole-archive libptlapack.a libptf77blas.a libptcblas.a libatlas.a -Wl,--no-whole-archive -L/usr/lib/gcc/i686-pc-cygwin/4.3.4 -lgfortran -lgcc -lc -lpthread -lkernel32 -lm -lgcc
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find rpath-link /usr/local/atlas/lib: No such file or directory
collect2: ld returned 1 exit status
make[4]: *** [GCCTRY] Error 1
make[4]: Leaving directory `/home/ATLAS/C2/lib'
make[4]: Entering directory `/home/ATLAS/C2/lib'
Makefile:13: warning: overriding commands for target `shared_all'
Makefile:6: warning: ignoring old commands for target `shared_all'
Makefile:20: warning: overriding commands for target `shared_all'
Makefile:13: warning: ignoring old commands for target `shared_all'
Makefile:27: warning: overriding commands for target `shared_all'
Makefile:20: warning: ignoring old commands for target `shared_all'
ld -mi386pe -shared -soname /usr/local/atlas/lib/libtatlas.dll -o libtatlas.dll \ -rpath-link /usr/local/atlas/lib \ --whole-archive libptlapack.a libptf77blas.a libptcblas.a libatlas.a --no-whole-archive -L/usr/lib/gcc/i686-pc-cygwin/4.3.4 -lgfortran -lgcc -lc -lpthread -lkernel32 -lm -lgcc
libatlas.a(ATL_sptgeadd.o):ATL_ptgeadd.c:(.text+0x136): undefined reference to `ATL_thread_init'
libatlas.a(ATL_sptgeadd.o):ATL_ptgeadd.c:(.text+0x184): undefined reference to `ATL_join_tree'
libatlas.a(ATL_sptgeadd.o):ATL_ptgeadd.c:(.text+0x18c): undefined reference to `ATL_free_tree'
libatlas.a(ATL_sptgeadd.o):ATL_ptgeadd.c:(.text+0x198): undefined reference to `ATL_thread_free'
libatlas.a(ATL_sptgeadd.o):ATL_ptgeadd.c:(.text+0x1d5): undefined reference to `ATL_wait_tree'
libatlas.a(ATL_sptgeadd.o):ATL_ptgeadd.c:(.text+0x21f): undefined reference to `ATL_signal_tree'
libatlas.a(ATL_sptgescal.o):ATL_ptgescal.c:(.text+0xee): undefined reference to `ATL_thread_init'
libatlas.a(ATL_sptgescal.o):ATL_ptgescal.c:(.text+0x124): undefined reference to `ATL_join_tree'
libatlas.a(ATL_sptgescal.o):ATL_ptgescal.c:(.text+0x12c): undefined reference to `ATL_free_tree'

...

/usr/lib/libpthread.a(t-d001399.o):(.text+0x2): undefined reference to `_imp__pthread_attr_setdetachstate'
/usr/lib/libpthread.a(t-d001403.o):(.text+0x2): undefined reference to `_imp__pthread_attr_setscope'
/usr/lib/libpthread.a(t-d001417.o):(.text+0x2): undefined reference to `_imp__pthread_create'
/usr/lib/libpthread.a(t-d001391.o):(.text+0x2): undefined reference to `_imp__pthread_attr_destroy'
/usr/lib/libpthread.a(t-d001420.o):(.text+0x2): undefined reference to `_imp__pthread_exit'
/usr/lib/libpthread.a(t-d001425.o):(.text+0x2): undefined reference to `_imp__pthread_join'
/usr/lib/libm.a(t-d001675.o):(.text+0x2): undefined reference to `_imp__sqrt'
make[4]: *** [LDTRY] Error 1
make[4]: Leaving directory `/home/ATLAS/C2/lib'
make[4]: Entering directory `/home/ATLAS/C2/lib'
Makefile:13: warning: overriding commands for target `shared_all'
Makefile:6: warning: ignoring old commands for target `shared_all'
Makefile:20: warning: overriding commands for target `shared_all'
Makefile:13: warning: ignoring old commands for target `shared_all'
Makefile:27: warning: overriding commands for target `shared_all'
Makefile:20: warning: ignoring old commands for target `shared_all'
gcc -fPIC -mstackrealign -m32 -shared -o libtatlas.dll -Wl,"rpath-link /usr/local/atlas/lib" \ -Wl,--whole-archive libptlapack.a libptf77blas.a libptcblas.a libatlas.a -Wl,--no-whole-archive -lpthread -lkernel32 -lm
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find rpath-link /usr/local/atlas/lib: No such file or directory
collect2: ld returned 1 exit status
make[4]: *** [GCCTRY] Error 1
make[4]: Leaving directory `/home/ATLAS/C2/lib'
make[3]: *** [TRYALL] Error 2
make[3]: Leaving directory `/home/ATLAS/C2/lib'
make[2]: *** [tdlls] Error 2
make[2]: Leaving directory `/home/ATLAS/C2/lib'
make[1]: *** [shared_all] Error 2
make[1]: Leaving directory `/home/ATLAS/C2/lib'
make: *** [dylibs] Error 2

Thank you.

Avi

Discussion

  • Avi

    Avi - 2011-07-22

    Compressed error report

     
  • R. Clint Whaley

    R. Clint Whaley - 2011-08-08
    • assigned_to: nobody --> rwhaley
    • status: open --> closed-fixed
     
  • R. Clint Whaley

    R. Clint Whaley - 2011-08-08

    Hi,

    This particular error has been fixed in the newest release (sorry for this late reply, just now saw your question). However, I think dynamic building may be broken on non-Linux OSes at the moment. Can you try the newest release and open up a new error report if you still get errors?

    Thanks,
    Clint

     
  • R. Clint Whaley

    R. Clint Whaley - 2011-08-08

    Hi,

    This particular error has been fixed in the newest release (sorry for this late reply, just now saw your question). However, I think dynamic building may be broken on non-Linux OSes at the moment. Can you try the newest release and open up a new error report if you still get errors?

    Thanks,
    Clint

     

Log in to post a comment.