Opened 5 weeks ago

Last modified 5 days ago

#73392 new defect

libmad, graphite2: fail to configure with cmake-devel

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.11.6
Keywords: Cc: Dave-Allured (Dave Allured), cooljeanius (Eric Gallager)
Port: libmad, graphite2, cmake-devel

Description

Reported in these issues: libmad, graphite2.

I have confirmed the same problem on macOS 10.15 x86_64, so [unsurprisingly] it is not specific to an OS version or arch.

--->  Configuring libmad
        (using ccache)
Executing:  cd "/opt/local/var/macports/build/libmad-f63c70d8/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_CXX_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_Fortran_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_OBJC_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_OBJCXX_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_ISPC_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" -DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk" /opt/local/var/macports/build/libmad-f63c70d8/work/0.16.4 
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!
Command failed:  cd "/opt/local/var/macports/build/libmad-f63c70d8/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_CXX_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_Fortran_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_OBJC_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_OBJCXX_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_ISPC_COMPILER_LAUNCHER=/opt/local/bin/ccache -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" -DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk" /opt/local/var/macports/build/libmad-f63c70d8/work/0.16.4 
Exit code: 1
Error: Failed to configure libmad: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_libmad/libmad/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.
Error: Processing of port libmad failed

Change History (8)

comment:1 Changed 4 weeks ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:2 Changed 4 weeks ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured removed

comment:3 Changed 4 weeks ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:4 Changed 3 weeks ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:5 Changed 3 weeks ago by Dave-Allured (Dave Allured)

This is not a cmake or cmake-devel problem. Ports ​libmad and graphite2 need to be updated for CMake 4 compatibility. As noted in downstream tickets, you can use cmake rather than cmake-devel as a temporary workaround.

Please remove cmake-devel from the ports list on this ticket.

comment:6 Changed 3 weeks ago by Dave-Allured (Dave Allured)

Regarding graphite2: This is already fixed in upstream master. They are up to CMAKE_MINIMUM_REQUIRED(VERSION 3.20), which is more than sufficient to fix this for graphite2.

https://github.com/silnrsi/graphite/commit/91737013bdbd92bb35951dae89c86f9a6f47e244

Also note, allegedly there is a graphite2 maintenance release in the works. Wait for that, maybe.

https://github.com/silnrsi/graphite/issues/99

comment:7 Changed 3 weeks ago by Dave-Allured (Dave Allured)

libmad: Was fixed in upstream master: cmake_minimum_required(VERSION 3.5.0)

https://codeberg.org/tenacityteam/libmad/commit/326363f04e583b563f63941db3cf7f50e76aceb2

There is no release or tag yet, that includes this commit. However, the suggested compiler flag may be sufficient as a simple temporary workaround in the portfile. Quoting from above ticket description:

Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

comment:8 in reply to:  7 Changed 5 days ago by RJVB (René Bertin)

Replying to Dave-Allured:

However, the suggested compiler flag may be sufficient as a simple temporary workaround in the portfile. Quoting from above ticket description:

Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

I think a lot if not most projects update the version requirement only when they run into an issue with their current requirement, and a kludgy solution like the above might be all that's needed.

I suppose the CMake PG could provide a hook to add that minimum version override (something like cmake.force_maximum_backward_compatibility). It could also provide the lowest supported minimum version as a variable so ports can do the patching themselves as an incitation to look into what's really needed and maybe upstream that.

Note: See TracTickets for help on using tickets.