Operating System - Linux
1832286 Members
2504 Online
110041 Solutions
New Discussion

Can't find dependent library "libGL.2"

 
SOLVED
Go to solution

Can't find dependent library "libGL.2"

Hi,

I have used the below machine & compiler for Qt installation.

Compiler aCC: HP ANSI C++ B3910B A.03.70
OS HP-UX B.11.11 U 9000/785 2015658734 unlimited-user license
Qt 3.3.7

and Qt is installed successfully with these :

./configure -platform hpux-acc-64 -thread stl -qt-zlib

First I got this error :

Error 43: "3rdparty/zlib/adler32.c", line 47 # C++ does not allow Old-style
(non-prototype) function definitions.
uLong ZEXPORT adler32(adler, buf, len)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This was the reply :

It sounds puzzling that you receive a C++ error, since the adler32.c
file is a C file and should be compiled with the C compiler. I

According to an installation document I had used C++ compiler but later I changed into C compiler.

Then I got this error :

aCC -AA -Aa +DA2.0W -Wl,+s -O -Wl,+b,/usr/local/qt/pushpa/64/lib -b -Wl
,-a,shared -Wl,+h,libqui.1 -Wl,+b,/usr/local/qt/pushpa/64/lib -o libqui.1 .obj/r
elease-shared-mt/qwidgetfactory.o .obj/release-shared-mt/domtool.o .obj/releas
e-shared-mt/uib.o .obj/release-shared-mt/database.o .obj/release-shared-mt/moc_
database2.o -L/usr/local/qt/pushpa/64/lib -L/opt/graphics/OpenGL/lib/pa20_64 -L
/usr/contrib/X11R6/lib/pa20_64 -L/usr/lib/X11R6/pa20_64 -lm -lqt-mt -lGLU -lGL -
lXmu -lXt -lXext -lX11 -lSM -lICE -ldl -lpthread
ln -s libqui.1 libqui.sl
rm -f ../../../lib/libqui.1
rm -f ../../../lib/libqui.sl
mv -f libqui.1 libqui.sl ../../../lib/
cd designer && make -f Makefile
/usr/local/qt/pushpa/64/bin/uic -L /usr/local/qt/pushpa/64/plugins listb
oxeditor.ui -o listboxeditor.h
/usr/lib/pa20_64/dld.sl: Unable to find library 'libGLU.2'.
*** Termination signal 9

Stop.

This was the reply :

/opt/graphics/OpenGL/lib/pa20_64 should be in
LD_LIBRARY_PATH.

After setting LD_LIBRARY_PATH to /opt/graphics/OpenGL/lib/pa20_64 it worked and I got this output :

The Qt library is now built in ./lib
The Qt examples are built in the directories in ./examples
The Qt tutorials are built in the directories in ./tutorial

Enjoy! - the Trolltech team

I wrote a small hello program using Qt interface and did make, here is the error I get :

$ make
aCC -c -AA -Aa +DA2.0W -w -D__STRICT_ANSI__D_HPUX_SOURCE -O +Osize -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -I/usr/local/qt/pushpa/64/mkspecs/hpux-acc-64 -I. -I/usr/local/qt/pushpa/64/include -o qthello.o qthello.cpp
aCC -AA -Aa +DA2.0W -Wl,+s -O -Wl,+b,/usr/local/qt/pushpa/64/lib -o qthello qthello.o -L/usr/local/qt/pushpa/64/lib -L/usr/lib/X11R6/pa20_64 -lm -lqt-mt -lXext -lX11
ld: Can't find dependent library "libGL.2"
Fatal error.
*** Error exit code 1

Stop.

I am new to this kind of error.
Could you please help me with these, I do not have any idea about Qt interface

Thanks and Regards,
Pushpa.
3 REPLIES 3
Dennis Handly
Acclaimed Contributor
Solution

Re: Can't find dependent library "libGL.2"

>ld: Can't find dependent library "libGL.2"

This is similar to the dld error you got above. You need to specify -L/opt/graphics/OpenGL/lib/pa20_64 so that ld knows where the library is at link time.

Re: Can't find dependent library "libGL.2"

Hi Dennis,

I included -L/opt/graphics/OpenGL/lib/pa20_64 while compiling but I got this error

aCC -c -AA -Aa +DA2.0W -w -D__STRICT_ANSI__D_HPUX_SOURCE -O +Osize +Z -D_XOPEN_SOURCE_EXTENDED -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -g -I/usr/local/qt/pushpa/64/mkspecs/hpux-acc-64 -I. -I.. -I/usr/local/qt/pushpa/64/include -Imoc/ -o obj/databaseBViewNG.o databaseBViewNG.cpp
Error 419: "/usr/include/sys/vfs.h", line 97 # 'u_int' is used as a type, but
has not been defined as a type.
u_int vfs_ihead_origin ; /* for INOHASH()ing */
^^^^^
*** Error exit code 2

Stop.
*** Error exit code 1

Stop.


Please help me with this.

Thanks and Regards,
Pushpa.
Dennis Handly
Acclaimed Contributor

Re: Can't find dependent library "libGL.2"

(You should remove -w from your compile line. And add +W### for each warning you don't want. That way you may see warnings that may point to user errors.
You should also change +DA2.0W to +DD64.)

>I included -L/opt/graphics/OpenGL/lib/pa20_64 while compiling but I got this error

I don't see any evidence you added it. Perhaps you got past your link error and blew up in compiling something else?

Error 419: "/usr/include/sys/vfs.h", line 97 # 'u_int' is used as a type, but has not been defined as a type.

You can't expect kernel headers to to compile cleanly without including other headers or passing the right -Ds. It appears this is broken:
-D__STRICT_ANSI__D_HPUX_SOURCE

I don't know about the beginning but you need -D_HPUX_SOURCE. (This seems strange since it should be the aCC default, unless another stdsyms -D is set.)