convert 'a' lib' into 'so' lib

convert 'a' lib' into 'so' lib

Post by Donnie Payn » Sat, 17 Nov 2001 23:53:36



I am using a program that uses the glut program.  It seems that the only
version that runs on Solaris is the one for Solaris 7.  After compiling
it, it produces a 'libglut.a' file.  I am need of the 'libglut.so' file
because I use Solaris 8.

Does anyone know how to convert the 'a' lib into a 'so' lib?

Thanks in advance. . .

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Donnie Payne
Systems Administrator
Purdue University, Genomics Facility
1057 Whistler Hall, Room 207
West Lafayette,  IN   47907-1057


 Phone: 765-496-2134
 Fax: 765-496-7255
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 
 
 

convert 'a' lib' into 'so' lib

Post by Shane McDanie » Sun, 18 Nov 2001 01:04:40



> I am using a program that uses the glut program.  It seems that the only
> version that runs on Solaris is the one for Solaris 7.  After compiling
> it, it produces a 'libglut.a' file.  I am need of the 'libglut.so' file
> because I use Solaris 8.

> Does anyone know how to convert the 'a' lib into a 'so' lib?

> Thanks in advance. . .

> --

Why does using Sol 8 require that you use a shared library (.so) library?
A .a library is a static library that you can compile into your code and
never need the library again.  A .so library requires that the library
exist whereever your application resides.

If you still think that you have to have a .so library it is not
too difficult to product one.  When you compile glut simply keep an eye
out for the line that creates the .a library and use those .cpp files to create the .so.

If they do something like

g++ -c foo.cpp
g++ -c bar.cpp
ar r libglut.a foo.o bar.o

then you would need to do

g++ -fpic -c foo.cpp
g++ -fpic -c bar.cpp
g++ -o libglut.so foo.o bar.o

Typically this should work, though I dunno if the glut ppl intended for
their library to be static only and have done something in the code to
ensure this.  I also am unsure if this somehow violates their license.

-shane

 
 
 

convert 'a' lib' into 'so' lib

Post by Vic Abe » Sun, 18 Nov 2001 06:00:37



>I am using a program that uses the glut program.  It seems that the only
>version that runs on Solaris is the one for Solaris 7.  After compiling
>it, it produces a 'libglut.a' file.  I am need of the 'libglut.so' file
>because I use Solaris 8.
>Does anyone know how to convert the 'a' lib into a 'so' lib?

Yes.  Try something like this, but adjust it to your particular
circumstances.

        /opt/SUNWspro/bin/cc -G -o <library>.so \
            -h <shared library's intrinsic name> \
            -z allextract <your library>.a -L<paths, often '.'> \
            -l<other libraries as needed, e.g., -lsocket -lnsl ... -lc>

Read the cc man page in /opt/SUNWspro/man and the standard ld
man page for explanations of the options.

My thanks to the OpenSSL distribution for demonstrating this.

 
 
 

1. use lib Apache->server_root_relative('lib/perl');

1) Can someone tell me where the line below (a) is pointing to? It's from my
startup.pl file. I'm wanting it to go to "/home/perl_apache/lib/perl/."

    a) use lib Apache->server_root_relative('lib/perl');

2) The startup.pl file is at this address (b)

    b) /home/perl_apache/lib/perl/startup.pl

3) My httpd.conf is at this address (c)

    c) /opt/apache/conf/httpd.conf

Here's the error message I'm getting when trying to start Apache (d).


[error] Can't locate object method "server_root_relative" via package
"Apache" at /home/perl_apache/lib/perl/startup.pl line 5.
BEGIN failed--compilation aborted at /home/perl_apache/lib/perl/startup.pl
line 5.
Compilation failed in require at (eval 1) line 1.

[Sat Feb 15 18:37:35 2003] [error] Can't load Perl file:
/home/perl_apache/lib/perl/startup.pl for server ensim.rackshack.net:0,
exiting...

2. Boot rom burner?

3. DOSEMU: can't load lib 'libX11.so.6' ???

4. Securing an Internal Network

5. Can't load dynamic linker '/lib/ld.so'

6. ATI-TV card - will it work with RH 6.1?

7. can't map '/lib/libc.so.5.3.12' --> trouble?

8. Wierd SMP-related crash on MPX chipset

9. can't map '/lib/libc.so.5', yada yada yada

10. can't load dynamic linker '/lib/ld.so'

11. can't load library 'lib/libc.so.5'

12. sh: can't map '/lib/libc.so.5'

13. can't map '/lib/libc.so.5.3.12'