[cfe-dev] Clang, AppleClang and hidden visibility issues in C++ libraries

Dimitry Andric via cfe-dev cfe-dev at lists.llvm.org
Sun Nov 11 03:13:08 PST 2018


Do you have any more concrete details, such as the exact error messages, and maybe a self-contained test case?

-Dimitry

> On 11 Nov 2018, at 10:23, René J.V. Bertin via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Hi,
> 
> I keep running into and hearing about issues where Qt/KDE projects fail to build because of symbols not being found during linking. This is in libraries provided by the project itself. These projects all set symbol visibility to hidden by default and when I run `nm` on the library supposed to provide the symbol I see it's there but labelled 't' instead of 'T'.
> 
> It seems that most of the time this occurs when using Apple's clang version from Xcode and that using a recent (>= 4) "stock" clang from MacPorts solves the issue, without changing anything else. I've been writing this off to the fact that my own AppleClang (from Xcode 6.2) is getting old but I just heard that the one from Mac OS 10.13 is affected too. I'm not sure exactly what stock clang version that corresponds to, but I'm hoping it should be at least 5.0 .
> 
> Any idea what can cause this, and more importantly, how to fix it?
> The project mentioned above is libkcddb (https://cgit.kde.org/libkcddb.git/) and I have to suppose the relevant compiler options are set in the extra-cmake-modules (https://cgit.kde.org/extra-cmake-modules.git/; I'm not seeing anything suspicious in there though).
> 
> The way to catch stock clang or Apple's clang in cmake is still `CMAKE_CXX_COMPILER_ID MATCHES "Clang"`, right?
> 
> Thanks,
> R.
> 
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 223 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181111/94770d36/attachment.sig>


More information about the cfe-dev mailing list