[ILUG] [OT] ldconfig on Solaris, expat..
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
More information about the ILUG