I tracked down a problem compiling a c++ module on OS X 10.12. Everything 
compiles properly but I get lots of symbol not found errors during linking. It 
seems that the mangled symbol names being generated for the module were a lot 
shorter than the ones in the library. For example:

__ZN6Xapian11QueryParser11parse_queryERKSsjS2_

versus:

__ZN6Xapian11QueryParser11parse_queryERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEjS9_

After a good bit of messing around (I assumed it was due to some command line 
option passed to clang/ld) I discovered that there’s a line in smartlink that 
sets:

MACOSX_DEPLOYMENT_TARGET=10.3

And this setting alters a number of behaviors in the compiler/linker including 
the style of name mangling used.

It looks like the minimum version required for modern libraries to work is 
10.9. 

Is there any chance we can bring that forward? Perhaps 10.9 for versions 10.9 
and up, and whatever previous version makes most sense... I still compile for 
10.6 as a courtesy for some folks but don’t know anyone running anything 
earlier.

Any thoughts?

Bill

Reply via email to