bug-bash
[Top][All Lists]
Advanced

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

Re: collect2: ld returned 1 exit status


From: Chet Ramey
Subject: Re: collect2: ld returned 1 exit status
Date: Fri, 23 Feb 2007 16:58:17 -0500
User-agent: Thunderbird 1.5.0.9 (Macintosh/20061207)

Kasper wrote:

> x86_64-pc-linux-gnu
> 
> Bash Version: 3.2
> Patch Level: 9
> Release Status: release
> 
> make[1]: Leaving directory `/mnt/lfs/static/src/bash-3.2/lib/malloc'
> rm -f bash
> gcc -s -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob
> -L./lib/tilde -L./lib/malloc -L./lib/sh -static -static -rdynamic  -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
> -lmalloc bashline.o: In function
> `bash_groupname_completion_function': 
> /mnt/lfs/static/src/bash-3.2/bashline.c:1818:
> warning: Using 'getgrent' in statically linked applications requires at
> runtime the shared libraries from the glibc version used for
> linking

Well, it appears that this particular version of the GNU C library
doesn't allow certain interfaces to be used unless dynamically linked.
It seems to mean that you *can* link statically, but you have to
commit to shipping shared libs with the application.  That's not a
fatal problem, though.

> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../lib64/libc.a(malloc.o):
> In function `free': : multiple definition of
> `free' 
> ./lib/malloc/libmalloc.a(malloc.o):/mnt/lfs/static/src/bash-3.2/lib/malloc/malloc.c:1270:
> first defined
> here 
> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld:
> Warning: size of symbol `free' changed from 61
> in ./lib/malloc/libmalloc.a(malloc.o) to 154
> in /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../lib64/libc.a(malloc.o) 
> /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../lib64/libc.a(malloc.o):

It also seems that the GNU libc malloc implementation provides other
symbols and functions that require its internal versions of malloc and
free, restricting applications from providing their own versions.  Re-
run configure with the `--without-bash-malloc' option to force bash to
use the libc malloc.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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