[OSX][64-bit] Missing symbols of libgphobos2.a

Dan Sănduleac avatarDan Sănduleac created an issue

Some symbols are missing, which raises linking errors when I use gdc (under Mac OS X) - linking.txt.

See the output of nm libgphobos2.a attached (as the rightmost missing_symbols.txt.. apparently can't delete/rename attachments.

Since then I've recompiled with gcc-4.5.3, but am facing the same issues. I'm also attaching exactly the symbols reported as missing by ld (as the leftmost missing_symbols.txt).

# examples for one of the missing symbols

# version just installed, compiled for x86-64
$ nm /opt/usr/local/lib/libgphobos2.a 2>&1 | grep _D11TypeInfo_AC6__initZ
0000000000001f20 S __D11TypeInfo_AC6__initZ
                 U _D11TypeInfo_AC6__initZ
                 U _D11TypeInfo_AC6__initZ
                 U _D11TypeInfo_AC6__initZ
# ---   unresolved symbols start with only ONE underscore .. (like on 32-bit dmd?)

# GdcMac based on GCC 4.2.1 and dmd 1.064, 64-bit (for reference)
$ lipo -extract x86_64 /usr/lib/libgphobos.a -output libgphobos-x86_64.a
$ nm libgphobos-x86_64.a 2>&1 | grep _D11TypeInfo_AC6__initZ
                 U __D11TypeInfo_AC6__initZ
                 U __D11TypeInfo_AC6__initZ
00000000000003c0 S __D11TypeInfo_AC6__initZ
# ---   notice that all of the symbols start with TWO underscores

# DMD 2.052, official binary, only 32-bit
nm ~/Kits/DMD/dmd2/osx/lib32/libphobos2.a 2>&1 | grep _D11TypeInfo_AC6__initZ
00000000 D _D11TypeInfo_AC6__initZ

$ /opt/usr/local/bin/gdc -v
Using built-in specs.
Target: x86_64-apple-darwin10
Configured with: ../gcc-4.5.3/configure --build=x86_64-apple-darwin10 --enable-languages=c,d --with-system-zlib --disable-nls --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --enable-stage1-checking --enable-fully-dynamic-string --disable-multilib --disable-shared --enable-checking=release --with-local-prefix=/opt/local
Thread model: posix
gcc version 4.5.3 20110428 (gdc hg, using dmd 2.052) (GCC)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.