Summary: | x11-misc/xdotool undefined reference errors fix and possible ebuild improvements | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Joshua Rich <joshua.rich> |
Component: | Current packages | Assignee: | Christian Birchinger (RETIRED) <joker> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
ebuild that fixes library linking problems
updated ebuild to fix compile issues diff/patch against xdotool-20090609.ebuild Merged ebuild |
Description
Joshua Rich
2009-06-19 02:00:00 UTC
Created attachment 195131 [details]
ebuild that fixes library linking problems
Further to attached ebuild, here is a contents of the XDOTOOL license I am using, which was taken from the COPYRIGHT file in the source distribution. If you think that it is close enough to 'as-is', please adjust attached ebuild. Cheers, Joshua Copyright (c) 2007, 2008, 2009: Jordan Sissel. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Jordan Sissel nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY JORDAN SISSEL ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JORDAN SISSEL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This looks like a standard '--as-needed' problem. A more simple fix would be to move the var with libs after the var with objects in that Makefile. That was of course about order of vars in the build command, not order of apperance in the Makefile. Created attachment 195237 [details]
updated ebuild to fix compile issues
Updated ebuild to fix issue where stripping '-std=c99' from CFLAGS leads to compile failure.
Rafa?,
I'm unsure exactly what you mean. Do you mean that '-lX11 -lXtst' should come after all the '-Wl' linker opts? In this case, the build will fail with my LDFLAGS. The substitution I made, where -lX11... comes before -Wl... works. Disclaimer though, I'm
(In reply to comment #5) > Created an attachment (id=195237) [edit] > updated ebuild to fix compile issues > > Updated ebuild to fix issue where stripping '-std=c99' from CFLAGS leads to > compile failure. > > Rafał, > > I'm unsure exactly what you mean. Do you mean that '-lX11 -lXtst' should come > after all the '-Wl' linker opts? In this case, the build will fail with my > LDFLAGS. The substitution I made, where -lX11... comes before -Wl... works. > Disclaimer though, I'm > ...no programmer. I code in Perl... Cheers, Josh Not really programming stuff, more like an obscure technical detail... unless you've already seen a few dozen of that type. In that Makefile, there this line: LDFLAGS+=$(LIBS) and later this one: $(CC) $(CFLAGS) $(LDFLAGS) xdotool.o xdo.o -o $@ that works, unless --as-needed is used. Upstream should fix that too. I think the simplest way would be removing first line and changing second to: $(CC) $(CFLAGS) $(LDFLAGS) xdotool.o xdo.o $(LIBS) -o $@ (that's what I meant by "libs after objects") Please attach unified diffs (diff -u) when you did changes to an ebuild. That would be much more handy for our devs. Created attachment 195409 [details, diff]
diff/patch against xdotool-20090609.ebuild
As requested, diff/patch against xdotool-20090609.ebuild. Fixes 'as-needed' linking problems discussed in this bug.
Created attachment 197900 [details]
Merged ebuild
Can anyone agree on this?
I'm keeping dobin (don't see why exeinto/doexe should be prefered)
New description was too long (only 100 chars allowed)
And some minor stuff like quoting ${S} etc.
Oh yes, we use /usr/share/doc not /usr/doc. Consider this changed when i commit. Commited Hi Christian, Cool, thanks for those fixes, will keep them in mind next time I send a bug. Sorry about the doc location, must have missed share when typing it out! And thanks for chasing this bug up. Cheers, Josh |