static linking breaks on multicore builds with 'undefined reference to `get_myaddress''
On an NVIDIA ARM64 machine, --with-production works but -optimize gives link error:
../../../bin/charmc -language charm++ -o hello hello.o
../../../bin/../lib/libck.a(debug-charm.o): In function `hostInfo(void*, void*, CpdListItemsRequest*)':
debug-charm.C:(.text+0x40): undefined reference to `get_myaddress'
collect2: error: ld returned 1 exit status
Fatal Error by charmc in directory /home-2/jphillips/NAMD_CVS-2014-06-18_Source/charm-6.6.0-rc3/multicore-arm7/tests/charm++/simplearrayhello
Command g++ -D_REENTRANT -rdynamic -o hello -L../../../bin/../lib -I../../../bin/../include ../../../bin/../lib/libldb-rand.o hello.o moduleinit29126.o ../../../bin/../lib/libmemory-default.o ../../../bin/../lib/libthreads-default.o -lckmain -lck -lconv-cplus-y -lconv-core -lconv-util -lconv-partition -lpthread -lckqt -ldl -lm returned error code 1
#5 Updated by Eric Bohm over 4 years ago
- Status changed from In Progress to Rejected
- % Done changed from 0 to 100
I cannot reproduce this bug on cupertino. I suspect the actual issue was resolved by other changes in the interim.
I have found numerous compilation bugs arise with high levels of parallelization on the make (-j or -j8). Those seem to be compiler crashes in gcc, probably due to memory constraints. I'd consider those upstream bugs rather than charm bugs. I'm reluctant to try to enforce low levels of parallel compilation as the environmental toolchain issues may be resolved in subsequent releases.
Building with -j2 has been safe so far.
#7 Updated by Sam White over 2 years ago
- Status changed from Rejected to New
- Subject changed from multicore-arm7 --no-build-shared -optimize undefined reference to `get_myaddress' to static linking breaks on multicore builds with 'undefined reference to `get_myaddress''
This same error happens when building examples/ampi/Cjacobi3D with -tlsglobals on multicore-linux64 and is reproducible there (see autobuild). The common denominators are that these are multicore builds using static rather than dynamic linking ('-tlsglobals' implicitly passes '-static' to the linker).