[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trying to solve some missing symbols during linking (porting to Plan
From: |
Chet Ramey |
Subject: |
Re: trying to solve some missing symbols during linking (porting to Plan9) |
Date: |
Sat, 12 Oct 2024 16:45:09 -0400 |
User-agent: |
Mozilla Thunderbird |
On 10/10/24 5:38 AM, Jens Staal wrote:
Dear all,
I am currently trying to compile Bash on Plan9 (9front) using APExp (a
GNU/posix compatibility environment). I have all the bash object files
and libraries compiled and I only get one weird issue during linking:
chdir: BC: not defined
chdir: PC: not defined
chdir: UP: not defined
grepping the libraries shows that chdir is in libbuiltins.a
and that should correspond to builtins/cd.def
I think the `chdir' is a red herring.
Those are termcap/terminfo library symbols. As Branden says in his
reply, bash usually resolves those from the ncurses or terminfo
libraries. Does your posix environment have those?
The configuration process looks for a bunch of different curses/
termcap/terminfo libraries, and writes the ones it uses to the
TERMCAP_LIB and TERMCAP_DEP Makefile variables. What are those set to?
These variables are declared extern in ncurses.h/termcap.h, and historical
versions of the termcap library, including the ancient version in
lib/termcap in the bash distribution, declare them as library symbols.
The readline library expects this, so it can set the variables
accordingly. Maybe you have a version of the library that doesn't have
them as library symbols?
If you don't have curses/ncurses/terminfo, you have a couple of options.
You can compile bash without readline and line editing support by
running `configure --disable-readline'. If you want to modify the source,
you can add
char *BC;
char *UP;
char PC;
to shell.c and see if that works. But if you don't have any termcap or
ncurses library, the first option is probably the best one.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature