[MacPorts] #62072: gcc5 @5.5.0_6: build fails on 10.7: error: invalid operand for instruction movabsq 34359738368, %rax
MacPorts
noreply at macports.org
Sun Jan 17 17:47:24 UTC 2021
#62072: gcc5 @5.5.0_6: build fails on 10.7: error: invalid operand for instruction
movabsq 34359738368, %rax
--------------------+--------------------
Reporter: kencu | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: lion | Port: gcc5
--------------------+--------------------
On the 10.7.5 buildbot, during the build of gcc5, we see this error:
<https://build.macports.org/builders/ports-10.7_x86_64-builder/builds/38858/steps
/install-port/logs/stdio>
{{{
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/build
/./prev-gcc/xg++
-B/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/build
/./prev-gcc/ -B/opt/local/x86_64-apple-darwin11/bin/ -nostdinc++
-B/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/build
/prev-x86_64-apple-darwin11/libstdc++-v3/src/.libs
-B/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/build
/prev-x86_64-apple-darwin11/libstdc++-v3/libsupc++/.libs -isystem
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/build
/prev-x86_64-apple-darwin11/libstdc++-v3/include/x86_64-apple-darwin11
-isystem
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/build
/prev-x86_64-apple-darwin11/libstdc++-v3/include -isystem
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/gcc-5.5.0/libstdc++-v3/libsupc++
-L/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/build
/prev-x86_64-apple-darwin11/libstdc++-v3/src/.libs
-L/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/build
/prev-x86_64-apple-darwin11/libstdc++-v3/libsupc++/.libs -c -g -O2
-gtoggle -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-
tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-
format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-
variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I.
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/gcc-5.5.0/gcc
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/gcc-5.5.0/gcc/.
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/gcc-5.5.0/gcc/../include
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/gcc-5.5.0/gcc/../libcpp/include
-I/opt/local/include -I/opt/local/include -I/opt/local/include
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/gcc-5.5.0/gcc/../libdecnumber
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/gcc-5.5.0/gcc/../libdecnumber/dpd
-I../libdecnumber
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/gcc-5.5.0/gcc/../libbacktrace
-I/opt/local/libexec/isl18/include -I/opt/local/include -o tree-ssa-
threadupdate.o -MT tree-ssa-threadupdate.o -MMD -MP -MF ./.deps/tree-ssa-
threadupdate.TPo
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc5/gcc5/work/.tmp/ccywe8yj.s:5325:10:
error: invalid operand for instruction
movabsq 34359738368, %rax
^
make[3]: *** [tree-ssa-threadupdate.o] Error 1
make[3]: *** Waiting for unfinished jobs....
}}}
This is no doubt caused by our modifications to cctools to force the use
of the system "clang" as the assembler on 10.7.5 instead of using the
built-in "gas" driver.
To confirm this, we know that if a version of macports-clang >= 5.0 is
installed, then cctools' as driver will use that as assembler instead of
the system clang, and in fact 10.7.5 builds gcc5 if macports-clang-9.0 is
installed:
{{{
port -v installed gcc5
The following ports are currently installed:
gcc5 @5.5.0_6 (active) platform='darwin 11' archs='x86_64'
date='2021-01-17T09:45:39-0800'
}}}
As almost 100% of users of 10.7.5 have macports-clang-9.0 installed, most
likely they are all building gcc5 on their own systems now, as I just did.
So, to fix this more robustly, and for the buildbot -- we could do any of
these (and there might be other workarounds):
- add a build dep on a macports-clang >= 5.0 for gcc5, which is a blunt
but simple work-around...most 10.7.5 users need clang-9.0 installed anyway
- change our cctools port to not use /usr/bin/clang as assembler on
10.7.5. That is actually not a bad idea, as it is not a great assembler at
that point in time anyway, and we'd probably be losing very little by
doing that.
- force our cctools "as" driver to use the old "gas" assembler during the
build of gcc5 by using a custom MacPorts-only ENV VAR that we came up
with, but that does require patching gcc5 as by default it does not
respect most ENV VARs set in the environment. This is probably the best
idea.
- There is supposed to be a way to drop a symlink somewhere in the build
tree for the assember (and other tools) that you want to be used during
the gcc build, and if that worked we could symlink in Apple's
"/usr/bin/as" driver instead, but that has never worked when I tried it,
although if it did work, it is simple indeed.
--
Ticket URL: <https://trac.macports.org/ticket/62072>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list