On Mon, 25 Oct 1999, Stephen J Baker wrote:

> On Mon, 25 Oct 1999, Stuart Anderson wrote:
> 
> > On Mon, 25 Oct 1999, Jon Leech wrote:
> > 
> > >     Thus the libGL.1.2.lsb.1 name, albeit ugly, is IMO the way to go.
> > > Stuart, is this in fact the proper name under the LSB conventions?
> > 
> > It should be libGL.lsb.1. (lsb.1 implies the actual function list, version
> > of the spec, etc).
>  
> But we will require a symlink from libGL.so - right?  (Or is it
> that the funky Linux linker can figure out that '-lGL' means
> libGL.lsb.1 - or whatever?)

Technically, that is a development issue, and is not covered by the LSB 8-).

> > The run-time library will live in the usual place, /usr/lib. We do not
> > specify how it is implemented (could be as simple as a symlink).
> > 
> > I am still working out how to get the LSB DT_NEEDEDs in an application. The
> > two approaches are 1) a mklsb tool that goes in and changes the dynamic
> > section of an executable, or 2) a special set of libraries that you have to
> > link against that has the right name built into them.
>  
> This sounds rather ugly - could you explain?

The linker sees -lGL, goes out and looks for libGL.so in the path(s) specified
(and then looks for libGL.a if the .so isn't found). After resolving symbols,
etc against the shared library, it copies the DT_SONAME from the shared library
to the application as a DT_NEEDED.

Approach #0 (which I didn't mention above) is for everyone that ships a GL
development environment to simply set the DT_SONAME to libGL.lsb.1. This
won't work for all libraries, so it isn't a general solution.

Approach #1 is to create a new tool, called mklsb, which is invoked on the
application itself. It will convert the application to an LSB conforming
application by fixing the DT_NEEDED records to use the .lsb.1 names instead
of the .so names that it gets from the default development library.

Approach #2 is to simply create a set of link time libraries that you use
if you are building an LSB conformant application. These libraries would have
the .lsb.1 form of their names in the DT_SONAME record, and could simply
contain stubs for the functions the library provides. These libraries would
likely live in /usr/lib/LSB and allow you to use the -L option to the linker
to specifiy that you want to build an LSB application.


                                Stuart

Stuart R. Anderson                               [EMAIL PROTECTED]

Metro Link Incorporated                          South Carolina Office
4711 North Powerline Road                        129 Secret Cove Drive
Fort Lauderdale, Florida 33309                   Lexington, SC 29072
voice: 954.938.0283                              voice: 803.951.3630
fax:   954.938.1982                              SkyTel: 800.405.3401
http://www.metrolink.com/

Reply via email to