[MacPorts] #60896: cmake @3.18.0_1: Unable to find MacPorts zlib
MacPorts
noreply at macports.org
Fri Jul 24 18:02:15 UTC 2020
#60896: cmake @3.18.0_1: Unable to find MacPorts zlib
------------------------+---------------------------
Reporter: jasonliu-- | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: cmake openvdb
------------------------+---------------------------
When trying to install `openvdb @7.0.0`, openvdb's CMake file will call
the `FindZLIB` module to locate zlib. However, it's currently failing on
my machine because the zlib that the cmake module is finding is the
ancient macOS one located at `/usr/lib/libz.dylib` (zlib version 1.2.5).
Even if the MacPorts zlib is installed (version 1.2.11), the cmake module
isn't seeing it. It's causing the following error to be generated:
{{{
:info:configure CMake Error at
/opt/local/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165
(message):
:info:configure Could NOT find ZLIB: Found unsuitable version "1.2.5",
but required is at
:info:configure least "1.2.7" (found //usr/lib/libz.dylib)
:info:configure Call Stack (most recent call first):
:info:configure
/opt/local/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:456
(_FPHSA_FAILURE_MESSAGE)
:info:configure /opt/local/share/cmake-3.18/Modules/FindZLIB.cmake:115
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
:info:configure openvdb/CMakeLists.txt:80 (find_package)
}}}
My system's info:
* macOS 10.11.6 15G22010
* Xcode 8.2.1 8C1002
* `port installed | grep zlib` : `zlib @1.2.11_0 (active)`
* `port installed | grep cmake` : `cmake @3.18.0_1 (active)`
I didn't encounter this issue when installing `openvdb` on a "brand new"
MacPorts machine (i.e. MacPorts had just been newly installed on it a few
minutes before, and thus had no previously installed ports, etc.). This
new machine had macOS 10.15 Catalina and Xcode 11.5. I'm not sure whether
that's because the `/usr/lib/libz.dylib` is a new enough version of zlib
that it's not generating the error, or something else. (I no longer have
access to the 10.15 machine, so the previous sentence is just speculation
on my part.)
Also, one more observation. If you take a look at the log, the messages
from just before the error I quoted above show that other cmake modules
are able to see MacPorts ports, and so seems to indicate that the problem
appears to be specific to just zlib, and not all cmake modules.
{{{
:info:configure -- ----------------------------------------------------
:info:configure -- ------------- Configuring OpenVDBCore --------------
:info:configure -- ----------------------------------------------------
:info:configure -- Found PkgConfig: /opt/local/bin/pkg-config (found
version "0.29.2")
:info:configure -- Found IlmBase: /opt/local/include/OpenEXR (found
suitable version "2.3", minimum required is "2.2") found components: Half
:info:configure -- Found TBB: /opt/local/include (found suitable version
"2020.3", minimum required is "2017.0") found components: tab
}}}
--
Ticket URL: <https://trac.macports.org/ticket/60896>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list