[MacPorts] #59832: cmake 3.16.0: does not build on PPC Mac OS X 10.5.8, "Bus Error"
MacPorts
noreply at macports.org
Mon Mar 16 20:18:47 UTC 2020
#59832: cmake 3.16.0: does not build on PPC Mac OS X 10.5.8, "Bus Error"
--------------------------+-----------------------
Reporter: timishimuni | Owner: michaelld
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.2
Resolution: | Keywords: leopard
Port: cmake |
--------------------------+-----------------------
Comment (by noloader):
@kencu,
A quick and dirty patch for CMake 3.16.5 bootstrap. This enables a `make
-j 4` so you can test changes in three or four minutes rather then 10 to
15 minutes:
{{{
echo "Patching CMake 3.16.5"
sed -i '1648,1652d' bootstrap
sed -i '1648imake -j 4' bootstrap
}}}
The `sed` deletes this block, which CMake seems to mishandle somehow...
{{{
# Run make to build bootstrap cmake
if [ "x${cmake_parallel_make}" != "x" ]; then
${cmake_make_processor} ${cmake_make_flags}
else
${cmake_make_processor}
fi
}}}
Here's my full build script for testing. Notice the export of
`cmake_make_processor` and `cmake_parallel_make`.
{{{
#!/usr/bin/env bash
printf '\033c'
rm -rf cmake-3.16.5/
export CC=/opt/local/bin/gcc-mp-5
export CXX=/opt/local/bin/g++-mp-5
export CFLAGS="-Wall"
export CXXFLAGS="-Wall"
export RANLIB=/opt/local/bin/gcc-ranlib-mp-5
export LDFLAGS="-twolevel_namespace -twolevel_namespace_hints"
export MAKE="make"
export cmake_make_processor="make"
export cmake_parallel_make="4"
echo
echo "CC: $CC"
echo "CXX: $CXX"
echo "CFLAGS: $CFLAGS"
echo "CXXFLAGS: $CXXFLAGS"
echo "LDFLAGS: -twolevel_namespace -twolevel_namespace_hints"
echo
if [ -e cmake-3.16.5.tar.gz ];
then
echo "Found CMake 3.16.5"
else
echo "Downloading CMake 3.16.5"
if ! curl -L -s -k -o cmake-3.16.5.tar.gz \
https://github.com/Kitware/CMake/releases/download/v3.16.5/cmake-3.16.5.tar.gz;
then
echo "Failed to download CMake"
exit 1
fi
fi
echo "Unpacking CMake 3.16.5"
if ! tar xzf cmake-3.16.5.tar.gz;
then
echo "Failed to unpack CMake"
exit 1
fi
cd cmake-3.16.5 || exit 1
echo "Patching CMake 3.16.5"
sed -i '1648,1652d' bootstrap
sed -i '1648imake -j 4' bootstrap
echo "Configuring CMake 3.16.5"
if ! ./bootstrap --no-system-libs;
then
echo "Failed to configure CMake"
exit 1
fi
echo "Building CMake 3.16.5"
if ! "${MAKE}";
then
echo "Failed to build CMake"
exit 1
fi
echo
echo "CMake 3.16.5 is ready to install. Change directories"
echo "to cmake-3.16.5, and then run 'sudo make install'."
exit 0
}}}
--
Ticket URL: <https://trac.macports.org/ticket/59832#comment:30>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list