LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] [OT] ldconfig on Solaris, expat..

[ILUG] [OT] ldconfig on Solaris, expat..

Lars Hecking lhecking at nmrc.ie
Wed Nov 15 12:05:51 GMT 2000


Donncha O Caoimh writes:
> Having a bit of bother installing expat on a Sun box. 
> It produces xmlparse/libexpat.a which "file" tells me is a "current ar
> archive, not a dynamic executable or shared object". 
> 
> Can anyone enlighten me as to how I produce a shared lib that PHP can
> link to, and getting back to the subject, where is the Solaris version
> of ldconfig? 
 
 Solaris <= 7 doesn't have any ldconfig equivalent. Solaris 8 has crle.
 
 Creating shared libs is pretty much system dependent. With gcc on Solaris,
 you compile everything with -fPIC, and the correct Solaris linker invocation
 (you have /usr/ccs/bin in your PATH, have you?) would be something like

 ld -G [-L... -R...] -h libfoo.so.$MAJ -o libfoo.so.$VERS $OBJS

 You can leave out the -h part.

 Now, to link against shared libs: do *NOT* use LD_LIBRARY_PATH.
 It is generally frowned upon for security reasons.

 Use either "LDFLAGS = -R/path/to/foolibdir -lfoo" or

 $ LD_RUN_PATH=/path/to/foolibdir make

 Only the latter worked for me with php4, because libtool fscked up the
 LDFLAGS part.

 There :)





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell