[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Static-linking error w/ 2.05 on Solaris-2.8

From: Auteria Wally Winzer Jr.
Subject: Re: Static-linking error w/ 2.05 on Solaris-2.8
Date: Mon, 08 Oct 2001 19:12:41 -0700

"Auteria Wally Winzer Jr." wrote:

> Here's my output from a attempt to link bash statically against /etc/lib/:
> gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde 
> -L./lib/malloc -L./lib/sh -static   -pg -O6 -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 -Wl,-B,dynamic -Wl,-R/etc/lib -ldl -Wl,-B,static
> -lsocket -lnsl
> ld: fatal: option -dn and -Bdynamic are incompatible
> ld: fatal: library -ldl: not found
> ld: fatal: File processing errors. No output written to bash
> collect2: ld returned 1 exit status
> make: *** [bash] Error 1
> I guess the linking is different on Solaris 8 (gcc-2.95.3 w/ /usr/ccs/bin/ld).
> Thanks.
> - Wally Winzer Jr.

I've got it to compile w/ /etc/lib/libdl.so.1, but it also grabs the libcurses 
and libC libraries dynamically:

$ ldd ./bash
        libcurses.so.1 =>        /usr/lib/libcurses.so.1
        libdl.so.1 =>    /etc/lib/libdl.so.1
        libc.so.1 =>     /usr/lib/libc.so.1

Is there any workaround? Or is this hard-coded and we can no longer build bash 

- Wally Winzer Jr.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]