Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 181436

Summary: dev-lang/ruby-1.8.6-r1: Ignored LDFLAGS: /usr/lib/libruby18.so.1.8.6
Product: Gentoo Linux Reporter: Arfrever Frehtes Taifersar Arahesis (RETIRED) <arfrever>
Component: New packagesAssignee: Gentoo Ruby Team <ruby>
Status: RESOLVED FIXED    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch

Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-06-09 17:01:32 UTC
/var/tmp/portage/dev-lang/ruby-1.8.6-r1/image/usr/lib/libruby18.so.1.8.6
  [ 1] .hash            HASH           00000114 000114 0017dc 04   A  3   0  4
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-06-09 17:06:06 UTC
Maybe you could elaborate on how did you come to the conclusion that your
LDFLAGS are ignored, which ones are ignored and where's the problem. The above
cryptic stuff unfortunately doesn't explain anything.
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-06-09 17:27:25 UTC
(In reply to comment #1)
> Maybe you could elaborate on how did you come to the conclusion that your
> LDFLAGS are ignored

Some LDFLAGS can change existence of some sections in ELF files. I have such (at least) 2 flags in my LDFLAGS and one of them always change existence of some sections when isn't ignored.
I changed /usr/lib/portage/bin/prepstrip, so that it now additionally runs readelf and grep and copy the output to the log file.
I perform some tests (reading emerge logs) and >99,5% of results are correct.

> which ones are ignored

All.

> and where's the problem.

Ignoring LDLFAGS increases files sizes and decreases performance.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-06-10 17:44:15 UTC
Created attachment 121677 [details, diff]
Patch
Comment 4 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2007-08-23 14:21:09 UTC
As of ruby-1.8.6, we can set EXTLDFLAGS=$LDFLAGS to feed user LDFLAGS to ruby. Something like this:

--- ruby-1.8.6-r1.ebuild        2 Jul 2007 14:50:46 -0000       1.14
+++ ruby-1.8.6-r1.ebuild        23 Aug 2007 14:19:43 -0000
@@ -86,7 +86,7 @@
                --with-sitedir=/usr/$(get_libdir)/ruby/site_ruby \
                || die "econf failed"
 
-       emake || die "emake failed"
+       emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
 }
 
 src_test() {

Arfrever, can you check if the trick works for you?
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2007-08-23 14:40:23 UTC
(In reply to comment #4)
> Arfrever, can you check if the trick works for you?

It works.
Comment 6 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2007-08-26 06:25:57 UTC
ruby-1.8.6_p36-r4 has been added to the tree. Hopefully it won't pull a new stream of bugs due to bad LDFLAGS usage :)