Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 818103 - app-shells/bash: fails to build during Stage 2 prefix bootstrap on Ubuntu (/usr/bin/ld: ${EPREFIX}/tmp/usr/lib/libreadline.so: undefined reference to `tputs')
Summary: app-shells/bash: fails to build during Stage 2 prefix bootstrap on Ubuntu (/u...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-14 08:21 UTC by Sam James
Modified: 2021-10-14 08:39 UTC (History)
0 users

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


Attachments
build.log (file_818103.txt,207.18 KB, text/plain)
2021-10-14 08:21 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-14 08:21:31 UTC
Created attachment 744897 [details]
build.log

Not had a chance to look at this more so reporting either so I don't forget or so someone can help ;)

----

make[1]: Leaving directory '/home/sam/gentoo2/tmp/var/tmp/portage/app-shells/bash-5.1_p8/work/bash-5.1/lib/tilde'
rm -f bash
gcc -L./builtins -L./lib -L./lib -L./lib/glob -L./lib/tilde  -L./lib/sh  -L/home/sam/gentoo2/tmp/usr/lib -Wl,-rpath=/home/sam/gentoo2/tmp/usr/lib  -O2 -pipe -O2 -pipe    -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 assoc.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 -lglob -lsh -lreadline -lhistory -lcurses -ltilde
/usr/bin/ld: ./lib/sh/libsh.a(tmpfile.o): in function `sh_mktmpname':
tmpfile.c:(.text+0x17f): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
/usr/bin/ld: /home/sam/gentoo2/tmp/usr/lib/libreadline.so: undefined reference to `tputs'
/usr/bin/ld: /home/sam/gentoo2/tmp/usr/lib/libreadline.so: undefined reference to `tgoto'
/usr/bin/ld: /home/sam/gentoo2/tmp/usr/lib/libreadline.so: undefined reference to `tgetflag'
/usr/bin/ld: /home/sam/gentoo2/tmp/usr/lib/libreadline.so: undefined reference to `UP'
/usr/bin/ld: /home/sam/gentoo2/tmp/usr/lib/libreadline.so: undefined reference to `tgetent'
/usr/bin/ld: /home/sam/gentoo2/tmp/usr/lib/libreadline.so: undefined reference to `tgetnum'
/usr/bin/ld: /home/sam/gentoo2/tmp/usr/lib/libreadline.so: undefined reference to `PC'
/usr/bin/ld: /home/sam/gentoo2/tmp/usr/lib/libreadline.so: undefined reference to `tgetstr'
/usr/bin/ld: /home/sam/gentoo2/tmp/usr/lib/libreadline.so: undefined reference to `BC'
collect2: error: ld returned 1 exit status
make: *** [Makefile:583: bash] Error 1
 * ERROR: app-shells/bash-5.1_p8::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=app-shells/bash-5.1_p8::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-shells/bash-5.1_p8::gentoo'`.
 * The complete build log is located at '/home/sam/gentoo2/tmp/var/tmp/portage/app-shells/bash-5.1_p8/temp/build.log'.
 * The ebuild environment file is located at '/home/sam/gentoo2/tmp/var/tmp/portage/app-shells/bash-5.1_p8/temp/environment'.
 * Working directory: '/home/sam/gentoo2/tmp/var/tmp/portage/app-shells/bash-5.1_p8/work/bash-5.1'
 * S: '/home/sam/gentoo2/tmp/var/tmp/portage/app-shells/bash-5.1_p8/work/bash-5.1'

>>> Failed to emerge app-shells/bash-5.1_p8, Log file:

>>>  '/home/sam/gentoo2/tmp/var/tmp/portage/app-shells/bash-5.1_p8/temp/build.log'
 * Messages for package app-shells/bash-5.1_p8:
 * ERROR: app-shells/bash-5.1_p8::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=app-shells/bash-5.1_p8::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-shells/bash-5.1_p8::gentoo'`.
 * The complete build log is located at '/home/sam/gentoo2/tmp/var/tmp/portage/app-shells/bash-5.1_p8/temp/build.log'.
 * The ebuild environment file is located at '/home/sam/gentoo2/tmp/var/tmp/portage/app-shells/bash-5.1_p8/temp/environment'.
 * Working directory: '/home/sam/gentoo2/tmp/var/tmp/portage/app-shells/bash-5.1_p8/work/bash-5.1'
 * S: '/home/sam/gentoo2/tmp/var/tmp/portage/app-shells/bash-5.1_p8/work/bash-5.1'

Odd!  Running
  /bin/bash ./bootstrap-prefix.sh "/home/sam/gentoo2" stage2
failed! :(  Details might be found in the build log:
  /home/sam/gentoo2/tmp/var/tmp/portage/app-shells/bash-5.1_p8/temp/build.log
  (no build logs found?!?)
I have no clue, really.  Please find friendly folks in #gentoo-prefix on
irc.gentoo.org, gentoo-alt@lists.gentoo.org mailing list, or file a bug
at bugs.gentoo.org under Gentoo/Alt, Prefix Support.
Remember you might find some clues in /home/sam/gentoo2/stage2.log
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-14 08:35:00 UTC
We rely on pkg-config in readline's ebuild to figure out how to link against ncurses but in early bootstrapping stages, pkg-config may not be available.

Working on a fix.
Comment 2 Larry the Git Cow gentoo-dev 2021-10-14 08:39:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a5fe775294ede43387a38ef04a707cd1e2f9801

commit 8a5fe775294ede43387a38ef04a707cd1e2f9801
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-10-14 08:38:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-10-14 08:39:18 +0000

    sys-libs/readline: avoid underlinking libreadline in prefix bootstrap
    
    There's no guarantee we have pkg-config around super early
    on in the process and we need readline for bash.
    
    Closes: https://bugs.gentoo.org/818103
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/readline/readline-8.1_p1-r1.ebuild | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)