Menu

#14 Build fails on "unrecognized option"

open
nobody
None
5
2011-07-01
2011-07-01
No

gcc 4.6.1 on Arch Linux 64 bit

-- build error --
make[1]: Leaving directory `/tmp/packerbuild-0/ggmud/ggmud/src/ggmud-0.8.0/zlib'
gcc -march=x86-64 -mtune=generic -O2 -pipe obj/alias.o obj/ansi.o obj/font.o obj/fileopen.o obj/help.o obj/history.o obj/log.o obj/logviewer.o obj/macro.o obj/net.o obj/preferences.o obj/ggmud.o obj/triggers.o obj/window.o obj/wizard.o obj/variables.o obj/highlights.o obj/gags.o obj/timers.o obj/complete.o obj/prefix.o obj/telnet.o obj/lua.o obj/interface.o obj/callbacks.o obj/support.o obj/socks.o obj/pixmaps.o obj/buttons.o -o ggmud -Ltt -ltt -Llua -llua -Lzlib -lzlib `pkg-config gtk+-2.0 --libs` --as-needed
gcc: error: unrecognized option ‘--as-needed’
make: *** [ggmud] Error 1
---
I fixed it by doing this:

sed s/--as-needed// Makefile > Makefile.fixed; mv Makefile.fixed Makefile

Not sure if that's the optimal solution, but it works for me.

Discussion


Log in to post a comment.