05-24-06 06:20 AM
Casper H.S. Dik wrote:
> "googler" <pinaki_m77@yahoo.com> writes:
>
>
>
>
> The -Wl,-soname,libstorelib.so.1 option is parsed by the Solaris linker
> as:
> -s -o name libstorelib.so.1
>
> hence the complaint about -o appearing more than once and libstorelib.so.1
> being a file not found.
>
> You want to use:
>
> -Wl,-h,libstorelib.so.1
>
> Casper
Thanks. The -h option worked fine. A couple of related questions on the
same Makefile. This is what it looks like.
all: storelib
storelib: /usr/lib/libstorelib.so
/usr/lib/libstorelib.so: $(LIB_NAME)
rm -f /usr/lib/libstorelib.so*
cp $(LIB_NAME) /usr/lib/
ldconfig
ln -sf /usr/lib/libstorelib.so.1 /usr/lib/libstorelib.so
$(LIB_NAME): $(OBJS)
g++ -shared -Wl,-soname,libstorelib.so.1 -o $(LIB_NAME)
$(OBJS) $(LIBS)
Since I cannot use ldconfig in Solaris, I am trying to use crle
instead. ldconfig when executed will create a link called
libstorelib.so.1 (which is the soname) for $(LIB_NAME) and will also
update the directory cache. I am wondering if crle can do the same
thing. From what I read on manpage, it appears that it won't create any
link for soname. Then shall I use the ln command myself to create this
link?
Here is what it looks like after my changes.
/usr/lib/libstorelib.so: $(LIB_NAME)
rm -f /usr/lib/libstorelib.so*
cp $(LIB_NAME) /usr/lib/
ln -sf /usr/lib/$(LIB_NAME) /usr/lib/libstorelib.so.1 #added
crle -u #added
ln -sf /usr/lib/libstorelib.so.1 /usr/lib/libstorelib.so
Is this OK? Will the -u option with crle update the directory cache
too?
Also, on trying to play with crle command, I saw that this command
"crle -i /lib -i /usr/lib" (for adding entries from the specified
directories into the directory cache) adds entries from the directories
/usr/openwin/lib and /usr/dt/lib too to the cache, as evident from a
subsequent "crle" command. I didn't understand why this should happen.
[ Post a follow-up to this message ]
|