Operating System - HP-UX
1827211 Members
2509 Online
109716 Solutions
New Discussion

GNU software on HP-UX 11i

 
Dario_1
Trusted Contributor

GNU software on HP-UX 11i

Hi All:

I have been working on this for the last couple of weeks and I got to the point where all my objects get created (ELF-64) which is what I want. But I am getting the following error:

MonthDatatypeValidator.o HPUX/sax2Dummy.o -b -Wl,+s -Wl,+b,. -Wl,-a,shared -lp
thread -lnsl
Live child 0x40037688 (/ecometry/ecomxml/xerces-c-src2_2_0/lib/libxerces-c.sl.22
.0) PID 11960
g++: couldn't run `-Wl,+h,libxerces-c.sl.22-gcc-3.2': No such file or directory
Got a SIGCHLD; 1 unreaped children.
Reaping losing child 0x40037688 PID 11960
make[1]: *** [/ecometry/ecomxml/xerces-c-src2_2_0/lib/libxerces-c.sl.22.0] Error
1
Removing child 0x40037688 PID 11960 from chain.
Failed to remake target file `/ecometry/ecomxml/xerces-c-src2_2_0/lib/libxer
ces-c.sl.22.0'.
Finished prerequisites of target file `all'.
Giving up on target file `all'.
Finished prerequisites of target file `ALL'.
Giving up on target file `ALL'.
make[1]: Target `ALL' not remade because of errors.
make[1]: Leaving directory `/ecometry/ecomxml/xerces-c-src2_2_0/obj'
Got a SIGCHLD; 1 unreaped children.
Reaping losing child 0x40015af0 PID 11938
make: *** [/ecometry/ecomxml/xerces-c-src2_2_0/lib/libxerces-c.sl.22.0] Error 2
Removing child 0x40015af0 PID 11938 from chain.

If you look at the error (g++: couldn't run `-Wl,+h,libxerces-c.sl.22-gcc-3.2': No such file or directory) the file name should be libxerces-c.sl.22 not libxerces-c.sl.22-gcc-3.2. I don't know from where that -gcc-3.2 is coming from.

I am have a clean build of binutils 2.11 from HP as well as gcc-3.2-11.00_64 and gmake-3.79.

Any ideas or comments.

As always, thank you for your help.

Regards,

Dario
23 REPLIES 23
Ramkumar Devanathan
Honored Contributor

Re: GNU software on HP-UX 11i

Dario, check your makefile...

if possible post the makefile rule here.

- ramd.
HPE Software Rocks!
Ramkumar Devanathan
Honored Contributor

Re: GNU software on HP-UX 11i

dario,

I missed to mention this -

make -n output would also help you... it offers a dry run of the commands that would run when the build is started.

this is in case you didn't know - if you knew already and have tried this, then pl ignore this.

- ramd.
HPE Software Rocks!
Dario_1
Trusted Contributor

Re: GNU software on HP-UX 11i

Ramkumar:

Thank you for your reply. Here is my Makefile. Please note that you will be able to find the lines I changed because I did not delete them. Thank you again for your help.

Since it takes almost 30 minutes to create all the objects I am going to start again with the -n option.

Regards,

DR
Ramkumar Devanathan
Honored Contributor

Re: GNU software on HP-UX 11i

Dario,

if you can modify the makefile, try this -

in the section beginning from #=====HP Specific options=====

the last few lines are as below -

## Compiler switch to embed a library name
LD_SONAME = -Wl,+h,${SO_NAME}


Can you modify the above so that it resembles as below -

## Compiler switch to embed a library name
LD_SONAME = -Wl,+h,

if the above runs thro' fine then the SO_NAME variable is getting wrongly set somewhere.

I am unable to find its definition within this makefile.

- ramd.
HPE Software Rocks!
H.Merijn Brand (procura
Honored Contributor

Re: GNU software on HP-UX 11i

Heh, both, it is likely that Dario is using the GNU loader 'ld' instead of HP's loader, since he's in ELF64 mode [ GNU does not support building of GNUld in 32bit mode, so that clears out that case :). GNU ld does not recognize +h (or any '+' option)

Simple solution to start, is to (temporary) rename the 'ld' command in the GNU tree so it'll use HP's ld.

binutils-2.11 is rather old BTW. Cat you get your hands on 2.13.2.1 (yes, it matters)? my gcc port on http://www.cmve.net/~merijn or https://www.beepz.com/personal/merijn includes binutils 2.13, gcc-3.and gdb-5.2.1 all for ELF-64

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Dario_1
Trusted Contributor

Re: GNU software on HP-UX 11i

Ramd:

Your recommendation failed. I am downloading what Merijn recommended, but my connection is very slow. While that file gets downloaded, I will rename Gnu's ld so I can use HP's. I think that the download and the test will be finishing at the same time. I will let you know. Thx.

Dario
Ramkumar Devanathan
Honored Contributor

Re: GNU software on HP-UX 11i

Dario,

It'd fail because gnu's ld as i learn from procura's post does not support -Wl,+h options.

Thanks procura for that bit of information.

My solution was in total ignorance of this issue - so by itself, probably it'd have worked.

Thanks for your time.

- ramd.
HPE Software Rocks!
H.Merijn Brand (procura
Honored Contributor

Re: GNU software on HP-UX 11i

I might be back sunday, otherwise early next week. Bedtime over here, so don't think I'm not interested when I stay quiet for a while. I *am* interrested. I like these kind of problems.

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Ramkumar Devanathan
Honored Contributor

Re: GNU software on HP-UX 11i

Now you could try the same with ld pointing to hp's ld instead of gnu's ld.

- ramd.
HPE Software Rocks!
Dario_1
Trusted Contributor

Re: GNU software on HP-UX 11i

Guys:

I am back. Couldn't test last Friday. I am installing procura's binutils and will be running a test shortly. I will let you know.

Regards,

DR
Dario_1
Trusted Contributor

Re: GNU software on HP-UX 11i

Hi!

After re-installing the new binutils (binutils 2.13) and making some new attempts, I am still getting the error. It's still complaining about the +h.

I tried going using the new GNU ld and also with the HP one.

ld: cannot open +h: no such file or directory.

Regards,

DR
Paddy_1
Valued Contributor

Re: GNU software on HP-UX 11i

try +z instead of +h and see if this works
The sufficiency of my merit is to know that my merit is NOT sufficient
Dario_1
Trusted Contributor

Re: GNU software on HP-UX 11i

Paddy:

Thank you for your reply. Did not work.

Regards,

DR
H.Merijn Brand (procura
Honored Contributor

Re: GNU software on HP-UX 11i

# cd /your/path/to/gnu/ld-64
# mv ld ld-gnu
# ln -s /usr/bin/ld ld

Does that work?

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Dario_1
Trusted Contributor

Re: GNU software on HP-UX 11i

Procura:

That was done last week, but I totally forgot that I backed up the HP ld command and copied the GNU command to the /usr/ccs/bin directory. I was always using the GNU command. I made the change again, ran the make command and got the following error now:

tatypeValidator.o HPUX/sax2Dummy.o -b -Wl,+s -Wl,+b,. -Wl,-a,shared -lpthread
-lnsl
Live child 0x40037850 (/ecometry/ecomxml/xerces-c-src2_2_0/lib/libxerces-c.sl.22
.0) PID 5343
ld: Can't find library or mismatched ABI for -lstdc++
Fatal error.
Got a SIGCHLD; 1 unreaped children.
Reaping losing child 0x40037850 PID 5343
make[1]: *** [/ecometry/ecomxml/xerces-c-src2_2_0/lib/libxerces-c.sl.22.0] Error
1
Removing child 0x40037850 PID 5343 from chain.
Failed to remake target file `/ecometry/ecomxml/xerces-c-src2_2_0/lib/libxer
ces-c.sl.22.0'.
Finished prerequisites of target file `all'.
Giving up on target file `all'.
Finished prerequisites of target file `ALL'.
Giving up on target file `ALL'.
make[1]: Target `ALL' not remade because of errors.
make[1]: Leaving directory `/ecometry/ecomxml/xerces-c-src2_2_0/obj'
Got a SIGCHLD; 1 unreaped children.
Reaping losing child 0x40015ae8 PID 5341
make: *** [/ecometry/ecomxml/xerces-c-src2_2_0/lib/libxerces-c.sl.22.0] Error 2
Removing child 0x40015ae8 PID 5341 from chain.
/ecometry/ecomxml/xerces-c-src2_2_0/src/xercesc (root)>

I think that I have to uncomment some of the options I blocked/changed/commented in the Makefile. It is running now, I will let you know. Unless you have seen the following error (ld: Can't find library or mismatched ABI for -lstdc++
Fatal error.z)

Thx,

DR
Ramkumar Devanathan
Honored Contributor

Re: GNU software on HP-UX 11i

hi Procura,

I just turned wizard... Go ahead and congratulate me.

Dario, sorry to barge in.

and I've not got anything to add as of now for solving your problem.

Just wanted to touchbase with procura on this.

It's a great feeling - and it's been a good wait too :(

- ramd.
HPE Software Rocks!
Dario_1
Trusted Contributor

Re: GNU software on HP-UX 11i

Ramd:

That is great!!! I will be there some day. I am a member of the forums for quite a long time but I started posting my answers at the begining of this month. As you can see, we made some progress. Hopefully, it will work soon. Thank you for all your help.

Regards,

DR
Dario_1
Trusted Contributor

Re: GNU software on HP-UX 11i

Could the mismatch be caused because the ld is 32-bit? I checked the GNU ld and it is 64-bit. I also checked all the objects and they are 64-bit too.

Thank you,

DR
Ramkumar Devanathan
Honored Contributor

Re: GNU software on HP-UX 11i

Dario,

Thanks for the wishes. And do get by here quickly - All the very best wishes for that.

- ramd.
HPE Software Rocks!
H.Merijn Brand (procura
Honored Contributor

Re: GNU software on HP-UX 11i

No, not ld, but one of the other modules (like libstdc++.sl) is 32 bit. HP's ld should work fine.

a5:/u/usr/merijn/tmp/itrc 109 > find /wrk/pa* /usr/lib -name libstdc\* | xargs file
/wrk/pa20_32/lib/libstdc++.la: commands text
/wrk/pa20_32/lib/libstdc++.a: archive file -s800 relocatable library
/wrk/pa20_64/lib/libstdc++.a: archive file
/wrk/pa20_64/lib/libstdc++.la: commands text
/wrk/pa20_64/lib/libstdc++.sl.3.1: ELF-64 shared object file - PA-RISC 2.0 (LP64)
/wrk/pa20_64/lib/libstdc++.sl: ELF-64 shared object file - PA-RISC 2.0 (LP64)
/wrk/pa20_64/lib/libstdc++.sl.3: ELF-64 shared object file - PA-RISC 2.0 (LP64)
a5:/u/usr/merijn/tmp/itrc 110 >

most likely ld should need the option -L/your/path/to/GNU/lib-64

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Dario_1
Trusted Contributor

Re: GNU software on HP-UX 11i

Procura

Thank you for your reply. I added the -L option to the GNU/lib directory, but I also executed the find command and found that I only have 64-Bit.

/ (root)>find . -name libstdc\* | xargs file
./usr/local/pa20_64/lib/libstdc++.a: archive file
./usr/local/pa20_64/lib/libstdc++.la: commands text
./usr/local/pa20_64/lib/libstdc++.sl.3.1: ELF-64 shared object file - PA-R
ISC 2.0 (LP64)
./usr/local/pa20_64/lib/libstdc++.sl: ELF-64 shared object file - PA-RISC 2.0
(LP64)
./usr/local/pa20_64/lib/libstdc++.sl.3: ELF-64 shared object file - PA-RISC 2.0
(LP64)
/ (root)>

Would it be easier just to upgrade to 11.20 and compile there? If that's the case and after compiling on 11.20, Am I going to be able to use the source created using 11.20 on 11.11 as well?

Thank you again for your help.

Regards,

DR
Dario_1
Trusted Contributor

Re: GNU software on HP-UX 11i

Disregard my last two questions since I found out that 11.20 which is lli v1.5 will only run with he new Itanium Series.

Please correct me if I am wrong.

Regards,

DR
H.Merijn Brand (procura
Honored Contributor

Re: GNU software on HP-UX 11i

I won't correct you, cos' you're right :)

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn