kdevelop build error: direct access to global weak symbol

Aetf 7437103 at gmail.com
Tue Jun 28 00:32:02 UTC 2016


Hi René,

Finally I found the reason why we are getting different visibility settings
for tests. Could you kindly verify if that works on OS X? For whatever
reason I can't see the warnings using clang 3.8 on my box... Just add one
line in debuggers/common/CMakeLists.txt brfore line 36:

cmake_policy(SET CMP0063 OLD)
add_library(kdevdebuggercommon STATIC ${debuggercommon_SRCS})

It's about the cmake policy CMP0063: whether to ignore the visibility
properties for static libraries, object libraries, and executables without
exports.

The whole kdevelop project sets CMP0063 to new and honors the visibility
properties for all target types. That's the case when target
kdevdebuggercommon is added (visibility set to hidden).

Target test_gdb is added through ecm_add_test which is defined with CMP0063
unset (functions capture the policy settings when it's defined). Thus
visibility properties for test_gdb is ignored and it's built with
default(public) visibility.

Therefore setting CMP0063 policy to OLD before create target should solve
the issue, since kdevdebuggercommon is just a simple internal library.

Cheers,
Aetf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160628/335d2ff0/attachment-0001.html>


More information about the KDevelop-devel mailing list