libicu-le-hb.0.dylib: undefined symbol: _ZTIN6icu_657UObjectE

René J.V. Bertin rjvbertin at gmail.com
Wed Oct 30 09:37:22 UTC 2019


On Tuesday October 29 2019 16:21:53 Chris Jones wrote:

>Not really. 
>
>Maybe it would help if you gave more details on how to try and reproduce what you see...
>

For now, all I can say is that I'm trying to get a working icu-le-hb install, building with port:clang-5.0 and against port:icu at 65.1 . Then whenever the dynamic loader loads the resulting library it fails with a message about a missing symbol. You can reproduce this with a very simple C programme that dlopen's the binary.

I'm seeing the same error on Linux (using the official clang 5 toolchain build and port:icu at 65.1).
- on Linux I can roll back to icu at 58.2 and the icu-le-hb build against that icu version (1.0.3_0); that icu-le-hb library loads fine
- when I rebuild icu-le-hb against that same old icu at 58.2, the resulting library fails to load with the same error.

Adding `-std=c++11` to CXXFLAGS or not does not seem to make a difference, nor using a different compiler (I tried clang-5, clang-6 and GCC 8.3.0 . 
What does help is adding `$(ICU_LIBS)` to the library link command in icu-le-hb-1.0.3/src/Makefile.

So in retrospect, apparently this issue was never discovered because libicuuc (which provides the class typeinfo symbol) always got to be loaded before libicu-le-hb , so the symbol was present in the application's address space. I could verify that with LD_PRELOAD (on Linux but I have to assume that the equivalent DYLD_INSERT_LIBRARIES trick would have the same effect on Mac). I'll file a ticket on trac.

BTW, what are the effects of setting `compiler.cxx_standard 2011`? Does it just set a minimal compiler version or does it also add a `-std=` flag somewhere?


More information about the macports-dev mailing list