Operating System - HP-UX
1832552 Members
5920 Online
110043 Solutions
New Discussion

Re: Need Help with gd.sl (-> libt1.sl.4)

 
Heinrich Fink
New Member

Need Help with gd.sl (-> libt1.sl.4)

Hi everybody!

I know the installation of gd-lib has been issued in previous postings, but none of these could help me...

in Apache log I get the following:

PHP Warning: Unknown(): Unable to load dynamic library '/opt/hpws/apache/php/lib/php/extensions/gd.sl' - Unable to find library 'libt1.sl.4'. in Unknown on line 0

I installed the t1lib depot from hpux
and tried to link the missing libt1.sl.4 to libt1x.so (also tried with libt1.so) -> after that
I still get the same error message...

I also tried compiling t1lib manually but again, without success.

(I wonder why the depots are installing *.so libs (file t1lib.so says btw ELF-32 Object) instead of *.sl ELF-64 Libs...We use a Itanium 2 64-bit HPUX)

I'd really appreciate any help,

thanks in advance
10 REPLIES 10
Heinrich Fink_1
Occasional Advisor

Re: Need Help with gd.sl (-> libt1.sl.4)

Does really nobody have any hints for a solution?

Right now I'm trying to manually compile php-4.3.11 (that would build a new gd - link)
...but I'm still struggling with unresolved symbols of libphp.sl...)

Anyway, I'd be really thankful if there is a shorter way of fixing the missing link to t1lib.sl.4, which stops apache2 from loading the gd.slm, instead of rebuilding php.
Ermin Borovac
Honored Contributor

Re: Need Help with gd.sl (-> libt1.sl.4)

Please run chatr on /opt/hpws/apache/php/lib/php/extensions/gd.sl to see which directory it expects libt1.sl.4 in. Verify that link you created is in the right directory.
Heinrich Fink_1
Occasional Advisor

Re: Need Help with gd.sl (-> libt1.sl.4)

_________
root, brweb:/opt/hpws/apache/php/lib/php/extensions >> chatr gd.sl
gd.sl:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /usr/local/lib
internal name:
gd.sl
shared library list:
libt1.sl.4
libfreetype.sl.9
libXpm.sl
libpng.sl.2
libz.sl
libjpeg.sl
libc.so.1
shared vtable support disabled
explicit unloading enabled
segments:
index type address flags size
6 text 4000000000000000 z---c- D (default)
7 data 6000000000000000 ---m-- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr references disabled
address space model: default
caliper dynamic instrumentation disabled
____

seems like gd.sl looks in /usr/local/lib,
so I made the Link:

____

root, brweb:/usr/local/lib >> ln -s /usr/local/lib/hpux32/libt1.so /usr/local/lib/libt1.sl.4

___

but I still get the same message:

___

root, brweb:/opt/hpws/apache/php/lib/php/extensions >> ldd -s -v gd.sl

find library=libt1.sl.4; required by ./gd.sl
search path=/usr/local/lib (RUNPATH)
trying path=/usr/local/lib/libt1.sl.4
search path=/usr/local/lib (RPATH)
trying path=/usr/local/lib/libt1.sl.4
search path=/usr/lib/hpux64 (default)
trying path=/usr/lib/hpux64/libt1.sl.4
Unable to find library 'libt1.sl.4'.

___

by the way, both env-vars for dynamic libs are not set:

___

root, brweb:/opt/hpws/apache/php/lib/php/extensions >> echo $LD_LIBRARY_PATH
ksh: LD_LIBRARY_PATH: parameter not set
root, brweb:/opt/hpws/apache/php/lib/php/extensions >> echo $SHLIB_PATH
ksh: SHLIB_PATH: parameter not set

___

But I don't think that's the problem (as ldd prints where to look for the lib)

thanks for your answer
Ermin Borovac
Honored Contributor

Re: Need Help with gd.sl (-> libt1.sl.4)

Your gd.sl is 64-bit library and it won't be able to load 32-bit library (it looks like libt1 you have is 32-bit library).

Maybe you can try recompiling libt1 as a 64-bit library. Compiler options are +DD64 for HP's cc and -mlp64 for gcc, so take your pick.
Heinrich Fink_1
Occasional Advisor

Re: Need Help with gd.sl (-> libt1.sl.4)

yes, of course you are right...

I compiled all dependencies to ELF-64 except libXpm.sl ... which is a really nasty one...

I was not able to compile the src - pkg from

http://hpux.asknet.de/hppd/hpux/X11/Graphics/xpm-3.4k/

Xpm is a part of the X11 dist (which I should have installed, at least I have /usr/bin/X11/ - dir) -- but I can't find any xpm libs....

Again, the official depot for Itanium2 only installs a ELF-32 version.... which I can't use....

Is there a way to exclude the libXpm.sl from the gd.sl?

I don't think I'm going to need it in gd...

Ermin Borovac
Honored Contributor

Re: Need Help with gd.sl (-> libt1.sl.4)

What's the error when you are trying to build xpm shared lib? It should be matter of running 'xmkmf -a; make' in the source directory. You should find libXpm.sl in the lib subdirectory (of the source tree).
Heinrich Fink_1
Occasional Advisor

Re: Need Help with gd.sl (-> libt1.sl.4)

finally managed to compile Xpm ... the src - package for HP-UX already provides a proper Makefile (I don't even have xmkmf...)
...just had to symlink to X11 - Headers (that produced the errors)

Still have to compile libpng...and that's the next trouble (but I'm getting closer ;-)

# ./configure

stops with:

checking for zlibVersion in -lz... no
configure: error: ZLib not installed

seems like the linker can't find libz.so.
...but I have it installed in /usr/local/lib!

I even set the env-var LD_LIBRARY_PATH to /usr/local/lib.

For zlib I tried the 32-bit DEPOT-Version, manually compiled 32-bit and 64-bit Version... nothing works....argh!

thanks for helping me...
Ermin Borovac
Honored Contributor

Re: Need Help with gd.sl (-> libt1.sl.4)

In the scripts directory there should be some makefiles (makefile.hpux and makefile.hpgcc). All you need to do is copy one of them (depending on which compiler you are using) to ../makefile and modify ZLIBINC and ZLIBLIB variables.
Heinrich Fink_1
Occasional Advisor

Re: Need Help with gd.sl (-> libt1.sl.4)

Got it all working now, thanks for your help.

Alle lib-dependencies were satisfied, but I got serious version conflicts (that particular gd.sl needs png version 1.10.1, but I compiled, 1.2)

So I decided to kick that whole bundled php-dist, and recompile php with built in gd-library.

Before that I compiled all the libs with -mlp64.

To successfully compile and install you need to include -lgcc in your php build, and configure --without-pear (because installer creates segmentation fault).

I also had to mod the included libtool here and there...

But finally everything works so far...

Now I have HPUXWS-B211-1123 with php-4.4.0, gd-enabled.

If anybody needs more detailed info how I have done that, just mail to heinrich.fink@gmail.com

That was quite a struggling, but I wasn't used to all that deep compiler, linking stuff...

cheers,

Heinrich
Madhu Kangara
Frequent Advisor

Re: Need Help with gd.sl (-> libt1.sl.4)

1) Install depot t1lib-1.3-hppa-11.11.depot.
2) install new libpng library from source
I downloaded libpng-1.0.18
and compiled using following steps
a) ./configure LDFLAGS=-L/usr/local/lib

(I had already installed zlib )

make
make install

2) create symbolic links in /usr/local/lib
cd /usr/local/lib
ln -s libt1.sl libt1.sl.4
ln -s libfreetype.sl libfreetype.sl.9
ln -s /usr/local/lib/X11/libXpm.sl libXpm.sl
ln -s libpng.sl.3.0 libpng.sl.2


Stop and Start Apache. Test jpgraph library to see if all test scripts are working