Operating System - HP-UX
1753835 Members
8204 Online
108806 Solutions
New Discussion юеВ

where to find patches for old machine

 
alexklein
Frequent Visitor

where to find patches for old machine

Hi all,

We have an old HPUX PARISC c3700 Workstation and when I'm trying to compile OpenSSL (64-bit) using gcc I have this error:

/usr/ccs/bin/ld: Can't find library for -ldl

When searching on the machine I can't find a file named libdl.so.

$ find / -name libdl.*
/usr/lib/pa20_64/libdl.1
/usr/lib/pa20_64/libdl.sl

When I'm looking at another HPUX, but this one is an Itanium, I can find the file there:

/usr/lib/hpux32/libdl.so
/usr/lib/hpux64/libdl.so

I read somewhere that I should install patches but I don't know where I can download them and how to apply them. I found this website but I'm not sure which file to download:
http://h20565.www2.hp.com/hpsc/swd/public/readIndex?sp4ts.oid=75232&swLangOid=8&swEnvOid=7

Here is more info about our HPUX Parisc:

uname -a
HP-UX hpux B.11.11 U 9000/785 2015318450 unlimited-user license

Thank you for your help.

 

8 REPLIES 8
Steven Schweda
Honored Contributor

Re: where to find patches for old machine

> [...] when I'm trying to compile OpenSSL (64-bit) using gcc I have
> this error:

   Which version of OpenSSL?  GCC?  How, exactly, are you "trying to
compile" it?

> [...] I can't find a file named libdl.so.

   I believe that the naming/directory conventions changed between
PA-RISC amd IA64.  So, not amazing,  (These changes also tend to confuse
some open-source software products.)

> HP-UX hpux B.11.11 [...]

   Ok.  Also known as "11i v1".  I'd bet that "another HPUX, but this
one is an Itanium" is a different version, which might also matter.

> I read somewhere that I should install patches [...]

   Which "somewhere"?   What makes you think that any patches will fix
this problem?

> [...] not sure which file to download:

   First, if you're running 11.11, then you'd want patches for 11.11.
Second, HP now provides patches only to people who have a support
contract.  Do you have one?

   Did you look for a pre-built OpenSSL kit for your HP-UX version?  My
Web search for "openssl hp-ux 11.11" found many things, including:

http://hpux.connect.org.uk/hppd/hpux/Development/Libraries/openssl-1.0.2g/

   This may all be interesting, but what's the actual problem which you
are trying to solve?

Dennis Handly
Acclaimed Contributor

Re: Where to find gcc 64 bit for PA-RISC?

As Steven said, you're not going to be able to get patches without a support contract.

 

>/usr/ccs/bin/ld: Can't find library for -ldl

>When searching on the machine I can't find a file named libdl.so.

 

You found it, PA-RISC shlibs are named .sl.  /usr/lib/pa20_64/libdl.sl

I'm not sure if there were patches to move this into PA32.  There the lib was -ldld.

Are you sure you are compiling for 64 bit?

 

 

>I found this website but I'm not sure which file to download:

 

Hmm, I'm not sure how HP Inc. thinks it can support PA-RISC workstations, when you need HP-UX Language patches, which comes from HPE.  But it looks like those are links to HPESC.

alexklein
Frequent Visitor

Re: where to find patches for old machine

Thank you Steven and Dennis for your answers.

> Which version of OpenSSL? GCC? How, exactly, are you "trying to compile" it?

  • OpenSSL 1.0.2h
  • GCC 4.2.3

I'm compiling OpenSSL to use it as a static library for my application:

./Configure hpux64-parisc2-gcc --prefix=/path/somewhere no-shared no-zlib no-zlib-dynamic no-rc5 no-idea no-ec no-ecdh no-ecdsa no-asm no-mdc2 no-bf no-cast no-md2 no-rc4 no-jpake no-gmp
make depend
make

> Ok. Also known as "11i v1". I'd bet that "another HPUX, but this one is an Itanium" is a different version, which might also matter.
True.

  • HPUX Itanium 11i v2
  • HPUX parisc 11i v1

> Which "somewhere"? What makes you think that any patches will fix this problem?
I was exchanging email with someone, and he said it's always good to apply patches on a system. Which I think it is true.

> Do you have one [support contract]?
Unfotunately no...

> Are you sure you are compiling for 64 bit?
I'm using "hpux64-parisc2-gcc" and in the Configure file of OpenSSL:

"hpux64-parisc2-gcc","gcc:-O3 -DB_ENDIAN -D_REENTRANT::::-ldl:SIXTY_FOUR_BIT_LONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC1 DES_INT::pa-risc2W.o:::::::::::::::void:dlfcn:hpux-shared:-fpic:-shared:.sl.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::/pa20_64",

But that's a good question because if I add this parameter when building OpenSSL: -L/usr/lib/pa20_64

Then it failed with a different error:

/usr/ccs/bin/ld: /usr/lib/pa20_64/libdl.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.

$ file /usr/lib/pa20_64/libdl.1
/usr/lib/pa20_64/libdl.1: ELF-64 shared object file - PA-RISC 2.0 (LP64)

 

Dennis Handly
Acclaimed Contributor

Re: Where to find gcc 64 bit for PA-RISC?

>I'm using "hpux64-parisc2-gcc" and in the Configure file of OpenSSL:

 

That doesn't seem to do the trick.  You need to compile with -mlp64.

 

>if I add this parameter when building OpenSSL: -L/usr/lib/pa20_64

>/usr/ccs/bin/ld: /usr/lib/pa20_64/libdl.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.

 

This says you compiled in 32 bit mode.

alexklein
Frequent Visitor

Re: where to find patches for old machine

Dennis,

I thought about it as well. I tried with -mlp64 but it seems for SPARC it should be -m64 (http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.2.3/)

Anyway, it is the same result using -m64 or -mlp64:

cc1: error: unrecognized command line option "-m64"

Even with a simple helloworld file:

$ gcc -m64 helloworld.c -o helloworld
cc1: error: unrecognized command line option "-m64"

Command file:

$ file /usr/local/bin/gcc
/usr/local/bin/gcc: PA-RISC2.0 shared executable dynamically linked
$ file /usr/local/bin/gmake
/usr/local/bin/gmake: PA-RISC2.0 shared executable dynamically linked
$ gcc --version
gcc (GCC) 4.2.3
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I will continue to investigate

Dennis Handly
Acclaimed Contributor

Re: Where to find gcc 64 bit for PA-RISC?

>I tried with -mlp64 but it seems for PA-RISC.

>it should be -m64 (http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.2.3/

 

That's what it is for Integrity.  You may have to download the sources to figure out what the option is.

I thought that gcc had two different compilers for PA-RISC, 32 or 64 bit:

http://h21007.www2.hpe.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=2a08725cc2f02110725cc2f02110275d6e10RCRD

 
 
alexklein
Frequent Visitor

Re: Where to find gcc 64 bit for PA-RISC?

I could build OpenSSL without installing any patches with GCC 3.4.5 (for both 32-bit and 64-bit).

At first, I downloaded GCC from http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.2.3/. But there is no 32/64 bit. The Gcc on this Website is good only from HPUX itanium.

On the Website you suggested, I tried with GCC 4.7.1 and 4.1.2 but got the error "ld: Unsatisfied symbol "pthread_mutex_unlock". Probably my ld is too old. But with Gcc 3.4.5 it is OK.

So now I should be ok. Thanks Dennis for your help.

 

Dennis Handly
Acclaimed Contributor

Re: Where to find gcc 64 bit for PA-RISC?

>got the error "ld: Unsatisfied symbol "pthread_mutex_unlock". Probably my ld is too old.

 

This has nothing to do with ld(1) but either pthread headers or libpthread.