[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem building static version for root use under Solaris
From: |
Ralf G. R. Bergs |
Subject: |
Problem building static version for root use under Solaris |
Date: |
Wed, 15 Aug 2001 13:58:25 +0200 (MET DST) |
Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.6
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc'
-DCONF_OSTYPE='solaris2.6' -DCONF_MACHTYPE='sparc-sun-solaris2.6'
-DCONF_VENDOR='sun' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib
-I/opt/GNU/include -O2
uname output: SunOS salome 5.6 Generic_105181-26 sun4m sparc
SUNW,SPARCstation-20
Machine Type: sparc-sun-solaris2.6
Bash Version: 2.05
Patch Level: 0
Release Status: release
Description:
I'm trying to build a version of Bash that is statically linked (but has
its full feature set included) for use by "root".
I therefore configured using "--enable-static-link".
However the build process fails with the following error message:
gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde
-L./lib/malloc -L./lib/sh -s -static -static -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 braces.o bracecomp.o bashhist.o bashline.o siglist.o
list.o stringlib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o syntax.o
xmalloc.o -lbuiltins -lsh -lreadline -lhistory -ltermcap -lglob -ltilde
-lmalloc -lsocket -lnsl
Undefined first referenced
symbol in file
dlclose /usr/lib/libnsl.a(netdir.o)
dlsym /usr/lib/libnsl.a(netdir.o)
dlopen /usr/lib/libnsl.a(netdir.o)
dlerror /usr/lib/libnsl.a(netdir.o)
ld: fatal: Symbol referencing errors. No output written to bash
Obviously the problem is that "-lnsl" invokes functions defined in
"-ldl", but the latter cannot be linked statically against, according
to the Solaris 2.6 man page.
Repeat-By:
env MAKE="make -j2" CC=gcc LDFLAGS='-s' CFLAGS='-O2' CCFLAGS='-O2' \
./configure --prefix=/opt/GNU --enable-static-link
make
Fix:
No fix known (at least not by me ;-)
Thanks, guys!!
- Problem building static version for root use under Solaris,
Ralf G. R. Bergs <=