Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] gcc4, glibc-2.3.6-r3/glibc-overlay - LDFLAGS?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Wed Feb 22, 2006 5:23 pm    Post subject: [Solved] gcc4, glibc-2.3.6-r3/glibc-overlay - LDFLAGS? Reply with quote

I'm installing Gentoo on my AMD64 using the amd64 arch. Now, I installed the core system following the handbook (2005.1), and after rebooting I updated the system packages and the the world packages (emerge -uvDN system && emerge -uvDN world).

After that I went about to switch to gcc4 (unmasked gcc-4.0.2) and as I was about to use nxsty's glibc-overlay to get the AMD64 performance patches, portage was updated with glibc-2.3.6-r3 which contained all the patches, including -Bdirect and -hashvals (excluded though, needed an edited ebuild, which fixed after some fiddeling around).

I used nxsty's Glibc 2.3.90 snapshot ebuilds guide and Nesl247's Conrad Install Guide 2.0.x to help me accomplish this. I did not want to go too far out on the lim with gcc-4.1 and glibc-2.3.90.

I now have gcc-4.0.2 on my system, glibc-2.3.6-r3 with -Bdirect and -hashvals are installed, and glibc is using nptl(only). I've also added LD_BIND_DIRECT to /etc/env.d/99local:
Code:
echo "LD_BIND_DIRECT=\"1\"" >> /etc/env.d/99local


I'm about to recompile my entire system so that all packages uses my new "core" (gcc4 and glibc with patches and nptl). Since I'm going a bit out of a standard supported Gentoo path, I'm also fiddeling with my CFLAGS, CXXFLAGS and LDFLAGS.

I'm somewhat comfortable with C(XX)FLAGS), but what does LDFLAGS do? I've lurked around in Nesl247's root-overlay and he uses these LDFLAGS in make.conf:
Code:
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-Bdirect -Wl,-hashvals -Wl,-zdynsort"

Now, I've had to remove the "-Wl,-Bdirect" to compile some stuff:
Code:
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-hashvals -Wl,-zdynsort"
(Some info about -Bdirect can be found in Bug#114008)

Using the above LDFLAGS my 'emerge -e world' recompile, at least patch and ncursers packages. Since they come early in the recompile chain, I've stopped recompiling at the moment. Do I need those LDFLAGS to enable -Bdirect and -hashvals? (at least the -Wl,-Bdirect -Wl,-hashvals)?

nesl247, if you read this - your root-overlay uses a /etc/portage/package.ldflags file to fix libXfont, but reading a recent post in the portage forum (posted by you If I'm not mistaken), it is not a supported file.. I did not find the "workaround" you wrote in the post in any of the config files (was supposed to go into /etc/bash/bashrc).. How does it work ?


Last edited by Joffer on Thu Feb 23, 2006 1:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
nesl247
Veteran
Veteran


Joined: 15 Jun 2004
Posts: 1614
Location: Florida

PostPosted: Wed Feb 22, 2006 5:35 pm    Post subject: Reply with quote

You need to use nxsty's glibc overlay or the one included with my guide. Also you need to edit the glibc-2.3.6-r3 ebuild to uncomment the patches for -Bdirect, and -hashvals. Once you do that my LDFLAGS will work correctly.

Also remove /etc/portage/package.ldflags and add

Code:
[[ "$CATEGORY/$P" == "x11-libs/libXfont-1.0.0" ]] \
        && export LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-hashvals -Wl,-zdynsort"


to /etc/portage/package/bash (This will need to be created)
Back to top
View user's profile Send private message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Wed Feb 22, 2006 5:55 pm    Post subject: Reply with quote

nesl247 wrote:
You need to use nxsty's glibc overlay or the one included with my guide.
Ok? I thought most stuff needed was now included in the just released glibc-2.3.6-r3? (I did comment out the excluding stuff of the bdirect and hashvals patcheds before recompiling glibc).
nesl247 wrote:
Also you need to edit the glibc-2.3.6-r3 ebuild to uncomment the patches for -Bdirect, and -hashvals. Once you do that my LDFLAGS will work correctly.
That I did. guess I was not clear on that :)
nesl247 wrote:
Also remove /etc/portage/package.ldflags and add

Code:
[[ "$CATEGORY/$P" == "x11-libs/libXfont-1.0.0" ]] \
        && export LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-hashvals -Wl,-zdynsort"


to /etc/portage/package/bash (This will need to be created)

Ok. Just to be clear, is that a package directory with bash as a file, or a file 'package.bash' (I'm not blind, I just think it makes more sence witha package.bash file, but what do I know..)?

Hmm.. strange.. I noticed now I'm "only" using binutils-2.16.1, and not 2.16.1-r1. I guess I need to update binutils to have support for -Bdirect and -hashvals (as noted in the now obsolete Glibc overlay with amd64 performance patches! (obsolete) thread..

Edit:
Binutils v2.16.1-r1 and later v2.16.90.0.6 (nxsty's binutils overlay) installed. ncurses won't emerge with hashvals in my LDFLAGS. This worked:
Code:
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,--as-needed -Wl,-Bdirect -Wl,-zdynsort"

I have not yet converted to nxsty's glibc overlay...


Last edited by Joffer on Wed Feb 22, 2006 8:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
nesl247
Veteran
Veteran


Joined: 15 Jun 2004
Posts: 1614
Location: Florida

PostPosted: Wed Feb 22, 2006 7:56 pm    Post subject: Reply with quote

Sorry had meant binutils not glibc overlay.

Yes it is a file and it is just named "bashrc" (Not "bash" as I originally posted)
Back to top
View user's profile Send private message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Wed Feb 22, 2006 9:36 pm    Post subject: Reply with quote

nesl247 wrote:
Sorry had meant binutils not glibc overlay.
Ok. No problem. Would it be enough to use the portage masked one (2.16.1-r1) or do I need the overlay?

nesl247 wrote:
Yes it is a file and it is just named "bashrc" (Not "bash" as I originally posted)
Ok. Found your post about the subject :D For the record, the code should go into this file:
Code:
/etc/portage/bashrc


Perhaps I should have to make a new line for 'ncurses' package? Does that package compile on your system with those LDFLAGS from the root-overlay?
Back to top
View user's profile Send private message
nesl247
Veteran
Veteran


Joined: 15 Jun 2004
Posts: 1614
Location: Florida

PostPosted: Wed Feb 22, 2006 9:44 pm    Post subject: Reply with quote

It all works. You need the binutils overlay because as far as I know, the one in portage (2.16.1-r1) does not include -hashvals and something else.
Back to top
View user's profile Send private message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Wed Feb 22, 2006 11:30 pm    Post subject: Reply with quote

nesl247 wrote:
It all works. You need the binutils overlay because as far as I know, the one in portage (2.16.1-r1) does not include -hashvals and something else.

After I tried the binutils-overlay, I did not go back, so I'm still using it. I did still get error while trying to compile ncurses:
Code:
armour binutils # emerge -v ncurses
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-libs/ncurses-5.4-r6 to /
>>> md5 files   ;-) ncurses-5.5.ebuild
>>> md5 files   ;-) ncurses-5.4.20050319.ebuild
>>> md5 files   ;-) ncurses-5.4-r6.ebuild
>>> md5 files   ;-) ncurses-5.4-r5.ebuild
>>> md5 files   ;-) ncurses-5.5-r1.ebuild
>>> md5 files   ;-) files/ncurses-5.4-xterm.patch
>>> md5 files   ;-) files/digest-ncurses-5.4-r5
>>> md5 files   ;-) files/ncurses-5.4-c++-templates.patch
>>> md5 files   ;-) files/digest-ncurses-5.4-r6
>>> md5 files   ;-) files/ncurses-5.5-gfbsd.patch
>>> md5 files   ;-) files/ncurses-5.4-share-sed.patch
>>> md5 files   ;-) files/digest-ncurses-5.5
>>> md5 files   ;-) files/xterm-debian.ti
>>> md5 files   ;-) files/digest-ncurses-5.4.20050319
>>> md5 files   ;-) files/digest-ncurses-5.5-r1
>>> md5 src_uri ;-) ncurses-5.4.tar.gz
>>> Unpacking source...
>>> Unpacking ncurses-5.4.tar.gz to /var/tmp/portage/ncurses-5.4-r6/work
 * Applying ncurses-5.4-xterm.patch ...                                                                                                                                                                  [ ok ]
 * Applying ncurses-5.4-share-sed.patch ...                                                                                                                                                              [ ok ]
 * Applying ncurses-5.4-c++-templates.patch ...                                                                                                                                                          [ ok ]
>>> Source unpacked.
 * econf: updating ncurses-5.4/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating ncurses-5.4/config.sub with /usr/share/gnuconfig/config.sub
/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/lib64 --with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo --disable-termcap --with-shared --with-rcs-ids --without-ada --enable-symlinks --program-prefix= --without-debug --with-gpm --build=x86_64-pc-linux-gnu
Configuring NCURSES 5.4 ABI 5 (Thu Feb 23 01:15:09 CET 2006)
checking build system type... x86_64-pc-linux-gnu
....
(checking for stuff)
....
Appending rules for normal model (c++: termlib+ext_tinfo+base+ext_funcs)
creating headers.sh

** Configuration summary for NCURSES 5.4 20040208:

      bin directory: /usr/bin
      lib directory: /lib64
  include directory: /usr/include
      man directory: /usr/share/man
 terminfo directory: /usr/share/terminfo

cd man && make DESTDIR="" sources
make[1]: Entering directory `/var/tmp/portage/ncurses-5.4-r6/work/narrowc/man'
....
(making stuff)
....
a - ../objects/unctrl.o
a - ../objects/visbuf.o
a - ../objects/write_entry.o
a - ../objects/version.o
x86_64-pc-linux-gnu-ranlib ../lib/libncurses.a
/usr/lib/gcc/x86_64-pc-linux-gnu/4.0.2/../../../../x86_64-pc-linux-gnu/bin/ld: total time in link: 0.109983
/usr/lib/gcc/x86_64-pc-linux-gnu/4.0.2/../../../../x86_64-pc-linux-gnu/bin/ld: data size 10590936
cd ../lib && (rm -f libncurses.so.5; ln -s libncurses.so.5.4 libncurses.so.5; rm -f libncurses.so; ln -s libncurses.so.5 libncurses.so; )
make[1]: Leaving directory `/var/tmp/portage/ncurses-5.4-r6/work/narrowc/ncurses'
cd progs && make DESTDIR="" all
make[1]: Entering directory `/var/tmp/portage/ncurses-5.4-r6/work/narrowc/progs'
cd ../obj_s;  x86_64-pc-linux-gnu-gcc -I../progs -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs -DHAVE_CONFIG_H -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/../include -I. -I../include  -D_GNU_SOURCE -DNDEBUG -march=k8 -O2 -pipe -mfpmath=387 -funsafe-math-optimizations -fno-align-labels -fno-align-loops -fno-align-functions -fno-align-jumps -fPIC -c /var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/tic.c
cd ../obj_s;  x86_64-pc-linux-gnu-gcc -I../progs -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs -DHAVE_CONFIG_H -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/../include -I. -I../include  -D_GNU_SOURCE -DNDEBUG -march=k8 -O2 -pipe -mfpmath=387 -funsafe-math-optimizations -fno-align-labels -fno-align-loops -fno-align-functions -fno-align-jumps -fPIC -c /var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/dump_entry.c
cd ../obj_s;  x86_64-pc-linux-gnu-gcc -I../progs -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs -DHAVE_CONFIG_H -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/../include -I. -I../include  -D_GNU_SOURCE -DNDEBUG -march=k8 -O2 -pipe -mfpmath=387 -funsafe-math-optimizations -fno-align-labels -fno-align-loops -fno-align-functions -fno-align-jumps -fPIC -c /var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/toe.c
cd ../obj_s;  x86_64-pc-linux-gnu-gcc -I../progs -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs -DHAVE_CONFIG_H -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/../include -I. -I../include  -D_GNU_SOURCE -DNDEBUG -march=k8 -O2 -pipe -mfpmath=387 -funsafe-math-optimizations -fno-align-labels -fno-align-loops -fno-align-functions -fno-align-jumps -fPIC -c /var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/infocmp.c
cd ../obj_s;  x86_64-pc-linux-gnu-gcc -I../progs -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs -DHAVE_CONFIG_H -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/../include -I. -I../include  -D_GNU_SOURCE -DNDEBUG -march=k8 -O2 -pipe -mfpmath=387 -funsafe-math-optimizations -fno-align-labels -fno-align-loops -fno-align-functions -fno-align-jumps -fPIC -c /var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/clear.c
cd ../obj_s;  x86_64-pc-linux-gnu-gcc -I../progs -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs -DHAVE_CONFIG_H -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/../include -I. -I../include  -D_GNU_SOURCE -DNDEBUG -march=k8 -O2 -pipe -mfpmath=387 -funsafe-math-optimizations -fno-align-labels -fno-align-loops -fno-align-functions -fno-align-jumps -fPIC -c /var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/tput.c
cd ../obj_s;  x86_64-pc-linux-gnu-gcc -I../progs -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs -DHAVE_CONFIG_H -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/../include -I. -I../include  -D_GNU_SOURCE -DNDEBUG -march=k8 -O2 -pipe -mfpmath=387 -funsafe-math-optimizations -fno-align-labels -fno-align-loops -fno-align-functions -fno-align-jumps -fPIC -c /var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/tset.c
x86_64-pc-linux-gnu-gcc ../obj_s/tic.o ../obj_s/dump_entry.o -L../lib -lncurses  -Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-Bdirect -Wl,--as-needed -Wl,-hashvals -Wl,-zdynsort   -lgpm -lncurses  -I../progs -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs -DHAVE_CONFIG_H -I/var/tmp/portage/ncurses-5.4-r6/work/ncurses-5.4/progs/../include -I. -I../include  -D_GNU_SOURCE -DNDEBUG -march=k8 -O2 -pipe -mfpmath=387 -funsafe-math-optimizations -fno-align-labels -fno-align-loops -fno-align-functions -fno-align-jumps -fPIC  -o tic
../lib/libncurses.so: undefined reference to `gpm_fd'
../lib/libncurses.so: undefined reference to `Gpm_Open'
../lib/libncurses.so: undefined reference to `Gpm_GetEvent'
collect2: ld returned 1 exit status
make[1]: *** [tic] Error 1
make[1]: *** Waiting for unfinished jobs....


Code:
armour binutils # emerge info
Portage 2.0.54 (default-linux/amd64/2005.1, gcc-4.0.2, glibc-2.3.6-r3, 2.6.15-gentoo-r5-2ct x86_64)
=================================================================
System uname: 2.6.15-gentoo-r5-2ct x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.14
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1, 2.16.91.0.6
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -mfpmath=387 -funsafe-math-optimizations -fno-align-labels -fno-align-loops -fno-align-functions -fno-align-jumps"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O2 -pipe -mfpmath=387 -funsafe-math-optimizations -fno-align-labels -fno-align-loops -fno-align-functions -fno-align-jumps -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.gentoo.no/ http://ftp.du.se/pub/os/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-Bdirect -Wl,--as-needed -Wl,-hashvals -Wl,-zdynsort"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="amd64 alsa avi berkdb bitmap-fonts bzip2 crypt cups eds emboss encode expat foomaticdb fortran gif glibc-omitfp gmp gpm gstreamer imlib ipv6 jpeg kde lzw lzw-tiff mp3 mpeg ncurses nls nptl nptlonly opengl pam pdflib perl png python qt quicktime readline spell ssl symlink tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales xpm xv zlib video_cards_nvidia input_devices_keyboard input_devices_mouse userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS

Removing "-Wl,-hashvals" from my LDFLAGS makes ncurses compile just fine....
Back to top
View user's profile Send private message
nesl247
Veteran
Veteran


Joined: 15 Jun 2004
Posts: 1614
Location: Florida

PostPosted: Wed Feb 22, 2006 11:33 pm    Post subject: Reply with quote

It might be because you are on x86_64, while I use plain x86... But if it works for you then just keep the hashval off.
Back to top
View user's profile Send private message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Wed Feb 22, 2006 11:52 pm    Post subject: Reply with quote

nesl247 wrote:
It might be because you are on x86_64, while I use plain x86... But if it works for you then just keep the hashval off.
Could I just add another section to /etc/portage/bashrc like your libXfont section?
Back to top
View user's profile Send private message
nesl247
Veteran
Veteran


Joined: 15 Jun 2004
Posts: 1614
Location: Florida

PostPosted: Wed Feb 22, 2006 11:54 pm    Post subject: Reply with quote

If that is the only package that fails with it then yes.
Back to top
View user's profile Send private message
taylorpendley
n00b
n00b


Joined: 23 Jan 2006
Posts: 41

PostPosted: Thu Feb 23, 2006 12:24 am    Post subject: Reply with quote

i am on x86_64 and i use nesl's new guide and it works great. Only thing i change is instead of using gcc-4.1* i use the gcc-4.0.3 overlay. Everything compiles fine with all the recommended (ld)(c)(cxx)flags. i realized that the few issues i did have were caused by using the linux-headers-2.6.15_rc6. So its not the amd64 thats the issue.......if your going to patch glibc-2.3.6-r2 and use -Bdirect and -hashvals anyway, why not take the extra sec to just use glibc-2.3.90* and the provided binutils-overlay. Its stable. and i can personally vouch for that.
Back to top
View user's profile Send private message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Thu Feb 23, 2006 12:51 am    Post subject: Reply with quote

taylorpendley wrote:
i am on x86_64 and i use nesl's new guide and it works great. Only thing i change is instead of using gcc-4.1* i use the gcc-4.0.3 overlay. Everything compiles fine with all the recommended (ld)(c)(cxx)flags. i realized that the few issues i did have were caused by using the linux-headers-2.6.15_rc6. So its not the amd64 thats the issue.......if your going to patch glibc-2.3.6-r2 and use -Bdirect and -hashvals anyway, why not take the extra sec to just use glibc-2.3.90* and the provided binutils-overlay. Its stable. and i can personally vouch for that.

I did not patch glibc-2.3.6-r2, but used glibc-2.3.6-r3 which contains the amd64 performance updates from nxsty's old glibc-overlay. The only thing I did was comment out two lines in the glibc-2.3.6-r3 to enable -Bdirect and -hashvals.

I have not touched the linux-headers, which is still " sys-kernel/linux-headers-2.6.11-r2". Should I update them?

I am using the binutils overlay, but have stayed away from gcc-4.0.3-overlay and glibc-2.3.90-overlay. Thought I'd use as few overlays as possible... perhaps I'll just cave in and get those overlays as well... hmmm
Back to top
View user's profile Send private message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Thu Feb 23, 2006 12:52 am    Post subject: Reply with quote

nesl247 wrote:
If that is the only package that fails with it then yes.


Updated

I tried this:
Code:

armour binutils # cat /etc/portage/bashrc

# Fix LDFLAGS for libXfont
[[ "$CATEGORY/$P" == "x11-libs/libXfont-1.0.0" ]] \
        && export LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-hashvals -Wl,-zdynsort"

# Fix LDFLAGS for ncurses
[[ "$CATEGORY/$P" == "sys-libs/ncurses-5.4" ]] \
        && export LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-Bdirect -Wl,--as-needed -Wl,-zdynsort"

It worked. I tried first with "[[ "$CATEGORY/$P" == "sys-libs/ncurses-5.4-r6" ]] \" (note the -r6) and it borked the compile.


Last edited by Joffer on Thu Feb 23, 2006 12:57 am; edited 2 times in total
Back to top
View user's profile Send private message
nesl247
Veteran
Veteran


Joined: 15 Jun 2004
Posts: 1614
Location: Florida

PostPosted: Thu Feb 23, 2006 12:54 am    Post subject: Reply with quote

Woah.. Put back -Wl,-hashvals and remove --as-needed and re-compile your system. I never could get --as-needed working, hence it is not in my guide.
Back to top
View user's profile Send private message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Thu Feb 23, 2006 12:58 am    Post subject: Reply with quote

nesl247 wrote:
Woah.. Put back -Wl,-hashvals and remove --as-needed and re-compile your system. I never could get --as-needed working, hence it is not in my guide.

Ohh.. will do. Hmm.. where did I get "--as-needed" from then.. very well..
Anyway, as a sidenote.. it worked with a new section to bashrc :)
Edit: Did not work with -Wl,-hashvals back and --as-needed removed (ncurses).

Anyway. Will do a emerge -e system now, with "--as-needed" removed.

Update: An "emerge -e system" stopped at ncurses, but got away with fixing the LDFLAGS with the above fix I tried. Then it stopped at texinfo :(

I'm using 2005.1 profile, and not 2006.0... does that matter?
Back to top
View user's profile Send private message
taylorpendley
n00b
n00b


Joined: 23 Jan 2006
Posts: 41

PostPosted: Thu Feb 23, 2006 3:28 am    Post subject: Reply with quote

Joffer, if you follow the nesl guide to the "T" (exchanging the x86 for amd64 and i686 for x86_64...you get the idea) it will work. I say, cave in and do the glibc-overlay and possibly gcc-4.1*.....if your not using those cause there not stable you might want to rethink that since im using them and my system compiles emerge -e world perfectly, so im actually more stable :D

All in all, if that doesnt work it might just be easier to start over following the guide exactly. it will work.


ps. dont worry about linux-headers the 2.6.11-r3 (default) are fine.
Back to top
View user's profile Send private message
Joffer
Guru
Guru


Joined: 10 Sep 2002
Posts: 585
Location: Arendal, Norway

PostPosted: Thu Feb 23, 2006 3:32 am    Post subject: Reply with quote

Now it actually looks like I got it to work.. and thats with only one real overlay (binutils), the rest are from portage: gcc-4.0.2, glibc-2.3.6-r3 (hacked though, to enable -Bdirect and -hashvals).

I'm stubborn, and don't like to give up.. That said, I don't like to admit to it, but it looks like it was my own fault :oops: I forgot to switch to the new binutils (overlay) with binutils-config :oops: :oops: :oops:

emerge -e system is flying away as we speak.. hopefully it finishes just fine. It's compiling glibc now, which means it got past the troublesome ncurses and texinfo. ncurses probably borked because binutils did not know of -hashvals, which is only avaliable in the overlay at the moment (-Bdirect is in 2.16.1-r1 in portage).

Well, it's time for bed after a long night at work 8O Thank god we almost always learn by our mistakes.. :) Thank you all for the help I've recieved so far. Hopefully it finishes just fine by the time I get up.

Uppdate: Hurray! It worked just fine! emerge -e system && emerge -e world completed without a problem.
_________________
As of April 2006 - Athlon64 X2 4200+ 1GB RAM - amd64-2006.0 profiled system with portage 2.1_preX, ck-sources-2.6.16, glibc-2.4-r1 (overlay w/-Bdirect&-hashvals), binutils-2.16.91.0.6 (overlay), gcc-4.1, Xorg 7
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum