[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #65827] Cross-compilation fails with gcc 14.1.0
From: |
Brett Neumeier |
Subject: |
Re: [bug #65827] Cross-compilation fails with gcc 14.1.0 |
Date: |
Tue, 4 Jun 2024 08:58:36 -0500 |
On 6/3/24 08:30, Chet Ramey wrote:
On 6/2/24 9:43 AM, Brett Neumeier wrote:
./configure --build=x86_64-unknown-linux-gnu --host=aarch64-cbl-linux-gnu
--enable-static-link --without-bash-malloc
I get this failure:
[...]
If I add "#include <unistd.h>" to tparam.c, it builds fine.
Thanks for the report.
I'm more interested in why configuring for your cross-compilation
environment doesn't find any of the curses libraries or headers. Do
you have them installed?
Hello Mr Ramey and thank you for your email!
In my previous build, I didn't have ncurses set as a dependency of bash, so
bash was getting built first -- and then there was no ncurses for it to find.
I made sure ncurses was already available and the initial problem went away.
When I configured ncurses (6.5) using the default settings, including wide
character support, I got a different failure:
aarch64-cbl-linux-gnu-gcc -L./builtins -L./lib/readline -L./lib/readline
-L./lib/glob -L./lib/tilde -L./lib/sh
-L/home/lbl/work/sysroot/scaffolding/lib -rdynamic -I/home/lbl/work/sy
sroot/scaffolding/include -static -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 su
bst.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 lis
t.o stringlib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o
xmalloc.o signames.o -lbuiltins -lglob -lsh -lreadline -lhistory -lncurses
-ltilde
/home/lbl/work/crosstools/lib/gcc/aarch64-cbl-linux-gnu/14.1.1/../../../../aarch64-cbl-linux-gnu/bin/ld:
cannot find -lncurses: No such file or directory
I don't quite understand why having widec support caused a problem -- the bash
config.log shows:
configure:21471: checking for tgetent in -lncurses
configure:21494: aarch64-cbl-linux-gnu-gcc -o conftest
-I/home/lbl/work/sysroot/scaffolding/include
-L/home/lbl/work/sysroot/scaffolding/lib conftest.c -lncurses >&5
/home/lbl/work/crosstools/lib/gcc/aarch64-cbl-linux-gnu/14.1.1/../../../../aarch64-cbl-linux-gnu/bin/ld:
cannot find -lncurses: No such file or directory
and
configure:21510: checking for tgetent in -lncursesw
configure:21533: aarch64-cbl-linux-gnu-gcc -o conftest -I/home/lbl/work/sysroot/
scaffolding/include -L/home/lbl/work/sysroot/scaffolding/lib conftest.c -lncurs
esw >&5
configure:21533: $? = 0
configure:21543: result: yes
configure:21565: checking which library has the termcap functions
configure:21568: result: using libncursesw
so the configure seems to find libncursesw just fine, but then still tries to
link against libncurses.
When I rebuilt ncurses with `--disable-widec`, the bash build succeeds.
Thank you again for your help!
Cheers,
Brett