Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 164777 - Fix games-mud/gmudix-1.0 breakage with --as-needed in LDFLAGS
Summary: Fix games-mud/gmudix-1.0 breakage with --as-needed in LDFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2007-02-01 04:08 UTC by Mart Raudsepp
Modified: 2007-02-02 17:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2007-02-01 04:08:16 UTC
games-mud/gmudix-1.0 fails linkage with -Wl,--as-needed in LDFLAGS:

gcc -DHAVE_CONFIG_H -I. -I. -I.. -Wall -I.. -I../include `pkg-config --cflags gtk+-2.0`    -march=prescott -O2 -ftracer -pipe -ggdb3 -O2  -c user.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -Wall -I.. -I../include `pkg-config --cflags gtk+-2.0`    -march=prescott -O2 -ftracer -pipe -ggdb3 -O2  -c variable.c
gcc  -march=prescott -O2 -ftracer -pipe -ggdb3 -O2  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o gmudix -lz `pkg-config --libs gtk+-2.0` `pkg-config --libs gthread-2.0` alias.o commands.o file.o gui_alias.o gui_capture.o gui_character.o gui_color.o gui_font.o gui_general.o gui_macro.o gui_main.o gui_path.o gui_preferences.o gui_tab.o gui_timer.o gui_trigger.o gui_user.o gui_variable.o history.o log.o macro.o mccp.o mudix.o net.o path.o process.o string.o tabs.o telnet.o timer.o trigger.o user.o variable.o  
commands.o: In function `syntax_msg':
/var/tmp/portage/games-mud/gmudix-1.0/work/gmudix-1.0/src/commands.c:163: undefined reference to `g_unichar_to_utf8'
commands.o: In function `cmd_variable':
/var/tmp/portage/games-mud/gmudix-1.0/work/gmudix-1.0/src/commands.c:705: undefined reference to `gtk_main_quit'
commands.o: In function `cmd_tab':
/var/tmp/portage/games-mud/gmudix-1.0/work/gmudix-1.0/src/commands.c:471: undefined reference to `gtk_main_quit'
commands.o: In function `cmd_path':
/var/tmp/portage/games-mud/gmudix-1.0/work/gmudix-1.0/src/commands.c:405: undefined reference to `gtk_main_quit'
commands.o: In function `cmd_macro':
/var/tmp/portage/games-mud/gmudix-1.0/work/gmudix-1.0/src/commands.c:208: undefined reference to `gtk_accelerator_parse'

<snip all other gtk/glib symbols appearing as undefined references>

variable.o: In function `var_lookup':
/var/tmp/portage/games-mud/gmudix-1.0/work/gmudix-1.0/src/variable.c:164: undefined reference to `g_utf8_skip'
collect2: ld returned 1 exit status
make[2]: *** [gmudix] Error 1
make[2]: Leaving directory `/var/tmp/portage/games-mud/gmudix-1.0/work/gmudix-1.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/games-mud/gmudix-1.0/work/gmudix-1.0'
make: *** [all-recursive-am] Error 2

!!! ERROR: games-mud/gmudix-1.0 failed.
Call stack:
  ebuild.sh, line 1611:   Called dyn_compile
  ebuild.sh, line 968:   Called qa_call 'src_compile'
  environment, line 3172:   Called src_compile
  ebuild.sh, line 1301:   Called games_src_compile
  games.eclass, line 155:   Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/games-mud/gmudix-1.0/temp/build.log'.



It needs to use `pkg-config --libs gtk+-2.0` after the list of the object files, rather than before. Of course ideally it wouldn't call pkg-config on compilation lines with ticks, but get it into a value in configure time.
Comment 1 Tristan Heaven (RETIRED) gentoo-dev 2007-02-02 17:38:17 UTC
ta