compiling bash 4.0.033

 
SOLVED
Go to solution
Denis Laroche
Occasional Advisor

compiling bash 4.0.033

$ uname -a
HP-UX wcalqa1w B.11.11 U 9000/800

I'm trying to build a 64 bit version of bash 4.0.033 on this machine from the source distribution found of the HP porting center (http://hpux.connect.org.uk). It works until ld is run to create the bash executable and then I get the following errors.

ld: Unsatisfied symbol "__strtoull" in file ./builtins/libbuiltins.a[printf.o]
ld: Unsatisfied symbol "__strtoll" in file general.o

The bash distribution has two files, strtoll.c and strtoull.c, that define strtoll() and strtoull() properly after the configure script is run. The objects of those two C files have strtoll and strtoull, which I can see with nm.

Could somebody explain to me where are references to __strtoll and __strtoull coming from, even if nothing in the bash source files is referencing those two symbols?

Thanks in advance for any help.

9 REPLIES 9
Dennis Handly
Acclaimed Contributor

Re: compiling bash 4.0.033

>Could somebody explain to me where are references to __strtoll and __strtoull coming from

There are some macros in that turn strtoimax and strtoumax to those unsats.
Unfortunately this fails in 64 bit mode because you should just use strtol or strtoul there.
Torsten.
Acclaimed Contributor

Re: compiling bash 4.0.033

Why not using the depot from http://hpux.connect.org.uk/hppd/hpux/Shells/bash-4.0.033/ ?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Denis Laroche
Occasional Advisor

Re: compiling bash 4.0.033

I don't have root access to this server. There is a non privileged moded described in the documentation of SD-UX, but that didn't work for me.

Thanks for your reply.
James R. Ferguson
Acclaimed Contributor

Re: compiling bash 4.0.033

Hi Denis:

I presume that you fetched the build-time dependencies, too since to create a fully executable package those will have to be compiled too.

> I don't have root access to this server. There is a non privileged moded described in the documentation of SD-UX, but that didn't work for me.

May I suggest (along the lines of Torsten's thinking) that you ask your Server Administrator to install a pre-built binary for you from the Porting Centre.

Regards!

...JRF...

Denis Laroche
Occasional Advisor

Re: compiling bash 4.0.033

Our servers are managed by another company (CSC), and I have to make a formal request that has to approved... too complicated.

I was able to build 64 bit versions of the build time dependencies for bash (gettext, libiconv, make and libtermcap). Does the reply from Dennis (Handly) mean that building a 64 bit version is hopeless, or could the sources be tweaked?

Thank you all for the replies.
Dennis Handly
Acclaimed Contributor
Solution

Re: compiling bash 4.0.033

>Does the reply from Dennis (Handly) mean that building a 64 bit version is hopeless, or could the sources be tweaked?

It should be trivial:
1) #undef those macros. Find why you are using strtoimax?
2) Define __strtoll and __strtoull and have them either call your function, or call the ones for long: strtol and strtoul.
Denis Laroche
Occasional Advisor

Re: compiling bash 4.0.033

Ok thanks, I'll give it a try as soon as I have a chance.
Denis Laroche
Occasional Advisor

Re: compiling bash 4.0.033

It worked!

$ which bash
/home/limpet/ex36672/tools/hppa64/bin/bash
$ file /home/limpet/ex36672/tools/hppa64/bin/bash
/home/limpet/ex36672/tools/hppa64/bin/bash: ELF-64 executable object file - PA-RISC 2.0 (LP64)

Most of the tests in the bash test suite succeded.

Thanks again to all for your replies.
Dennis Handly
Acclaimed Contributor

Re: compiling bash 4.0.033

>It worked!

If you are happy with the answers you were given, please read the following about how to assign points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33