Issues with ldd


 
Thread Tools Search this Thread
Operating Systems Solaris Issues with ldd
# 1  
Old 07-31-2009
Issues with ldd

I tried to compile php and integrate it into apache on solaris.
It compiled ok and I created a package. If I install it on a system that has the libpng from sunfreeware, it wants to use that library instead of the system SUNWpng. It doesn't run using SMCpng, but it runs using the system SUNWpng.

If SMCpng is not installed:
bash-3.00# ldd libphp5.so | grep png
libpng12.so.0 => /usr/lib/libpng12.so.0

If SMCpng is installed:
# ldd libphp5.so | grep png
libpng12.so.0 => /usr/local/lib/libpng12.so.0


I configured the package with the below options.
LDFLAGS="-L/usr/sfw/lib -R/usr/sfw/lib -L/usr/lib -R/usr/lib -L/lib -R/lib -L/usr/local/lib -R/usr/local/lib"
LIBS="-L/usr/sfw/lib -L/usr/lib -L/lib -L/usr/local/lib"
CPPFLAGS="-I/usr/sfw/lib -I/usr/lib -I/lib -I/usr/local/lib"
PATH="/opt/SUNWspro/bin:/usr/ccs/bin:/usr/bin:/usr/sbin:/usr/sfw/bin"
export LDFLAGS LIBS PATH CPPFLAGS
./configure --prefix=/opt/php \
--with-apxs2=/opt/apache2/bin/apxs \
--with-config-file-path=/opt/apache2/etc \
--enable-dbase \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib \
--enable-mbstring \
--with-libxml-dir=/usr/local \
--with-xpm-dir=/usr \
--with-gd \
--with-tiff-dir=/usr \
--with-bz2=/usr/lib \
--enable-calendar \
--enable-bcmath \
--enable-ftp \
--enable-exif

exit $?

Thanks in advance for your help.

Last edited by Mike_the_Man; 07-31-2009 at 03:53 PM..
# 2  
Old 07-31-2009
Have you tried setting the LD_LIBRARY_PATH variable with /usr/lib before /usr/local/lib?

If that does the job then the set the LD_LIBRARY_PATH in the script that starts apache.
# 3  
Old 07-31-2009
Whenever possible- try to use `crle` instead of setting LD_LIBRARY_PATH.
# 4  
Old 07-31-2009
On that point this looks helpful:
Managing Library Paths with crle | ITworld
# 5  
Old 07-31-2009
It'd probably be easier to rearrange the -L and -R options in the linker environment variables and put /usr/sfw/lib last instead of first.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris: ldd doesn't find libraries in exported environment variable LD_LIBRARY_PATH

I have given the relevant details below. Why are the libraries in /export/home/builds/pc9x_root/960/build/powrmart/pmbuild/bin/SunOS.64.r are invisible to ldd? %setenv ... (3 Replies)
Discussion started by: old_as_a_fossil
3 Replies

2. Shell Programming and Scripting

Scheduling issues

I AM ON SOLARIS I have a script it.sh which is running fine when i execute it from shell command. But when i schedule it in crontab it is throwing error. Why and how can i resolve it ?i am clueless IT.SH #!/bin/sh ORACLE_HOME=/var/opt/oracle/product/10g; export ORACLE_HOME... (1 Reply)
Discussion started by: rafa_fed2
1 Replies

3. Emergency UNIX and Linux Support

rm -rf issues

We are using the solaris server and if i am using rm -rf to delete the directories its asking the confirmation for each and every file inside the directory.Is there any way to disable ( should not ask the confirmation) only for a particular session? (12 Replies)
Discussion started by: sureshbabuc
12 Replies

4. UNIX for Advanced & Expert Users

ldd shows the dependencies of library- oracle8i

Hi, ldd -d fgs_bin/la_daemon_flex_pipe libclntsh.so.8.0 => /oracle/app/oracle/product/8.1.7/lib/libclntsh.so.8.0 libnsl.so.1 => /usr/lib/libnsl.so.1 libsocket.so.1 => /usr/lib/libsocket.so.1 libdl.so.1 => /usr/lib/libdl.so.1 ... (3 Replies)
Discussion started by: shafi2all
3 Replies

5. Solaris

ldd output

Hello, $ldd /usr/lib/libdl.so.1 give nothing in output/ Is this library ok ? *ldd <other_lib.so> libz.so.1 => /<custom_path>/libz.so.1 libz.so.1 (SUNW_1.1) => not found with this error message, are the shared libraries (/<custom_path>/libz.so.1) always be badly compiled ? tx you (1 Reply)
Discussion started by: wolfhurt
1 Replies

6. Shell Programming and Scripting

SU issues

Hi, I have automated a build process that does the following activities. 1. check out code from cvs to a specific directory 2. build the revision checked out with 'ANT' 3. integrate the compiled code with the QA/UAT or new environment (/apps/QA or /apps/UAT or /apps/new directory) I... (1 Reply)
Discussion started by: yoi2hot4ya
1 Replies

7. UNIX for Dummies Questions & Answers

pkgadd issues

Please inform me on how I can resolve the PaTcH_MsG 8 Version message below I am running solaris 9 9/05 HW on a Sun V445. Thank you. # pkgadd SUNWqlc Processing package instance <SUNWqlc> from </var/spool/pkg> Qlogic ISP 2200/2202 Fibre Channel Device Driver (sparc)... (3 Replies)
Discussion started by: GLJ@USC
3 Replies

8. UNIX for Dummies Questions & Answers

ldd output

can anybody tell me wat does the ldd output mean.cant understand it!! (3 Replies)
Discussion started by: laddu
3 Replies

9. AIX

Getting problem in linking using "ldd"

Hi I have one libXYZ.a executable. When i did ldd on that file, it gives me error like "Cannot find /usr/ccs/lib//libpthread.a(shr_xpg5.o)". The same library is loaded by the libABC.a executable. The file location is added to "LIBPATH" variable. And also libpthread.a is present... (4 Replies)
Discussion started by: mail2virag
4 Replies

10. Programming

ldd doesn't work with 64bit .so library on AIX

I generated my shared library in 64bit on AIX, but when I ran ldd, it says: Could not load program libmylib.so: Could not load module libmylib.so. The module has an invalid magic number. Anyone knows how to list library dependencies with 64bit shared library on AIX? If you... (1 Reply)
Discussion started by: modemer
1 Replies
Login or Register to Ask a Question