[MacPorts] #69812: /usr/bin/clang++ cannot compile anything when trying to compile as x86_64 on a current arm system against the MacOSX10.13.sdk (but macports-clang does work)
MacPorts
noreply at macports.org
Sat Jun 29 11:23:47 UTC 2024
#69812: /usr/bin/clang++ cannot compile anything when trying to compile as x86_64
on a current arm system against the MacOSX10.13.sdk (but macports-clang
does work)
---------------------+--------------------
Reporter: lukaso | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: |
---------------------+--------------------
Comment (by lukaso):
@kencu and @ryandesign, thanks so much for your help. Finally got to this.
My workaround ended up being to compile against the current SDK since
cmake-bootstrap is a build time dependency. I was actually facing this
bug: https://trac.macports.org/ticket/66953 which affects `cmake-
bootstrap` as well as `cmake`.
My workaround is to do this:
{{{
sed -i -e 's/buildfromsource always/buildfromsource ifneeded/g'
${PREFIX}/etc/macports/macports.conf
sed -i -e 's/macosx_deployment_target/#macosx_deployment_target/g'
${PREFIX}/etc/macports/macports.conf
sed -i -e 's/macosx_sdk_version/#macosx_sdk_version/g'
${PREFIX}/etc/macports/macports.conf
(
# temporarily unset deployment targets since cmake does not build with
10.13 SDK
# and we don't really care since only used at build time
# Can be removed once https://trac.macports.org/ticket/66953 is fixed
unset MACOSX_DEPLOYMENT_TARGET
unset SDKROOT
echo "clean cmake-bootstrap****"
port_clean_and_install cmake-bootstrap
)
sed -i -e 's/buildfromsource ifneeded/buildfromsource always/g'
${PREFIX}/etc/macports/macports.conf
sed -i -e 's/#macosx_deployment_target/macosx_deployment_target/g'
${PREFIX}/etc/macports/macports.conf
sed -i -e 's/#macosx_sdk_version/macosx_sdk_version/g'
${PREFIX}/etc/macports/macports.conf
}}}
For whatever reason, `cmake-bootstrap` wasn't being built as a dependency
when I was building on true x86_64 so this appeared to be a rosetta 2
issue to me.
I apologize as I should have realized this was the case, and that I
already had a workaround which I was using for `cmake`.
--
Ticket URL: <https://trac.macports.org/ticket/69812#comment:31>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list