[MacPorts] #58450: MacPorts installed cmake gives incoherent results
MacPorts
noreply at macports.org
Thu May 9 20:45:23 UTC 2019
#58450: MacPorts installed cmake gives incoherent results
---------------------+-----------------------
Reporter: sandym | Owner: michaelld
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: cmake |
---------------------+-----------------------
Comment (by sandym):
What is "cmake 1.1 PG" ? I'm trying to understand how you got
{{{
ICONV_HEADER = /opt/local/include
ICONV_LIB = /opt/local/lib/libiconv.dylib
}}}
?
As for getting
{{{
ICONV_HEADER = /usr/include
ICONV_LIB = /usr/lib/libiconv.dylib
}}}
you probably have an extra Xcode package installed as /usr/include does
not exists on any of my machines nor is a default install by Xcode
anymore. All headers are in Xcode SDKs folder. The library do exists in
/usr of course.
So it seems to come down to the value of CMAKE_SYSTEM_PREFIX_PATH. For
cmake downloaded from cmake.org, I get:
{{{
CMAKE_SYSTEM_PREFIX_PATH =
/usr/local
/usr <-- have the lib but not the header
/
/Applications/CMake.app/Contents <-- cmake install root, no header
/usr/local
/usr/X11R6
/usr/pkg
/opt
/.../SDKs/MacOSX10.14.sdk/usr <-- have the lib and header
/sw
/opt/local
ICONV_HEADER = /.../SDKs/MacOSX10.14.sdk/usr/include
ICONV_LIB = /usr/lib/libiconv.dylib
}}}
For macports' cmake:
{{{
CMAKE_SYSTEM_PREFIX_PATH =
/usr/local
/usr <-- have the lib but not the header
/
/opt/local <-- cmake install root , have the lib and header
/usr/local
/usr/X11R6
/usr/pkg
/opt
/.../SDKs/MacOSX10.14.sdk/usr <-- have the lib and header
/sw
/opt/local
ICONV_HEADER = /opt/local/include
ICONV_LIB = /usr/lib/libiconv.dylib
}}}
Not sure there anything to do about this. It seems that even the cmake
downloaded from cmake.org works by accident: what if I use a different SDK
? I still get the lib from /usr but a different header!
For now, I can either install the package to get the header in
/usr/include or manipulate CMAKE_SYSTEM_PREFIX_PATH.
{{{
list(REMOVE_ITEM CMAKE_SYSTEM_PREFIX_PATH /usr) # skip /usr, get from
macports
list(REMOVE_ITEM CMAKE_SYSTEM_PREFIX_PATH /opt/local) # or skip MacPorts
}}}
--
Ticket URL: <https://trac.macports.org/ticket/58450#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list