Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63594 - compilation error on bash
Summary: compilation error on bash
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 All
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 64773 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-10 14:18 UTC by Slobodan D. Sredojevic
Modified: 2005-01-28 13:08 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Slobodan D. Sredojevic 2004-09-10 14:18:08 UTC
Hi,

Doing clean installation with gcc 3.4.1. Got this error (even when I switch to gcc 3.3.3) when emerging bash:

rm -f libglob.a
ar cr libglob.a glob.o strmatch.o smatch.o xmbsrtowcs.o
test -n "ranlib" && ranlib libglob.a
make[1]: Leaving directory `/var/tmp/portage/bash-3.0-r5/work/bash-3.0/lib/glob'rm -f bash
gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde  -L./lib/sh  -rdynamic  -march=pentium4 -O3 -pipe -fomit-frame-pointer -o bash shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o  dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o expr.o flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o alias.o array.o arrayfunc.o braces.o bracecomp.o bashhist.o bashline.o  list.o stringlib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o -lbuiltins -lsh -lreadline -lhistory -Wl,-Bstatic -lcurses -Wl,-Bdynamic -lglob -ltilde    -ldl
/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lcurses
collect2: ld returned 1 exit status
make: *** [bash] Error 1

!!! ERROR: app-shells/bash-3.0-r5 failed.
!!! Function src_compile, Line 122, Exitcode 2
!!! make failed


Maybe related with this bug:
http://bugs.gentoo.org/show_bug.cgi?id=51901

CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
Comment 1 SpanKY gentoo-dev 2004-09-10 15:42:45 UTC
what is a 'clean installation' ?
Comment 2 Slobodan D. Sredojevic 2004-09-10 16:08:17 UTC
Oh, I mean new installation from stage1.

Also, before latest change in ncurses ebuild (#51901) I also had error with bash but different one. Output was:

make[1]: Leaving directory `/var/tmp/portage/bash-3.0-r5/work/bash-3.0/lib/glob'
rm -f bash
gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde  - L./lib/sh  -rdynamic  -march=pentium4 -O3 -pipe -fomit-frame-pointer -o bash she ll.o eval.o y.tab.o general.o make_cmd.o print_cmd.o  dispose_cmd.o execute_cmd. o variables.o copy_cmd.o error.o expr.o flags.o jobs.o subst.o hashcmd.o hashlib .o mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o ali as.o array.o arrayfunc.o braces.o bracecomp.o bashhist.o bashline.o  list.o stri nglib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o xmalloc.o -lb uiltins -lsh -lreadline -lhistory //usr/lib/libcurses.a -lglob -ltilde    -ldl
gcc: //usr/lib/libcurses.a: No such file or directory
make: *** [bash] Error 1

!!! ERROR: app-shells/bash-3.0-r5 failed.
!!! Function src_compile, Line 122, Exitcode 2
!!! make failed
Comment 3 SpanKY gentoo-dev 2004-09-10 18:08:19 UTC
what stage1 ?  i made a few stages recently and didnt hit that error ...
Comment 4 Slobodan D. Sredojevic 2004-09-11 04:36:10 UTC
stage1-x86-2004.2.tar.bz2 grabed here:
http://mirror.etf.bg.ac.yu/gentoo/releases/x86/2004.2/stages/x86/
Comment 5 Alexander M. Turek 2004-09-14 08:58:59 UTC
Today, I had the same problem with a new x86 stage 1 installation, GCC 3.4.2 and bash 3.0-r5.
I could fix it on my machine by reverting the last two CVS revisions of that ebuild.

Revision 1.2 is the last one that works for me:

http://www.gentoo.org/cgi-bin/viewcvs.cgi/*checkout*/app-shells/bash/bash-3.0-r5.ebuild?rev=1.2

Revision 1.4 produces the error you mentioned in your initial post and with 1.3 I run into the error you mentioned in your second post.
Comment 6 Jacek Sieka 2004-09-14 12:50:44 UTC
I can confirm it for the amd64 target on a fresh install (2004.2, starting with stage1). Reverting to revision 1.2 as commented earlier resolves the bug...
Comment 7 SpanKY gentoo-dev 2004-09-14 15:27:40 UTC
ok, this looks like the stage1's were built with the version of ncurses that removed the .a libraries when USE=build

i assume you guys hit this problem when using a stage1, bootstrapping, and then doing `emerge system` for stage2 ?
Comment 8 Alexander M. Turek 2004-09-15 01:29:14 UTC
exactly
Comment 9 SpanKY gentoo-dev 2004-09-20 20:23:31 UTC
*** Bug 64773 has been marked as a duplicate of this bug. ***
Comment 10 Jacek Sieka 2004-09-21 05:52:03 UTC
Yep, that's the procedure on amd64 as well - doing an additional "emerge ncurses" after bootstrapping (this time USE obviously is not build) doesn't help.
Comment 11 SpanKY gentoo-dev 2004-09-21 08:52:18 UTC
seems to be a 'problem' with catalyst ... it punts all the .a libraries from stage1 tarballs ...

i can add a check to the bash ebuild that looks to see if `gcc -lcurses -static` works, and if it doesnt, it will use the built in termcap library instead of the system's curses library

how's that sound to eveyrone ?
Comment 12 Robert Moss (RETIRED) gentoo-dev 2004-09-21 10:44:46 UTC
vapier: I've got the same problem on a system I've been otherwise happily using for months. I'll head on over to IRC in about three hours and bug you all about it ;-p
Comment 13 Donnie Berkholz (RETIRED) gentoo-dev 2004-09-21 18:49:39 UTC
That sounds good, Mike. Could you also print an einfo about which it's using, so it's more obvious?

I'm really pretty stuck right now, because no matter what I do (even emerge -e world), I still hit this problem by default. Obviously I've got an overlay of the working ebuild, but that's an annoyance.
Comment 14 SpanKY gentoo-dev 2004-09-21 22:04:49 UTC
cvs up in a bit and try it again

spyderous confirmed it fixed it for him and i was unable to make the new version break anymore
Comment 15 Alexander Simonov 2005-01-28 13:08:54 UTC
I think problem in ncurses install procedure.
Then user add into USE unicode flag then he having some big troubles.
Some programs (I don't have any thinks why?) using not libncurses.so.(*) 
This program using libncursesw.so.(*).
And then user delete unicode from USE and rebuild ncurses (but why? may be
using emerge -e system ) he has trouble with this some programms.
I think we may remove unicode flag from ncurses and always build ncurses with unicode. Or remove symlinks of libncurses.so.(*) and using only libncurses.so.(*)
on unicode and on not unicode system. I think last way it's bad becouse we MUST
rewriting some ebuilds.