[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Cannot build statically linked, working bash
From: |
thomas |
Subject: |
Cannot build statically linked, working bash |
Date: |
Sat, 28 Nov 2009 12:57:32 +0100 (CET) |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: /usr/gcc/bin/gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -m64 -march=native -O3
-fomit-frame-pointer
uname output: Linux sarkovy 2.6.31 #4 PREEMPT Tue Sep 15 23:48:23 CEST 2009
x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu
Bash Version: 4.0
Patch Level: 35
Release Status: release
Description:
I failed at building a statically linked, working bash. First of all,
the only way to build is
by giving the '--with-bash-malloc=no' argument to configure, because
otherwise the linker will
complain about multiple definitions of 'malloc' and 'free', which of
course are present in libc.
Even so, the binary resulting from the build will crash during startup,
inside the getpwuid()
function. I found a mail thread that describes a similar problem for
bash-3.2 on Solaris
http://lists.gnu.org/archive/html/bug-bash/2008-10/msg00011.html. Like
the reporter, I configured
my system to use LDAP for authentication. Only if I run bash as the
root user, which is a local
account outside the ldap directory, there is no crash and it appears to
work.
As a temporary workaround, I am currently using a dynamically linked
bash.
Repeat-By:
bash-4.0$ ./config.status --version
bash config.status 4.0-release
configured by /home/thomas/src/bash-4.0/configure, generated by GNU
Autoconf 2.63,
with options "'--prefix=/usr' '--exec-prefix='
'--enable-static-link' '--with-curses' '--with-bash-malloc=no'
'CC=/usr/gcc/bin/gcc' 'CFLAGS=-pipe -O3 -fomit-frame-pointer -march=native
-m64' 'LDFLAGS=-O3 -Wl,--enable-new-dtags,--hash-style=gnu'
'CPP=/usr/gcc/bin/cpp'"
- Cannot build statically linked, working bash,
thomas <=