Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#749 atlas-3.9.40 undefined symbols with archdef 0

Developer_(v3.11.x)
closed-fixed
5
2011-10-14
2011-05-13
bicatali
No

I am trying to build shared libraries. atlas-3.9.40 has undefined symbols when configured when archdef is set to 0.
ATLAS compiles OK, but creating shared libraries show some symbols have not been included or may be compiled:

$ cd lib
$ gcc -shared -Wl,-soname=libatlas.so -Wl,--whole-archive libatlas.a -Wl,--no-whole-archive -o libatlas.so -lm -lpthread
$ ldd -r libatlas.so

linux-vdso.so.1 => (0x00007fffa29ff000)
libm.so.6 => /lib64/libm.so.6 (0x00007f6be44a8000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6be428a000)
libc.so.6 => /lib64/libc.so.6 (0x00007f6be3efe000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6be4ef2000)
undefined symbol: ATL_thread_free (./libatlas.so)
undefined symbol: ATL_join_tree (./libatlas.so)
undefined symbol: ATL_free_tree (./libatlas.so)
undefined symbol: ATL_wait_tree (./libatlas.so)
undefined symbol: ATL_signal_tree (./libatlas.so)
undefined symbol: ATL_thread_init (./libatlas.so)

The same symbols appear with "make shared" and "ldd -r libsatlas.so".
When ATLAS is not configured with "-Si archdef 0", no undefined symbols show up.
It is on Gentoo Linux and has been reproduced by a few other Gentoo users, but here are some info about my particular installation:

=================================
* full configuration line:
$ ../ATLAS/configure
--prefix=/usr
--libdir=/usr/lib64
--incdir=/usr/include
--cc=gcc
--with-netlib-lapack-tarfile=/usr/portage/distfiles/lapack-3.3.1.tgz
-C ac gcc
-D c -DWALL
-b 64 -C if gfortran
-Si latune 1
-Ss pmake '$(MAKE) -j32'
-F ac '-O2 -march=native -pipe -D_FORTIFY_SOURCE=2'
-F if '-O2 -march=native -pipe -D_FORTIFY_SOURCE=2'
-t -1 -Si cputhrchk 0
-Fa alg -fPIC
-Si archdef 0

$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 1
Core(s) per socket: 4
CPU socket(s): 8
NUMA node(s): 8
Vendor ID: AuthenticAMD
CPU family: 16
Model: 2
Stepping: 3
CPU MHz: 2210.375
BogoMIPS: 4420.55
Virtualization: AMD-V
L1d cache: 64K
L1i cache: 64K
L2 cache: 512K
L3 cache: 2048K
NUMA node0 CPU(s): 0-3
NUMA node1 CPU(s): 4-7
NUMA node2 CPU(s): 8-11
NUMA node3 CPU(s): 12-15
NUMA node4 CPU(s): 16-19
NUMA node5 CPU(s): 20-23
NUMA node6 CPU(s): 24-27
NUMA node7 CPU(s): 28-31

$ gcc -v
Using built-in specs.
Reading specs from /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/asneeded.specs
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.6.0/work/gcc-4.6.0/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.0/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.0 p1.1, pie-0.4.5'
Thread model: posix
gcc version 4.6.0 (Gentoo 4.6.0 p1.1, pie-0.4.5)

Discussion

1 2 > >> (Page 1 of 2)
  • bicatali
    bicatali
    2011-05-13

    Stage1.log.gz

     
    Attachments
  • This tracker is for confirmed ATLAS bugs only. Please follow the directions given here:
    http://math-atlas.sourceforge.net/faq.html#help
    and start all support requests as items on the support tracker. I will escalate the problem to the bug tracker once it is a confirmed ATLAS bug, and I see it isn't duplicative of a known bug.

     
    • assigned_to: nobody --> rwhaley
     
  • Hmm. The missing symbols are all stuff from the old threads implementation written by Antoine, which I have so far kept in the source so I can compare against it. AFAIK, none of the new codes reference it (obviously wrong).

    The fact that the symbols only show up when you don't use the arch defs is a hint that I've got some kernel that includes an old header file, but I've looked and I don't see that anywhere. I'm thinking header file because I've seen that in the past: static linking only cares about what you call, but dynamic wants to find everything you prototype.

    Is there anyway to track down these symbols to a particular routine? Right now, I can't find where they could be coming from, and so far I've not been able to reproduce the problem, and so I need some pointers on where to look.

    Also, just to simplify things, I assume you get the same problem if you use only the configure flags:
    --prefix=/usr --libdir=/usr/lib64 --incdir=/usr/include --shared -Si archdef 0
    ?

    A lot of the flags you are throwing seem unneeded, and they certainly complicate our test case. Try the above with 3.9.41, and post the error file (if it is too big to post, e-mail it to me).

    Like I say, if you can track it down to a routine, I'll have a lot better chance to help . . .

    Thanks,
    Clint

     
    • milestone: --> Developer_(v3.11.x)
    • labels: --> Problems with Shared libs
     
  • thrasibule
    thrasibule
    2011-08-25

    I get the same missing symbols on a 32 bits system with a Pentium P6000 AND using archdefs (archdef set to 1).
    Arch is recognized as Corei132SSE3.

    This is with atlas-3.9.47.

    cat /proc/cpuinfo
    processor : 0
    vendor_id : GenuineIntel
    cpu family : 6
    model : 37
    model name : Intel(R) Pentium(R) CPU P6000 @ 1.87GHz
    stepping : 2
    cpu MHz : 1866.000
    cache size : 3072 KB
    physical id : 0
    siblings : 2
    core id : 0
    cpu cores : 2
    apicid : 0
    initial apicid : 0
    fdiv_bug : no
    hlt_bug : no
    f00f_bug : no
    coma_bug : no
    fpu : yes
    fpu_exception : yes
    cpuid level : 11
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm popcnt lahf_lm arat dts
    bogomips : 3723.91
    clflush size : 64
    cache_alignment : 64
    address sizes : 36 bits physical, 48 bits virtual
    power management:

    processor : 1
    vendor_id : GenuineIntel
    cpu family : 6
    model : 37
    model name : Intel(R) Pentium(R) CPU P6000 @ 1.87GHz
    stepping : 2
    cpu MHz : 1866.000
    cache size : 3072 KB
    physical id : 0
    siblings : 2
    core id : 2
    cpu cores : 2
    apicid : 4
    initial apicid : 4
    fdiv_bug : no
    hlt_bug : no
    f00f_bug : no
    coma_bug : no
    fpu : yes
    fpu_exception : yes
    cpuid level : 11
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm popcnt lahf_lm arat dts
    bogomips : 3723.36
    clflush size : 64
    cache_alignment : 64
    address sizes : 36 bits physical, 48 bits virtual
    power management:

    $gcc -v
    Using built-in specs.
    COLLECT_GCC=/usr/i686-pc-linux-gnu/gcc-bin/4.5.3/gcc
    COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-linux-gnu/4.5.3/lto-wrapper
    Target: i686-pc-linux-gnu
    Configured with: /var/tmp/portage/sys-devel/gcc-4.5.3-r1/work/gcc-4.5.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.5.3 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.5.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.5.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.5.3/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.5.3/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --disable-fixed-point --with-ppl --with-cloog --disable-ppl-version-check --with-cloog-include=/usr/include/cloog-ppl --disable-lto --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.5.3/python --enable-checking=release --enable-java-awt=gtk --with-arch=i686 --enable-languages=c,c++,java,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.3-r1 p1.0, pie-0.4.5'
    Thread model: posix
    gcc version 4.5.3 (Gentoo 4.5.3-r1 p1.0, pie-0.4.5)

     
  • Still need an answer:

    >Also, just to simplify things, I assume you get the same problem if you
    >use only the configure flags:
    >--prefix=/usr --libdir=/usr/lib64 --incdir=/usr/include --shared -Si
    >archdef 0

     
  • thrasibule
    thrasibule
    2011-09-19

    The following patch fixes thing for me https://svn.macports.org/changeset/82700. I don't understand why this works, nor why the issue only shows up for certain arches.

    diff -urN ATLAS-orig/makes/Make.miptblas ATLAS/makes/Make.miptblas
    --- ATLAS-orig/makes/Make.miptblas 2011-09-01 18:24:08.000000000 -0400
    +++ ATLAS/makes/Make.miptblas 2011-09-18 23:55:57.401299655 -0400
    @@ -86,10 +86,10 @@
    zlvlm : zlib
    #
    alib : alib.grd
    -slib : slib.grd
    -dlib : dlib.grd
    -clib : clib.grd
    -zlib : zlib.grd
    +slib : slib.grd alib.grd
    +dlib : dlib.grd alib.grd
    +clib : clib.grd alib.grd
    +zlib : zlib.grd alib.grd
    #
    alib.grd : $(ATL_alvlmobj)
    $(ARCHIVER) $(ARFLAGS) $(ATLASlib) $(ATL_alvlmobj)

     
    • status: open --> open-accepted
     
  • Can you try with 3.9.53? I have completely removed the files in question.

    Thanks,
    Clint

     
1 2 > >> (Page 1 of 2)