bug-bash
[Top][All Lists]
Advanced

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

Re: undefined reference to `__strtoll'


From: Dave Moore
Subject: Re: undefined reference to `__strtoll'
Date: Fri, 12 Feb 2010 16:39:51 -0500

How do I configure the linker to use the system linker instead of gnu LD?

I really appreciate the replies!

-dave

On Thu, Feb 11, 2010 at 15:49, Greg Wooledge <wooledg@eeg.ccf.org> wrote:

> On Thu, Feb 11, 2010 at 12:58:46PM -0500, Dave Moore wrote:
> > Machine: hppa2.0w
> > OS: hpux11.00
> > Compiler: gcc
>
> > Bash Version: 4.1
> > Patch Level: 0
>
> I don't have an HP-UX 11.00 machine to test on, but:
>
> > I'm having trouble compiling bash on HP-UX 4.1.  I can't figure out how
> to
> > work around it.  Basically, the version of HP-UX I'm running on doesn't
> have
> > strtoll.
>
> It's not supposed to, as far as I'm aware.  __strtoll is an internal
> libc thing.
>
> bash-3.2# uname -sr
> HP-UX B.11.11
> bash-3.2# cd /usr/include
> bash-3.2# find . -name '*.h' -exec grep strtoll /dev/null {} +
> ./inttypes.h:extern intmax_t __strtoll (const char *, char**, int);
> ./inttypes.h:extern intmax_t __strtoll ();
> ./inttypes.h:#define strtoimax(__a, __b, __c) __strtoll(__a, __b, __c)
>
> There's no man page for "strtoll" on HP-UX 11.11 either.
>
> > So when I'm building, I see these errors:
>
> > gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob
> > -L./lib/tilde -L./lib/malloc -L./lib/sh    -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 assoc.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 -lglob -lsh
> > -lreadline -lhistory -lcurses -ltilde -lmalloc -lintl   -ldl
> > collect2: ld terminated with signal 11 [Segmentation fault], core dumped
>
> If your linker is dumping core, you've got a problem with something more
> fundamental than bash.
>
> > general.o(.text+0x334): In function `legal_number':
> > /home/dmoore/gnu/bash-4.1/general.c:175: undefined reference to
> `__strtoll'
> > braces.o(.text+0xae4): In function `brace_expand':
> > /home/dmoore/gnu/bash-4.1/braces.c:395: undefined reference to
> `__strtoll'
> > ./builtins/libbuiltins.a(printf.o)(.text+0xe6c): In function `getintmax':
> > ./printf.def:998: undefined reference to `__strtoll'
> > make: *** [bash] Error 1
>
> This also points to a problem with your toolchain.  Broken header files,
> broken linker, who knows....
>
> > My version of GCC is
> > > gcc -v
> > Using built-in specs.
> > Target: hppa64-hp-hpux11.00
> > Configured with: ../src/configure --enable-languages=c,c++
> > --prefix=/usr/local/pa20_64 --with-local-prefix=/usr/local/pa20_64
> > --with-gnu-as --with-as=/usr/local/pa20_64/bin/as --with-gnu-ld
> > --with-ld=/usr/local/pa20_64/bin/ld --disable-shared --disable-nls
> > --host=hppa64-hp-hpux11.00
> > Thread model: single
> > gcc version 4.0.0
>
> I'm using:
>
> bash-3.2# gcc -v
> Reading specs from /usr/local/lib/gcc/hppa1.1-hp-hpux11.11/3.4.6/specs
> Configured with: ../gcc-3.4.6/configure --with-gnu-as
> --with-as=/usr/local/bin/as
> Thread model: single
> gcc version 3.4.6
>
> (Yeah, I know, an hppa1.1 machine...!  That was not easy to get gcc
> bootstrapped onto.)
>
> I don't know if there's a specific problem with gcc 4.0.0 on HP-UX 11.00.
> That's an awful lot of zeros, though.  Things with "dot zero" on the end
> of them tend to scare me a bit.
>
> I see you're using GNU ld, which shouldn't be required on this platform.
> And also that ld is dumping core.  You might try upgrading your GNU
> binutils if you want to continue using GNU ld (or even just rebuilding
> your current version); or you might try configuring gcc to use the
> system's linker.
>
> In any case, I'm pretty sure it's not a bash bug that you're running into.
>
> (If/when you run into a problem with vsnprintf, *that* is a bash bug,
> fixed in one of the 4.1 patches.  You might grab the bash patches before
> your next attempt, after you get your toolchain working.)
>


reply via email to

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