Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 279130 - x11-misc/xdotool: fails with forced --as-needed
Summary: x11-misc/xdotool: fails with forced --as-needed
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High QA (vote)
Assignee: Christian Birchinger (RETIRED)
Depends on:
Blocks: as-needed
  Show dependency tree
Reported: 2009-07-26 07:25 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2009-08-03 06:01 UTC (History)
0 users

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

Build log (xdotool-20090609:20090725-214943.log,7.68 KB, text/plain)
2009-07-26 07:25 UTC, Diego Elio Pettenò (RETIRED)
Build log of my box (build.log,1.79 KB, text/plain)
2009-08-03 05:12 UTC, Christian Birchinger (RETIRED)

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2009-07-26 07:25:06 UTC
I'm reporting this bug because the package in summary fails to build when forcing --as-needed on through spec files (check out for details).

Please note that this bug _might_ apply to -Wl,--as-needed in LDFLAGS as well; in both cases it should be fixed. Also, if this is due to the package in question not respecting user-defined LDFLAGS, you should get to fix that too.

Check the attached build log.

Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-07-26 07:25:27 UTC
Created attachment 199198 [details]
Build log
Comment 2 Christian Birchinger (RETIRED) gentoo-dev 2009-08-03 05:12:44 UTC
Created attachment 199977 [details]
Build log of my box

When i add LDFLAGS="-Wl,--as-needed" it still builds fine here (see build.log)
Comment 3 Christian Birchinger (RETIRED) gentoo-dev 2009-08-03 05:18:41 UTC
When LDFLAGS="-Wl,--as-needed" is set in make.conf or ENV it clearly shows up in the build output too.

I don't really know what i'm expected to do. Am i really supposed to test my packages using customized gcc spec files?
Comment 4 Christian Birchinger (RETIRED) gentoo-dev 2009-08-03 06:00:03 UTC
Change the linker argument order to LDFLAGS, objects, libraries.

x86_64-pc-linux-gnu-gcc  -std=c99 -O2 -march=athlon64 -pipe  -Wl,--as-needed xdotool.o xdo.o -lX11 -lXtst   -o xdotool

x86_64-pc-linux-gnu-gcc  -std=c99 -O2 -march=athlon64 -pipe  -Wl,--as-needed xdotool.o xdo.o -lX11 -lXtst   -o xdotool

Got some help from ssuominen on this. If this doesn't fix your issue, i need your help to fix it.
Comment 5 Christian Birchinger (RETIRED) gentoo-dev 2009-08-03 06:01:24 UTC
Erm wrong

x86_64-pc-linux-gnu-gcc  -std=c99 -O2 -march=athlon64 -pipe   -lX11 -lXtst   -Wl,--as-needed xdotool.o xdo.o -o xdotool

x86_64-pc-linux-gnu-gcc  -std=c99 -O2 -march=athlon64 -pipe  -Wl,--as-needed
xdotool.o xdo.o -lX11 -lXtst   -o xdotool