|
|
Installing a Library
I'm porting my OSS stuff to HPUX. I've managed to produce what I think
is a shared library and I'd like to install it. From looking in /usr/lib
the file structure looks like:
-r--r--r-- libfoo.a
-r-xr-xr-x libfoo.1
lrwxr-xr-x libfoo.sl -> ./libfoo.1
So it looks like I just name the lib libxyz.sl and add a link but what
is the '1' for? Is that just an arbirary number used for versioning? If
so, how does one specify the backwards compatible version number while
linking the sl?
I tried and failed to find anything remotely interesting on HPs site. Is
there any reference material online somewhere?
Thanks,
Mike
|
|
0
|
|
|
|
Reply
|
Michael
|
3/26/2005 10:53:14 PM |
|
Michael B Allen wrote:
> I'm porting my OSS stuff to HPUX. I've managed to produce what I
think
> is a shared library and I'd like to install it. From looking in
/usr/lib
> the file structure looks like:
>
> -r--r--r-- libfoo.a
> -r-xr-xr-x libfoo.1
> lrwxr-xr-x libfoo.sl -> ./libfoo.1
>
> So it looks like I just name the lib libxyz.sl and add a link but
what
> is the '1' for? Is that just an arbirary number used for versioning?
If
> so, how does one specify the backwards compatible version number
while
> linking the sl?
>
> I tried and failed to find anything remotely interesting on HPs site.
Is
> there any reference material online somewhere?
>
> Thanks,
> Mike
the .1 is for implementing shared library versioning, for which you
would
use the -soname option with gcc.
you can take a look at this:
http://docs.hp.com/en/B2355-90655/ch05s08.html
|
|
0
|
|
|
|
Reply
|
ranga
|
3/27/2005 7:27:57 AM
|
|
On Sun, 27 Mar 2005 02:27:57 -0500, ranga wrote:
> the .1 is for implementing shared library versioning, for which you
> would use the -soname option with gcc.
Then I have a more elaborate question. I am writing a little cc wrapper
that normalizes arguments but emits the proper arguments for the compiler
so that I can use one Makefile for all platforms. Meaning if I do:
ccwrap -c -shared -libname foo -version 1.2.3 -lutil -lc f1.o f2.o f3.o
this would build a new command that differs depending on the C
environment. For example using gnuc on Linux it will emit:
gcc -shared -Wl,-soname,libfoo.so.1.2 \
-lutil -lc f1.o f2.o f3.o -o libfoo.so.1.2.3
whereas on OSX it would be more like:
gcc -dynamic -current_version 1.2.3 -install_name libfoo.1.2.dylib \
-lutil -lc f1.o f2.o f3.o -o libfoo.1.2.3.dylib
But for HPUX (and I think BSD is the same) I'm wondering how to
parameterize the major version number. Should I simply take the second
number like:
cc -b +h libfoo.2 -lutil -lc f1.o f2.o f3.o -o libfoo.2.sl
This will be a problem if someone actually has 1.2 and 2.2 installed
together.
Mike
|
|
0
|
|
|
|
Reply
|
Michael
|
3/30/2005 7:37:20 PM
|
|
Michael B Allen <mba2000@ioplex.com> writes:
> On Sun, 27 Mar 2005 02:27:57 -0500, ranga wrote:
>
> > the .1 is for implementing shared library versioning, for which you
> > would use the -soname option with gcc.
>
> Then I have a more elaborate question. I am writing a little cc wrapper
> that normalizes arguments but emits the proper arguments for the compiler
> so that I can use one Makefile for all platforms. Meaning if I do:
>
> ccwrap -c -shared -libname foo -version 1.2.3 -lutil -lc f1.o f2.o f3.o
>
> this would build a new command that differs depending on the C
> environment. For example using gnuc on Linux it will emit:
>
> gcc -shared -Wl,-soname,libfoo.so.1.2 \
> -lutil -lc f1.o f2.o f3.o -o libfoo.so.1.2.3
>
> whereas on OSX it would be more like:
>
> gcc -dynamic -current_version 1.2.3 -install_name libfoo.1.2.dylib \
> -lutil -lc f1.o f2.o f3.o -o libfoo.1.2.3.dylib
>
> But for HPUX (and I think BSD is the same) I'm wondering how to
> parameterize the major version number. Should I simply take the second
> number like:
>
> cc -b +h libfoo.2 -lutil -lc f1.o f2.o f3.o -o libfoo.2.sl
>
> This will be a problem if someone actually has 1.2 and 2.2 installed
> together.
>
> Mike
you can simply use the whole version number in the internal name :
cc -b -Wl,+h,libfoo.1.2 ...
if someone builds a shared library or application using this library
in the link line, the linker records this internal name as dependency
in the target. at load time the loader will look for the library by
that name (and the name can be whatever you like).
(all this is about the hp linker, not gnu)
--
ranga
|
|
0
|
|
|
|
Reply
|
ranganath
|
4/6/2005 7:43:38 AM
|
|
|
3 Replies
85 Views
(page loaded in 0.065 seconds)
Similiar Articles: how to install pthread header and lib - comp.sys.hp.hpux ...it took about 6 hours for installing Oracle 10g RAC in HP-UX ... how to install pthread ... Windows pthread / posix ... ... available in the Linux POSIX threads library. Installing PGF-TIKZ - comp.text.texmissing file, tikz library - comp.text.tex Installing PGF-TIKZ - comp.text.tex missing file, tikz library - comp.text.tex Hi, I have a problem using the tikz library. Problem of debugging into glibc functions? - comp.unix.programmer ...> > Shall I compile the glibc by myself, or shall I set other environment > parameters? You should try installing a debug symbol package for the library. Can't shl_load() a library ... - comp.sys.hp.hpux/usr/lib/dld.sl: Can't shl_load() a library containing Thread Loc ... Hello I am trying to install DBD-Informix in the following environment: HP-UX11.11 64bit Informix 9.4 ... Error when try to install ncurses gem on windows - comp.lang.ruby ...> please give me solution if any one of you know that install the ncurses library into your devkit or ping the authors and ask them to release binary gem releases. -r ... jdk 1.6 on hpux installation - /usr/lib/dld.sl: Can't find path ...jdk 1.6 on hpux installation - /usr/lib/dld.sl: Can't find path for shared library: libjli.sl Follow Where can I get access to a beta Sharepoint 2010 server - comp ...At the suggestion of Microsoft support, I am trying to install my own copy of ... 2010-beta-windows-2008-r2-server/ http://technet.microsoft.com/en-us/library ... labmate program wont install in windows xp - comp.databases ...... prompt - but you cant access the command prompt in windows xp, and it won't install ... sys.matlab... in Window XP, but failed to run in Windows 7 ... library C:\Program ... Installing perl DBD::mysql - comp.unix.solarisYou can't combine a 64bit library with a 32bit library in the same executable. ... INSTALL - How to install and configure DBD::mysql DESCRIPTION. This document describes ... getting back onto the TDS Survey GX card - comp.sys.hp48 ...When i type TDS48 and hit enter i get the message " Installing Library....Failed. For installing, insert program card in port 2". Should i install the survey card in ... How to Install Java Library | eHow.comThe Java Enterprise Edition (Java EE) is a server platform that uses the Java programming language. The Enterprise Edition differs from the Java Development Kit in ... Learning Processing: Tutorials: LibrariesHere, we will take a look at the process of downloading and installing a contributed library. Where to install them. First, locate where your Processing sketchbook. 7/20/2012 3:16:26 AM
|
|
|
|
|
|
|
|
|