[CentOS] /usr/bin/ld: cannot find -ljs aka missing link from /usr/lib64/libjs.so to /usr/lib64/libjs.so.1

Fri Jun 29 10:48:50 UTC 2007
Erik Wasser <erik.wasser at iquer.net>

Hello list,

I'm trying to compile a php4 package for centos5 and I'm stumbling 
across some "oddity" with the symbolic links of at least one library. 
But it's not a php4 problem, so read on.

The package 'js' gives the library

/usr/lib64/libjs.so.1

but shouldn't there be a link

from /usr/lib64/libjs.so to /usr/lib64/libjs.so.1?

Otherwise my compiler call

% gcc -o 
conftest -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -fno-strict-aliasing -I /usr/include/httpd -I /usr/include/apr-1 -Wl,-rpath,/lib -L/lib -ldb -lreadline -ltermcap -Wl,-rpath,/usr/kerberos/lib64 -L/usr/kerberos/lib64 
conftest.c -lexpat -lcrypt -lpspell -lpcre -lm -lgmp -ldb -lcurl -lbz2 -lz -lresolv -lm -ldl -lnsl  -lssl -lcrypto -ldl -lz -lcurl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv -ldl -lidn -lssl -lcrypto -lz -lcrypt -ljs

will only return 

/usr/bin/ld: cannot find -ljs
collect2: ld returned 1 exit status

Because ld looks for the library at different places but always with an 
plain .so extension. A call to 'ldconfig' doesn't change the situation:

% ldconfig ; find /lib{,64} /usr/lib{,64} | grep libjs.so
/usr/lib64/libjs.so.1

To make a long story short: I can create the symbolic link on my own, 
that is not a problem but I'm using mock to build my RPMs and changing 
the root enviroment seems to be a very dark side for fixing the 
problem. And the mock user can't change the root enviroment because 
he's a simple user and not root.

Is this a bug or a feature beyond my little wisdom? How can I fix this 
in an "appropriate" way? B-)

Greetings

-- 
So long... Fuzz