My build fails with the following linker error message:
FAILED: : && /usr/bin/g++ -Wall -Wextra -Werror -g -fsanitize=undefined,address -Wno-unused-parameter -fsanitize=undefined,address -rdynamic *.o -o SCE -Wl,-rpath,/opt/qt59/lib /opt/qt59/lib/libQt5Widgets.so.5.9.1 /usr/local/lib/libprotobuf.a -lpthread -lutil -lgrpc++ /opt/qt59/lib/libQt5Gui.so.5.9.1 /opt/qt59/lib/libQt5Core.so.5.9.1 && :
/usr/bin/x86_64-linux-gnu-ld: unrecognized option '--push-state--no-as-needed'
You can see the full build log here. The error is in line 2211 and versions are printed in lines 2104ff.
Which tool causes the error?
- Is
gcc 7.3.0
using an incorrect linker flag? Theld
documentation indicates that--push-state
and--no-as-needed
are separate commands. - Is
ld 2.28
too old to understand the linker flag? The change log doesn't list anything that seems related. - The command
&& /usr/bin/g++
looks odd, it should be/usr/bin/g++
. Usingmake
instead ofninja
shows the same linking error.
It builds correctly on Debian testing which is using gcc 7.3.0
as well and ld 2.30
, but there doesn't seem to be a working binutils-2.30
ppa for Ubuntu Trusty.
How do I successfully build my project on Travis?