FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 08-10-2010, 06:40 PM
Francesco R
 
Default Add --hash-style=gnu to LDFLAGS

2010/8/10 Brian Harring <ferringb@gmail.com>

On Mon, Aug 09, 2010 at 07:05:11PM -0400, Mike Frysinger wrote:

> On Mon, Aug 9, 2010 at 7:03 PM, Markos Chandras wrote:

> > On Sat, Aug 07, 2010 at 10:16:24PM -0400, Mike Frysinger wrote:

> >> obviously you only mean linux x86/amd64 dev profiles. *i dont have a strong

> >> opinion on that small subset in either direction.

> >

> > So do you agree to make this linker option default to linux x86/amd64 dev/

> > profiles?

>

> add them or dont add them, "i dont have a [...] opinion [...] in

> either direction". *if put to a vote, i'd abstain.



Possibly a stupid question, but any reason we've not looked at

injecting something that has lower actual affect but can still be used

for a canary? *I'm thinking of --build-id specifically...



~brian

I don't know how*--hash-style=gnu is used to check for LDFLAGS, so this may be OT.
On my personal and _breakable_ desktop I do use
LDFLAGS="${LDFLAGS} -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common -Wl,--build-id"in make.conf.
Would this two liners tell me which package who install binaries in /usr/bin does not respect ldflags?

# for i in /usr/bin/* ; do eu-unstrip -n -e *$i ; done &> build-id.txt# qfile $(grep '0x[0-9]*+0x[0-9]* - ' build-id.txt | awk '{ print $3 }')

On a side note, I've noticed that build-id change at every re-compilation of the package, even if nothing changed in the system, since it's supposed to be a "160-bit SHA1 hash on the normative parts of the output contents" should it be the same if the package is compiled on the same system with no changes?

Output of the two liners for this system:
sys-apps/turbotail (/usr/bin/turbotail)app-arch/rzip (/usr/bin/runzip)app-arch/rzip (/usr/bin/rzip)dev-lang/go (/usr/bin/6a)
dev-lang/go (/usr/bin/6cov)dev-lang/go (/usr/bin/6l)dev-lang/go (/usr/bin/6nm)dev-lang/xharbour (/usr/bin/pprun)dev-lang/xharbour (/usr/bin/hbmake)dev-lang/xharbour (/usr/bin/hbdict)
dev-lang/xharbour (/usr/bin/xbscript)dev-lang/perl (/usr/bin/perl)dev-lang/perl (/usr/bin/perl5.12.1)dev-lang/R (/usr/bin/Rscript)x11-misc/xcb (/usr/bin/xcb)dev-libs/dietlibc (/usr/bin/dnsd)
dev-libs/dietlibc (/usr/bin/elftrunc)app-text/o3read (/usr/bin/utf8tolatin1)app-accessibility/festival (/usr/bin/audsp)app-accessibility/espeak (/usr/bin/espeak)sys-devel/gcc (/usr/bin/x86_64-pc-linux-gnu-gcjh-4.4.4)
sys-devel/gcc (/usr/bin/gcjh-4.4.4)sys-devel/llvm-gcc (/usr/bin/llvm-gcov)sys-devel/qconf (/usr/bin/qconf)www-plugins/lightspark (/usr/bin/lightspark)*
 
Old 08-10-2010, 08:09 PM
Mike Frysinger
 
Default Add --hash-style=gnu to LDFLAGS

On Tue, Aug 10, 2010 at 2:40 PM, Francesco R wrote:
> I don't know how*--hash-style=gnu is used to check for LDFLAGS, so this may
> be OT.

it looks to see what ELFs still have a .hash section

> On my personal and _breakable_ desktop I do use
> LDFLAGS="${LDFLAGS} -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
> -Wl,--sort-common -Wl,--build-id"
> in make.conf.
> Would this two liners tell me which package who install binaries in /usr/bin
> does not respect ldflags?
> # for i in /usr/bin/* ; do eu-unstrip -n -e *$i ; done &> build-id.txt
> # qfile $(grep '0x[0-9]*+0x[0-9]* - ' build-id.txt | awk '{ print $3 }')

way more complicated than necessary. simply do:
scanelf -qyRk.hash -F'%F#k' /usr/bin/

this is after all what portage is using now
-mike
 
Old 08-10-2010, 08:16 PM
Mike Frysinger
 
Default Add --hash-style=gnu to LDFLAGS

On Tue, Aug 10, 2010 at 4:45 AM, Brian Harring wrote:
> On Mon, Aug 09, 2010 at 07:05:11PM -0400, Mike Frysinger wrote:
>> On Mon, Aug 9, 2010 at 7:03 PM, Markos Chandras wrote:
>> > On Sat, Aug 07, 2010 at 10:16:24PM -0400, Mike Frysinger wrote:
>> >> obviously you only mean linux x86/amd64 dev profiles. *i dont have a strong
>> >> opinion on that small subset in either direction.
>> >
>> > So do you agree to make this linker option default to linux x86/amd64 dev/
>> > profiles?
>>
>> add them or dont add them, "i dont have a [...] opinion [...] in
>> either direction". *if put to a vote, i'd abstain.
>
> Possibly a stupid question, but any reason we've not looked at
> injecting something that has lower actual affect but can still be used
> for a canary? *I'm thinking of --build-id specifically...

my gut reaction there is now you're requiring even newer versions of
binutils than before, and not just to find ones that support
--build-id, but do so without bugs (that's my vague recollection of
things; perhaps i'm wrong). and you still wouldnt pass the "not safe
outside of Gentoo Linux profiles".

also, although the overhead is minor, the build id section would serve
no useful purpose that i can think once it has been merged. gnu hash
however is always used at runtime.
-mike
 
Old 08-10-2010, 09:53 PM
Markos Chandras
 
Default Add --hash-style=gnu to LDFLAGS

>
> It seems like few of our fellow developers don't know how to track
> down
> packages that don't respect LDFLAGS. Adding -Wl,--hash-style=gnu is a
> good way
> to do that. I would like to see this linker flag enabled by default on
> LDFLAGS
> (or at least for the dev/ profiles for now). Do you agree?
>
I would really really *really* appreciated if our beloved arch testers ( at least for linux amd64/x86
because they are the first who stabilize a package ) make this default
on their build boxes. It is annoying to mark a package stable when it has
*clear* QA problems.
Please make your build box stricter on QA rules and don't
mark a package stable that easy. Marking a package stable with multiple QA
warnings, is forcing QA team to either fix a *stable* package, which is
violating the policy, or doing some useless revbumps to fix QA issues which shouldn't be there if arch testers did
actual testing at the first place

Thanks

--
Markos Chandras (hwoarang)
Gentoo Linux Developer
Web: http://hwoarang.silverarrow.org
Key ID: 441AC410
Key FP: AAD0 8591 E3CD 445D 6411 3477 F7F7 1E8E 441A C410
 
Old 08-10-2010, 10:31 PM
Mike Frysinger
 
Default Add --hash-style=gnu to LDFLAGS

On Tue, Aug 10, 2010 at 5:53 PM, Markos Chandras wrote:
>> It seems like few of our fellow developers don't know how to track
>> down
>> packages that don't respect LDFLAGS. Adding -Wl,--hash-style=gnu is a
>> good way
>> to do that. I would like to see this linker flag enabled by default on
>> LDFLAGS
>> (or at least for the dev/ profiles for now). Do you agree?
>
> I would really really *really* appreciated if our beloved arch testers ( at least for linux amd64/x86
> because they are the first who stabilize a package ) make this default
> on their build boxes.

sounds like someone needs to update/extend the arch testing
documentation. random e-mails posted to random dev lists are quickly
forgotten. new arch testers however should be reading the arch tester
documnt.

> It is annoying to mark a package stable when it has *clear* QA problems.

please dont blow this out of proportion. two points:
- stabilizing newer versions of a package when there is no QA
regression is fine.
- ignoring LDFLAGS, while incorrect, is rarely going to lead to
broken packages being emerged on end users' systems. ignoring
CFLAGS/CXXFLAGS however is much more likely to result in problems for
end users when working with multilib or cross builds.
-mike
 
Old 08-11-2010, 09:11 AM
Markos Chandras
 
Default Add --hash-style=gnu to LDFLAGS

On Tue, Aug 10, 2010 at 06:31:52PM -0400, Mike Frysinger wrote:
> On Tue, Aug 10, 2010 at 5:53 PM, Markos Chandras wrote:
> >> It seems like few of our fellow developers don't know how to track
> >> down
> >> packages that don't respect LDFLAGS. Adding -Wl,--hash-style=gnu is a
> >> good way
> >> to do that. I would like to see this linker flag enabled by default on
> >> LDFLAGS
> >> (or at least for the dev/ profiles for now). Do you agree?
> >
> > I would really really *really* appreciated if our beloved arch testers ( at least for linux amd64/x86
> > because they are the first who stabilize a package ) make this default
> > on their build boxes.
>
> sounds like someone needs to update/extend the arch testing
> documentation. random e-mails posted to random dev lists are quickly
> forgotten. new arch testers however should be reading the arch tester
> documnt.
>
I will update the guide for amd64 HT and I will strongly advice the rest of
the arches to do that as well. Using my QA powerzzz I will be quite strict
from now on with arches making such stabilizations.
> > It is annoying to mark a package stable when it has *clear* QA problems.
>
> please dont blow this out of proportion. two points:
> - stabilizing newer versions of a package when there is no QA
> regression is fine.
Fair enough, still those QA need fixing. The fact that these QA probs are not
regressions doesn't mean it is ok to ignore them
> - ignoring LDFLAGS, while incorrect, is rarely going to lead to
> broken packages being emerged on end users' systems. ignoring
> CFLAGS/CXXFLAGS however is much more likely to result in problems for
> end users when working with multilib or cross builds.
> -mike
Of course. Respecting any *FLAGS is vital and definitely ony of the many
reasons we use Gentoo.

--
Markos Chandras (hwoarang)
Gentoo Linux Developer
Web: http://hwoarang.silverarrow.org
Key ID: 441AC410
Key FP: AAD0 8591 E3CD 445D 6411 3477 F7F7 1E8E 441A C410
 
Old 08-11-2010, 10:42 AM
Thilo Bangert
 
Default Add --hash-style=gnu to LDFLAGS

Markos Chandras <hwoarang@gentoo.org> said:
> On Tue, Aug 10, 2010 at 06:31:52PM -0400, Mike Frysinger wrote:
> > On Tue, Aug 10, 2010 at 5:53 PM, Markos Chandras wrote:
> > >> It seems like few of our fellow developers don't know how to track
> > >> down
> > >> packages that don't respect LDFLAGS. Adding -Wl,--hash-style=gnu
> > >> is a good way
> > >> to do that. I would like to see this linker flag enabled by
> > >> default on LDFLAGS
> > >> (or at least for the dev/ profiles for now). Do you agree?
> > >
> > > I would really really *really* appreciated if our beloved arch
> > > testers ( at least for linux amd64/x86 because they are the first
> > > who stabilize a package ) make this default on their build boxes.
> >
> > sounds like someone needs to update/extend the arch testing
> > documentation. random e-mails posted to random dev lists are quickly
> > forgotten. new arch testers however should be reading the arch
> > tester documnt.
>
> I will update the guide for amd64 HT and I will strongly advice the
> rest of the arches to do that as well. Using my QA powerzzz I will be
> quite strict from now on with arches making such stabilizations.

i agree on this.
packages on which portage complains about stuff like

dohtml: bla file not found

should not be marked stable. arch testers should not let stuff like this
pass by. of course, neither should developers.

but then again, we need better documentation of all of this.

lyckily, the wiki effort has been killed off by a recent cabal</sarcasm>

kind regards
Thilo

>
> > > It is annoying to mark a package stable when it has *clear* QA
> > > problems.
> >
> > please dont blow this out of proportion. two points:
> > - stabilizing newer versions of a package when there is no QA
> >
> > regression is fine.
>
> Fair enough, still those QA need fixing. The fact that these QA probs
> are not regressions doesn't mean it is ok to ignore them
>
> > - ignoring LDFLAGS, while incorrect, is rarely going to lead to
> >
> > broken packages being emerged on end users' systems. ignoring
> > CFLAGS/CXXFLAGS however is much more likely to result in problems for
> > end users when working with multilib or cross builds.
> > -mike
>
> Of course. Respecting any *FLAGS is vital and definitely ony of the
> many reasons we use Gentoo.
 
Old 08-12-2010, 08:35 AM
Christian Faulhammer
 
Default Add --hash-style=gnu to LDFLAGS

Hi,

Mike Frysinger <vapier@gentoo.org>:
> sounds like someone needs to update/extend the arch testing
> documentation. random e-mails posted to random dev lists are quickly
> forgotten. new arch testers however should be reading the arch tester
> documnt.

It has been added to the x86 AT guide.

V-Li

--
Christian Faulhammer, Gentoo Lisp project
<URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

<URL:http://gentoo.faulhammer.org/>
 
Old 08-13-2010, 03:11 PM
Markos Chandras
 
Default Add --hash-style=gnu to LDFLAGS

On Thu, Aug 12, 2010 at 10:35:57AM +0200, Christian Faulhammer wrote:
> Hi,
>
> Mike Frysinger <vapier@gentoo.org>:
> > sounds like someone needs to update/extend the arch testing
> > documentation. random e-mails posted to random dev lists are quickly
> > forgotten. new arch testers however should be reading the arch tester
> > documnt.
>
> It has been added to the x86 AT guide.
>
> V-Li
>
> --
> Christian Faulhammer, Gentoo Lisp project
> <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode
>
> <URL:http://gentoo.faulhammer.org/>

Could someone guide me to add --hash-style=gnu to default/linux/amd64/dev
profile? I don't want to break anything

Thanks

--
Markos Chandras (hwoarang)
Gentoo Linux Developer
Web: http://hwoarang.silverarrow.org
Key ID: 441AC410
Key FP: AAD0 8591 E3CD 445D 6411 3477 F7F7 1E8E 441A C410
 
Old 08-14-2010, 03:43 AM
Ryan Hill
 
Default Add --hash-style=gnu to LDFLAGS

On Fri, 13 Aug 2010 18:11:42 +0300
Markos Chandras <hwoarang@gentoo.org> wrote:

> Could someone guide me to add --hash-style=gnu to default/linux/amd64/dev
> profile? I don't want to break anything

The thing is, you can't right now. LDFLAGS don't stack, meaning you'd
have to do something like

--- targets/developer/make.defaults 26 Jul 2010 19:15:05 -0000 1.9
+++ targets/developer/make.defaults 14 Aug 2010 03:31:18 -0000
@@ -12,3 +12,6 @@

# Log eqawarn messages
PORTAGE_ELOG_CLASSES="${PORTAGE_ELOG_CLASSES} qa"
+
+# Help find packages not respecting LDFLAGS
+LDFLAGS="-Wl,--hash-style=gnu ${LDFLAGS}"


Which breaks boost-build (bug #293652). That's why I suggested just putting
a message in targets/developer/profile.bashrc (which is otherwise completely
useless).


--
fonts, gcc-porting, and it's all by design
toolchain, wxwidgets to keep us from losing our minds
@ gentoo.org EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662
 

Thread Tools




All times are GMT. The time now is 12:53 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org