- removed comment
Undefined symbol ___emutls_get_address
When I try to compile on Mac OS using the SimFactory optionlist macos-fink-gcc.cfg (https://svn.cct.lsu.edu/repos/numrel/simfactory2/trunk/mdb/optionlists/macos-fink-gcc.cfg), I get the following error at link time:
ld: warning: alignment lost in merging tentative definition _tmunubaserest_ ld: warning: alignment lost in merging tentative definition _admmacrosrest_ ld: warning: alignment lost in merging tentative definition _staticconformalrest_ Undefined symbols: "___emutls_get_address", referenced from: __ZN4dist25collect_total_num_threadsEv.omp_fn.0 in libthorn_CarpetLib.a(dist.cc.o) dist::collect_total_num_threads() in libthorn_CarpetLib.a(dist.cc.o) Carpet::SetupGH(tFleshConfig*, int, _cGH*) in libthorn_Carpet.a(SetupGH.cc.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[1]: *** [/Users/ian/Cactus/Kerrness/exe/cactus_sim] Error 1 make: *** [sim] Error 2
I don't know if the "alignment lost" warnings are related to the fatal error. This seems to be some issue related to OpenMP. The problem appeared fairly recently, as I have been able to compile older versions of the ET with no problem, and this option list has not been changed.
I am reporting this against SimFactory because the problem does not happen with other option lists in the machine database, but I suspect that the issue arose due to a change in Carpet (maybe related to affinity?).
From some Google searching, this symbol is part of GCC's thread-local storage emulation for Mac OS. Some people have had this problem when mixing object files compiled by different versions of GCC. I am using GCC 4.4.4 from Fink:
> g++-4 --version g++-4 (GCC) 4.4.4
This page, http://stackoverflow.com/questions/7885246/what-is-the-emutls-get-address-symbol, says
Using thread local storage (e.g. OpenMP ThreadPrivate variables) on Darwin requires manually linking to TLS emutls, via either -lgcc_s.so.1 or -lgcc_eh
There is also a suggestion to upgrade the version of GCC, which I am trying now.
Keyword:
Comments (6)
-
reporter -
- removed comment
For the record: the warning about "lost alignment" and the error about "tls" are unrelated. The former is about the memory layout of global variables in C and Fortran, and is harmless. The second (tls) is about multi-threading.
-
- removed comment
Should we remove the macos-fink option list from Simfactory (i.e. move it into the OUTDATED subdirectory)?
-
reporter - removed comment
Maybe ask on the list if anyone is using it? If not, then it's fine to move it immediately. If they are, then we could help them transition to MacPorts, and then remove it. It's a bit better than removing it suddenly.
-
- removed comment
Does this problem still exist?
-
- edited description
- changed status to wontfix
macos-fink-gcc.cfg no longer exists.
- Log in to comment
This happens also with a fully up-to-date version of the packages from Fink (GCC 4.4.6). It does not happen if I instead use MacPorts and https://svn.cct.lsu.edu/repos/numrel/simfactory2/trunk/mdb/optionlists/osx-snow-leopard-macports-gcc.cfg. Since MacPorts now actively supports binary packages and Fink does not have any for the last two Mac OS versions, I will switch to MacPorts and have little interest in debugging the Fink problem discussed in this ticket. This leaves no one maintaining the Fink option list, so I propose that it be deprecated. MacPorts seems much more popular anyway.