1847986 Members
7329 Online
104022 Solutions
New Discussion

GNUld for HPUX11.11

 
SOLVED
Go to solution
Lalit Seth
Frequent Advisor

GNUld for HPUX11.11

hi,

How can i install Gnu Linker efficiently on HPUX11.11 as binutils 2.13
results in problem for ld in configure and all other works fine.

I am having gcc 3.2

Configuring for a hppa2.0w-hp-hpux11.11 host.
*** This configuration is not supported in the following
subdirectories:
ld
(Any other directories should still work fine.)
Created "Makefile" in /mnt/r4/A3P3/gccinstall/binutils-2.13 using
"mh-frag"
./config.status is unchanged
Configuring intl...
loading cache ../config.cache
checking for a BSD compatible install... ./../install-sh -c
checking how to run the C preprocessor... (cached) cc -Wp,-H256000 -E
checking whether make sets ${MAKE}... (cached) yes
checking for gcc... (cached) cc -Wp,-H256000
checking whether the C compiler (cc -Wp,-H256000 -g ) works... yes
checking whether the C compiler (cc -Wp,-H256000 -g ) is a
cross-compiler... no
checking whether we are using GNU C... (cached) no
checking for ranlib... (cached) ranlib
checking for POSIXized ISC... no
checking for ANSI C header files... (cached) yes
checking for working const... (cached) yes
checking for inline... (cached) no
checking for off_t... (cached) yes
checking for size_t... (cached) yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... (cached) no
checking for argz.h... (cached) no
checking for limits.h... (cached) yes
checking for locale.h... (cached) yes
checking for nl_types.h... (cached) yes
checking for malloc.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for values.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for getcwd... (cached) yes
checking for munmap... (cached) yes
checking for putenv... (cached) yes
checking for setenv... (cached) no
checking for setlocale... (cached) yes
checking for strchr... (cached) yes
checking for strcasecmp... (cached) yes
checking for __argz_count... (cached) no
checking for __argz_stringify... (cached) no
checking for __argz_next... (cached) no
checking for LC_MESSAGES... (cached) yes
checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking for libintl.h... (cached) no
checking for msgfmt... (cached) msgfmt
checking for gmsgfmt... (cached) msgfmt
checking for xgettext... (cached) :
creating ./config.status
creating Makefile
creating config.h
config.h is unchanged
linking ./libgettext.h to libintl.h
Configuring libiberty...
loading cache ../config.cache
checking whether to enable maintainer-specific portions of Makefiles...
no
checking for makeinfo... (cached) makeinfo
This is GNU Makeinfo version 1.55.
checking for perl... (cached) perl
checking host system type... hppa2.0w-hp-hpux11.11
checking build system type... hppa2.0w-hp-hpux11.11
checking for ar... (cached) ar
checking for ranlib... (cached) ranlib
checking for gcc... (cached) cc -Wp,-H256000
checking whether we are using GNU C... (cached) no
checking whether cc -Wp,-H256000 and cc understand -c and -o together...
(cached) yes
checking for POSIXized ISC... no
checking for working const... (cached) yes
checking for inline... (cached) no
checking for a BSD compatible install... ./../install-sh -c
xhost-mkfrag is unchanged
checking how to run the C preprocessor... (cached) cc -Wp,-H256000 -E
checking for sys/file.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for limits.h... (cached) yes
.
.
.
.
.

******************************************
* running the configure of ld results in *
******************************************

loading cache ./config.cache
checking for Cygwin environment... (cached) no
checking for mingw32 environment... (cached) no
checking host system type... hppa2.0w-hp-hpux11.11
checking target system type... hppa2.0w-hp-hpux11.11
checking build system type... hppa2.0w-hp-hpux11.11
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for POSIXized ISC... no
checking for a BSD compatible install... ./../install-sh -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... found
checking for ld used by GCC... (cached) /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... (cached) no
checking for /usr/ccs/bin/ld option to reload object files... (cached)
-r
checking for BSD-compatible nm... (cached) /usr/bin/nm -p
checking whether ln -s works... (cached) yes
checking how to recognise dependant libraries... (cached) file_magic
(s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library
checking for object suffix... (cached) o
checking for executable suffix... (cached) no
checking for ranlib... (cached) ranlib
checking for strip... (cached) strip
loading cache ./config.cache within ltconfig
checking whether -lc should be explicitly linked in... (cached) yes
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... (cached) yes
checking if gcc static flag -static works... (cached) yes
finding the maximum length of command line arguments... (cached) 393217
checking if gcc supports -c -o file.o... (cached) yes
checking if gcc supports -fno-rtti -fno-exceptions ... yes
checking whether the linker (/usr/ccs/bin/ld) supports shared
libraries... yes
checking how to hardcode library paths into programs... relink
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... hpux11.11 dld.sl
checking command to parse /usr/bin/nm -p output... ok
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
creating libtool
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -g -O2 ) works... yes
checking whether the C compiler (gcc -g -O2 ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for a BSD compatible install... ./../install-sh -c
checking how to run the C preprocessor... gcc -E
checking for ranlib... (cached) ranlib
checking for ANSI C header files... yes
checking for working const... yes
checking for inline... inline
checking for off_t... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for stdlib.h... yes
checking for unistd.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for getpagesize... yes
checking for working mmap... no
checking for argz.h... no
checking for limits.h... yes
checking for locale.h... yes
checking for nl_types.h... yes
checking for malloc.h... yes
checking for string.h... yes
checking for unistd.h... (cached) yes
checking for values.h... yes
checking for sys/param.h... yes
checking for getcwd... yes
checking for munmap... yes
checking for putenv... yes
checking for setenv... no
checking for setlocale... yes
checking for strchr... yes
checking for strcasecmp... yes
checking for __argz_count... no
checking for __argz_stringify... no
checking for __argz_next... no
checking for stpcpy... no
checking for LC_MESSAGES... yes
checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking for libintl.h... no
checking for msgfmt... msgfmt
checking for gmsgfmt... msgfmt
checking for xgettext... :
checking for catalogs to be installed... fr sv tr es
checking for executable suffix... (cached) no
checking for bison... no
checking for byacc... no
checking for flex... no
checking for lex... lex
checking for flex... (cached) lex
checking for yywrap in -ll... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... no
checking whether to enable maintainer-specific portions of Makefiles...
no
checking for string.h... (cached) yes
checking for strings.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sbrk... yes
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking whether strstr must be declared... no
checking whether free must be declared... no
checking whether sbrk must be declared... no
checking whether getenv must be declared... no
checking whether environ must be declared... no
checking whether ANSI C string concatenation works... yes
*** ld does not support target hppa2.0w-hp-hpux11.11
*** see ld/configure.tgt for supported targets

Rgds
21 REPLIES 21
H.Merijn Brand (procura
Honored Contributor

Re: GNUld for HPUX11.11

Get a gcc-3.3.3 including binutils-2.14 and gdb-6.0 from my site. Install instructions included on the pages.
As you obviously want the 64bit version, get the binary distribution for 11.11 (11i) from the 64bit column

My HP ITRC site pages can be found at

Singapore https://www.beepz.com/personal/merijn/#Gcc
Rotterdam http://www.cmve.net/~merijn/#Gcc
Seattle http://ww.hpux.ws/merijn/#Gcc

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Lalit Seth
Frequent Advisor

Re: GNUld for HPUX11.11

can i jst use binutils 2.14 with gcc 3.2
Lalit Seth
Frequent Advisor

Re: GNUld for HPUX11.11

This is my system specification.
bdhp4330 is a 9000/871/D370 + 1792MB RAM + 2*PA-RISC2.0 CPU (214.0 - 32/64bit) at 160MHz running HP-UX 11.11 (64-bit)

This is good enough for binutils 2.14 with gcc 3.2
H.Merijn Brand (procura
Honored Contributor

Re: GNUld for HPUX11.11

Yes, you could. Why?

1. GNU ld does not work on 32bit objects
2. GNU ld works fine on 64bit objects
3. As with the compiler itself, there is a 64bit GNU ld for 64bit objects, and - if you manage to build it - a 32bit version

Just bes sure that the right ld is called from the right environment. So if you use a 64bit gcc-3.2, and you want to use GNU ld for it, make sure that your $PATH is set up in a way that the first gcc found in your $PATH is the 64bit gcc, and that GNU ld is found before HP's ld.

IMHO it is still preferable to install both at the same time, because the chance is bigger that the match is better. In my binary distribution, I have rebuilt both binutils and gcc twice with eachother to get the ultimate match.

The HP porting center seems to be thinking along the same line, because they, just like me, ship binutils in the same package as gcc: see
http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-3.3.2/
What I don't like from the leading page on this build, is that they don't separate the 32bit and the 64bit builds. I can't see if the software depots (I ship as bzipped tar) they make available include the 32bit build, the 64bit build, or both

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Lalit Seth
Frequent Advisor

Re: GNUld for HPUX11.11

Is the above mentioned specification oh HPUX suggest that its an 64 bit or 32 bit.

As when i run configuire it states hppa2.0w-hp-hpux11.11 which suggest its an 32 bit.

Am i right?
H.Merijn Brand (procura
Honored Contributor

Re: GNUld for HPUX11.11

in hppa2.0w, the 'w' stands for 'wide' -> 64bit

See the FAQ on my site for all the answers to the obvious questions:
- can my system do 64bit
- do I need 64bit
- is my program 64bit

the message '*** ld does not support target hppa2.0w-hp-hpux11.11' makes me belief you are working with 64bit objects on a 11i machine (non-itanium). I may be wrong, because most GNU related programs will state 'elf64' in the configuration instead of 2.0w

Whatever your needs are, 32bit objects are usually better off with HP's ld, not GNU ld. For 64bit, I've not noticed a lot of difference. If you are using GNU ld for 32 bit objects, you could try moving GNU ld out of the way by renaming it to gnu_ld or some such and retry

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Lalit Seth
Frequent Advisor

Re: GNUld for HPUX11.11

Thnks Merijn,

I have installed gcc 3.3.3 for 11.11/64 whih used GNUld.

When i compile source with this it generates files of ELF-64 shared object file - PA-RISC 2.0 (LP64) and same applies for executable.

I wanted to link to shaed object of type PA-RISC1.1 shared library. But this results in break of GNUld.

How can i do this works.

can i convert this shared libray of PA-RISC1.1 to the compatible type using any tool.
or how can i convert output of gcc to that of stated shared library as i don't have code of the PA-RISC1.1 shared library its an ODBC Driver.

Many Thnks
H.Merijn Brand (procura
Honored Contributor

Re: GNUld for HPUX11.11

As said before: no, you can't
HP-UX does not allow binding 32bit objects and 64bit objects. If you need communication between 32bit apps and 64bit apps, use pipes, shared memory (be very careful), message ques, or plain files.

If you need to bind to existing objects, be sure to generate for the same architecture. Use the 'file' command to find out.

If you have pa1.1 objects, they are 32bit only. Always. pa1.1 does not support, never has, nor will ever, 64bit, and hence cannot be linked to 64bit objects on pa2.0w

HTH Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Lalit Seth
Frequent Advisor

Re: GNUld for HPUX11.11

So, I cannot link the 64 bit nor 32 bit shared objects produced with gcc 3.3.3 64 bit compiler.

The gcc give out 'file' as
ELF -64 bit Excutabel Object file - PA-RISC2.0(LP64)

and i wanted to link with
PA-RISC1.1 shared library or
ELF-64 shared object file
H.Merijn Brand (procura
Honored Contributor

Re: GNUld for HPUX11.11

Those ELF-64/LP64 objects/shared libs can be linked to the objects generated by that 64bit gcc, but not to the 1.1 shared libs

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Lalit Seth
Frequent Advisor

Re: GNUld for HPUX11.11

>Those ELF-64/LP64 objects/shared libs can >be linked to the objects generated by that >64bit gcc

i m unable to link with ELF-64 shared object file generated by aCC with gcc 3.3.3 64bit

I gets
skipping incompatible .../lib/libodbc.so when searching for -lodbc
skipping incompatible .../lib/libodbc.sl when searching for -lodbc
/usr/local/pa20_64/bin/ld: cannot find -lodbc
collect2: ld returned 1 exit status


How can i resolve this?
H.Merijn Brand (procura
Honored Contributor

Re: GNUld for HPUX11.11

What does

# file .../lib/libodbc.so
# file .../lib/libodbc.sl

tell us? I bet they are pa1.1 32bit

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Lalit Seth
Frequent Advisor

Re: GNUld for HPUX11.11

# file libodbc.so
libodbc.so: ELF-64 shared object file
# file libodbc.sl
libodbc.sl: ELF-64 shared object file

H.Merijn Brand (procura
Honored Contributor

Re: GNUld for HPUX11.11

BUMMER! That _is_ odd.

Could you make them available to us? URL?

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Lalit Seth
Frequent Advisor

Re: GNUld for HPUX11.11

This is a ODBC Driver Provided by DataDirect named as Connect64 for ODBC.

http://www.datadirect.com/download/downloadinstr/dl-connect64odbc421/index.ssp

where libodbc.sl is a soft link to libodbc.so

H.Merijn Brand (procura
Honored Contributor

Re: GNUld for HPUX11.11

Just to be sure, did you get this one:

HP-UX 11i IPF
Standard Pack; contains all available ODBC drivers. 20 Mb

Download now

?
That's not for HP-UX 11.00 or 11.11. It's for Itanium, which indeed is an incompatible architecture. Look at it as if you were running Intel based CPU software on a motorola M68040, a pa-risc, or powerPC. They just don't match

Enjoy, Have FUN! H.merijn
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: GNUld for HPUX11.11

I just followed the "Unix" link, and downloaded this one

HP-UX 11 and 11i (native applications)
Standard Pack; contains all available ODBC drivers 17.0 Mb
"Native HP11" applications are built with the aCC 3.x compiler on HP11 and run only on HP11

which should run. I will check

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Lalit Seth
Frequent Advisor

Re: GNUld for HPUX11.11

yes i m trying this only as other one is 32 bit and i m using gcc3.3.3 for 11.11/64.

Thnks for investigating in other one.

Anyways which is the best and suitable debugger for HPUX11.11 which can replace gdb and can perform task of debugger server as gdbserver does.

Is there any best debugger for MutiThreaded Apps for HPUX11.11 may be commerically avaiable apart from provided by HP.

Many Thnks
H.Merijn Brand (procura
Honored Contributor
Solution

Re: GNUld for HPUX11.11

You are out of luck on this one. Only two choices left

1. Switch back to 32bit for all. I've checked that second link, and all libs in there are pa-risc-1.1 32bit suitable for HP-UX 11.00 and 11.11 (11i). The package available on the link you posted can't be used at all on you machine. Drop it. Soon!
2. Ask them for a 64bit port for 11.00/11i

There are simply no other options in this case (unless you want to buy new hardware to fit the product)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Lalit Seth
Frequent Advisor

Re: GNUld for HPUX11.11

thnks,

What do you think about Debuggers avaiable.
H.Merijn Brand (procura
Honored Contributor

Re: GNUld for HPUX11.11

Get all you can find: all versions of gdb - both 32 and 64bit builds, and both public ports like mine and HP's version of the truth, adb (the mother of all debuggers), dde (the resource hog), ddd, ...

Seven Rings for the Dwarf Lords, and One Ring to Rule Them All

except that this one ring does not exist in debug land

Enjoy, Have FUN! H.Merijn [ Who still thinks that print statements are the ultimate debugging tool ]
Enjoy, Have FUN! H.Merijn