[MacPorts] #41321: cmake: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
MacPorts
noreply at macports.org
Fri Dec 6 07:27:20 PST 2013
#41321: cmake: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or
later)
---------------------------+-----------------------
Reporter: ryandesign@… | Owner: css@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.2.99
Resolution: | Keywords: mavericks
Port: cmake |
---------------------------+-----------------------
Comment (by nicos@…):
Right, this makes indeed quite more sense. I am however not fully sure
that cmake is fully to blame here. The error occurs at a very specific
place, which is at configure stage, not during the build. By looking at
the build log on my system, -stdlib=libc++ flag is not set during the
standard build stage.
The error occurs during a very specific test performed in kdelibs4
(FindKDE4Internal.cmake):
{{{
# check that Qt defines Q_DECL_EXPORT as __attribute__
((visibility("default")))
# if it doesn't and KDE compiles with hidden default visibiltiy plugins
will break
set(_source "#include <QtCore/QtGlobal>\n int main()\n {\n #ifndef
QT_VISIBILITY_AVAILABLE \n #error QT_VISIBILITY_AVAILABLE is not
available\n #endif \n }\n")
set(_source_file ${CMAKE_BINARY_DIR}/CMakeTmp/check_qt_visibility.cpp)
file(WRITE "${_source_file}" "${_source}")
set(_include_dirs "-DINCLUDE_DIRECTORIES:STRING=${QT_INCLUDES}")
try_compile(_compile_result ${CMAKE_BINARY_DIR} ${_source_file}
CMAKE_FLAGS "${_include_dirs}" OUTPUT_VARIABLE _compile_output_var)
if(NOT _compile_result)
message("${_compile_output_var}")
message(FATAL_ERROR "Qt compiled without support for
-fvisibility=hidden. This will break plugins and linking of some
applications. Please fix your Qt installation (try passing --reduce-
exports to configure).")
}}}
The output message is misleading, as the test fails for a reason which is
different from what is tested (leading to my errands above). But it still
seems that the flags used during this test are different from the ones
then really employed at build stage, which may be the reason why kde ports
are specifically affected.
I will try to have a look to see why the flags are different, which I did
not do yet.
For reference, here are the flags which are used on my system (Mavericks,
Xcode 5.0.2) at the build stage:
{{{
/usr/bin/clang++ -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=97
-DKDE_DEPRECATED_WARNINGS -DQT_NO_CAST_TO_ASCII -DQT_NO_STL
-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -D_REENTRANT -pipe
-Os -arch x86_64 -fno-common -Wnon-virtual-dtor -Wno-long-long -Wundef
-Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security
-Woverloaded-virtual -fno-common -fvisibility=hidden -Werror=return-type
-fvisibility-inlines-hidden -Wno-return-type-c-linkage -O2 -DNDEBUG
-DQT_NO_DEBUG -arch x86_64
}}}
--
Ticket URL: <https://trac.macports.org/ticket/41321#comment:11>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list