1831418 Members
3156 Online
110025 Solutions
New Discussion

Compiling a module

 
James Clay_2
Occasional Advisor

Compiling a module

Hi All,

I'm posting this on behalf of one of our developers who is having problems compiling a module in HPUX - they don't have it in LINUX or SOLARIS and so I am getting grief because of it ;-(

The problem is, I quote "Compiling libssh2 on tcmds003. Getting the following error:

gcc -o libssh2.so channel.o comp.o crypt.o hostkey.o kex.o mac.o misc.o packet.o publickey.o scp.o session.o sftp.o userauth.o -L/usr/local/lib -lcrypto -L/opt/zlib/lib -lz -shared -lm
/usr/ccs/bin/ld: CODE_ONE_SYM fixup to non-code subspace in file /usr/local/lib/libcrypto.a(md5_dgst.o) - shared library must be position independent. Use +z or +Z to recompile.
collect2: ld returned 1 exit status
gmake[1]: *** [libssh2.so] Error 1

Seems to be something in the way our openssh/openssl is compiled."

Has anyone got any ideas on this?

Thanks,

J
"Computer games don¹t affect kids, I mean if pac man affected us as kids, we¹d all be running around in darkened rooms, munching pills and listening to repetitive music."
4 REPLIES 4
A. Clay Stephenson
Acclaimed Contributor

Re: Compiling a module

I don't use gcc when compiling of HP-UX but
the message indicates that not all the modules were compiled using -fpic or -fPIC (the gcc +z and +Z equivalents). This really looks like you need libcrypto.sl rather than libcrypto.a.
If it ain't broke, I can fix that.
James Clay_2
Occasional Advisor

Re: Compiling a module

Hello,

This is what our developer hahs to say- does anyone have any further advice?

"I found this also. Problem is libcrypto is generally supplied via openssl (sometimes openssh) package which is a vendor supplied package. It is this that needs recompiling, but as it is not our software nor supplied by us, what can we do ? (except move to linux where stuff gets compiled properly and can be recompiled if necessary)..."
"Computer games don¹t affect kids, I mean if pac man affected us as kids, we¹d all be running around in darkened rooms, munching pills and listening to repetitive music."
Vincent Fleming
Honored Contributor

Re: Compiling a module

You could use the source code from a Linux box to generate a new library on HPUX - copy the code onto the HPUX machine, and recompile libcrypto. That way you can have your own version that works with the vendor's stuff...
No matter where you go, there you are.
James Clay_2
Occasional Advisor

Re: Compiling a module

Thanks for that but apparently this isn't an option for security reason!?

Any other ideas?
"Computer games don¹t affect kids, I mean if pac man affected us as kids, we¹d all be running around in darkened rooms, munching pills and listening to repetitive music."