AIX Open Source

 View Only

 Building readline from SRPM AIX 7.2 - Undifiend symbols BC & UP

Douglas Irvine's profile image
Douglas Irvine posted Thu May 22, 2025 07:28 PM

Hi, I'm on AIX 7.2 (gcc 10) and am trying to build readline from source ( readline-8.2-1.src.rpm from the AIX Toolbox). I believe I have all the build requires dependencies. I have not changed the SPEC file at all. What am I missing that i'm getting these undefined symbols BC and UP?

gcc -maix64 -O2 -Wl,-bdynamic -Wl,-bnoentry -Wl,-bE:readline.exp -L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-bM:SRE -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -o libreadline.so.8 readline.so vi_mode.so funmap.so keymaps.so parens.so search.so rltty.so complete.so bind.so isearch.so display.so signals.so util.so kill.so undo.so macro.so input.so callback.so terminal.so text.so nls.so misc.so history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so tilde.so colors.so parse-colors.so xmalloc.so xfree.so compat.so -lcurses -lc
ld: 0711-317 ERROR: Undefined symbol: BC
ld: 0711-317 ERROR: Undefined symbol: UP
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status
make: *** [Makefile:182: libreadline.so.8] Error 1
make: The error code from the last command is 2.


Stop.
error: Bad exit status from /tmp/rpm/rpm-tmp.-M_Meb (%build)


RPM build errors:
    Bad exit status from /tmp/rpm/rpm-tmp.-M_Meb (%build)

Ranjit Ranjan's profile image
Ranjit Ranjan

Hi

Any reason for building the same version by yourself ?

Regarding the above error, I guess you have ncurses-devel package installed in your system. The headers file provided by this package is used while building and creating some side effects.
This means, we built AIX toolbox readline package without this ncurses-devel.

So if you want to build readline by yourself, you can unsintall this devel package temploraily then build readline using the same steps.
And once readline is built, and you do want to use ncurses-devel for some other purpose, you can install again.


Thanks
Ranjit