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 :)
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!