Ok ... I have seen this question for a day and was hoping someone would know the solution better than my guesses ... Here is my take on your problem :
You probably do not have a statically linkable version of your libraries, i.e. what you have is .so files while static linking is done with .a files. Linker is unable to find libc.a and similar .a files which causes the linking errors and messages like getcwd ... no.
>I'd like to use the statically linked bash as a root login shell but I don't want to use it if it's going to fail in weird and wonderful
>ways. Anybody have any knowledge of this?
I can take guesses but I guess that will not be good enough ... I would recommend a small experiment ... try a simple program which uses the symbols for which you were getting undefined errors ... It does not have to be an elegeant program, just a couple of lines that make a call and let you know if it was successful
link this program statically with your libraires and execute it .. If it works as expected, most likely this way is safe ... If all it does is compile and link but fails during execution, we may have to find a different way ...
Sorry, not much experience with AIX so could not be very helpful.
Main Topics
Browse All Topics





by: gripePosted on 2005-05-29 at 16:31:15ID: 14105948
My initial problem has been solved elsewhere and I had a followup issue. I found that the following symbols were undefined when I tried to link at the end of the compile process:
org/questi ons/archiv e/43/2004/ 05/2/ 17276 6
gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde -L./lib/sh -static -static -g -O2 -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 -lcurses -lglob -ltilde lib/intl/libintl.a -liconv -lcrypto
ld: 0711-317 ERROR: Undefined symbol: getpass_auto
ld: 0711-317 ERROR: Undefined symbol: max_pw_passlen
ld: 0711-317 ERROR: Undefined symbol: crypt_r
ld: 0711-317 ERROR: Undefined symbol: salt_len
ld: 0711-317 ERROR: Undefined symbol: encrypted_pw_passlen
ld: 0711-317 ERROR: Undefined symbol: max_history_size
ld: 0711-317 ERROR: Undefined symbol: _valid_crypted
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
I found the following solution: http://www.linuxquestions.
tried it, and it worked. (I defined the missing symbols as above in the file and everything linked without error or warning)
What I'm wondering is, these symbols must be required by something, so what is the impact of adding these stub definitions to them? I'd like to use the statically linked bash as a root login shell but I don't want to use it if it's going to fail in weird and wonderful ways. Anybody have any knowledge of this?
Much thanks.