SOLVED:strange : "cannot find GL library" for an Ubuntu user

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
chocard
Trader
Trader
Posts: 30
Joined: Mon Oct 23, 2006 9:47 am

SOLVED:strange : "cannot find GL library" for an Ubuntu user

Post by chocard »

Hello,

Ubuntu user, I'm triying to configure Vega Strike but it's unable to find the OpenGL librairies.
---------
checking for GL library... no
checking for GL library (with pthreads)... no
checking for MesaGL library... no
checking for MesaGL library (with pthreads)... no
checking for opengl32 library... no
checking for opengl32 library (with pthreads)... no
*** Hmm, you don't seem to have OpenGL libraries installed in the standard
*** location (/usr/lib). I'll check in /usr/X11R6/lib, since
*** many distributions (incorrectly) put OpenGL libs there.
checking for GL library... no
checking for GL library (with pthreads)... no
checking for MesaGL library... no
checking for MesaGL library (with pthreads)... no
checking for opengl32 library... no
checking for opengl32 library (with pthreads)... no
configure: error: Cannot find GL library
---------------------

The message is fun but I know I have the library. What can I do ?

My config.log in attached.

Thanks in advance.
You do not have the required permissions to view the files attached to this post.
Last edited by chocard on Mon May 03, 2010 3:29 pm, edited 1 time in total.
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: strange : "cannot find GL library" for an Ubuntu user

Post by CLoneWolf »

chocard wrote:The message is fun but I know I have the library. What can I do ?
You mean you also installed the -dev packages of the relevant libraries, right?
chocard
Trader
Trader
Posts: 30
Joined: Mon Oct 23, 2006 9:47 am

Re: strange : "cannot find GL library" for an Ubuntu user

Post by chocard »

yes :
libqt4-opengl-dev
mesa-common-dev
libgl1-mesa-dev
libglu1-mesa-dev
libglw1-mesa-dev
freeglut3-dev

(I don't know if all are relevant but all are in ! :oops: )
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: strange : "cannot find GL library" for an Ubuntu user

Post by CLoneWolf »

I'm using Debian Sid and my last compile happened long ago, but in case here's the result of ldd for my executable, it shouldn't be too far from your system's needs:

Code: Select all

$ ldd vegastrike
        linux-gate.so.1 =>  (0xb77c1000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7799000)
        libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0xb7791000)
        libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb7769000)
        libogg.so.0 => /usr/lib/libogg.so.0 (0xb7763000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb76b3000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0xb760f000)
        libGLU.so.1 => /usr/lib/libGLU.so.1 (0xb759e000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0xb7591000)
        libglut.so.3 => /usr/lib/libglut.so.3 (0xb755b000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7535000)
        libpng12.so.0 => /lib/libpng12.so.0 (0xb7511000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb74f1000)
        libopenal.so.1 => /usr/lib/libopenal.so.1 (0xb749e000)
        libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0xb736b000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7276000)
        libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7250000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7232000)
        libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb7219000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb70d1000)
        libasound.so.2 => /usr/lib/libasound.so.2 (0xb7009000)
        librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb7000000)
        libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb6ffc000)
        libdirectfb-1.2.so.9 => /usr/lib/libdirectfb-1.2.so.9 (0xb6f87000)
        libfusion-1.2.so.9 => /usr/lib/libfusion-1.2.so.9 (0xb6f7d000)
        libdirect-1.2.so.9 => /usr/lib/libdirect-1.2.so.9 (0xb6f69000)
        libvga.so.1 => /usr/lib/libvga.so.1 (0xb6f08000)
        libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0xb61c8000)
        libnvidia-tls.so.1 => /usr/lib/tls/libnvidia-tls.so.1 (0xb61c6000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb61b6000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb6099000)
        libutil.so.1 => /lib/i686/cmov/libutil.so.1 (0xb6095000)
        /lib/ld-linux.so.2 (0xb77c2000)
        libx86.so.1 => /lib/libx86.so.1 (0xb6092000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb6078000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb6075000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb6070000)
chocard
Trader
Trader
Posts: 30
Joined: Mon Oct 23, 2006 9:47 am

Re: strange : "cannot find GL library" for an Ubuntu user

Post by chocard »

Well... thanks a lot... I suppose.... because I'm afraid I don't know what I have to do with your file.

My knowledge in coding, compiling, ... is a lot lower than yours ! I need simplier instructions.

But thanks !
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: strange : "cannot find GL library" for an Ubuntu user

Post by CLoneWolf »

Well, that command shows the dependencies of the executable passed as argument; if you happen to lack one or more of those files (version numbers might differ slightly in your case, base your comparison on the name part) you might make a search for which package provides the file you need, and install that package.
chocard
Trader
Trader
Posts: 30
Joined: Mon Oct 23, 2006 9:47 am

Re: strange : "cannot find GL library" for an Ubuntu user

Post by chocard »

All checked.

Only file missing : libX86 but I don't think I need it. And a small difference : I have libgccpp.so.1 and you libgcc_s

Otherwise, the only differences are about versions.
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: strange : "cannot find GL library" for an Ubuntu user

Post by CLoneWolf »

Ouch. Sorry for the time it took, but it's a check that had to be done somehow; now it's clear that the check made by configure fails for some other reason, but unluckily you overestimated me, I'm not much more than the "configure;make;make install" person :roll:
I have located the part of configure that does the check but no idea why it fails, I hope some real expert can shed some light on this

Code: Select all

#--------------------------------------------------------------------------
#Check for GL library
#--------------------------------------------------------------------------

# Check whether --with-gl-libs was given.
if test "${with_gl_libs+set}" = set; then
  withval=$with_gl_libs;
fi


# Check whether --with-gl-lib-name was given.
if test "${with_gl_lib_name+set}" = set; then
  withval=$with_gl_lib_name;
fi


if test "x$with_gl_libs" = "x" ; then
    GL_LDOPTS=""
else
    GL_LDOPTS="-L$with_gl_libs"
fi
saved_LIBS="$LIBS"


    if test "x$with_gl_lib_name" = "x" ; then
        GL_LIB_NAME="GL"
    else
        GL_LIB_NAME="$with_gl_lib_name"
    fi


    { $as_echo "$as_me:$LINENO: checking for $GL_LIB_NAME library" >&5
$as_echo_n "checking for $GL_LIB_NAME library... " >&6; }
    LIBS="$saved_LIBS $VS_LIBS $GL_LDOPTS -l$GL_LIB_NAME"
    cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
  rm -f conftest.er1
  cat conftest.err >&5
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
  (exit $ac_status); } && {
         test -z "$ac_cxx_werror_flag" ||
         test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
       }; then
  have_GL=yes
else
  $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

        have_GL=no
fi

rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
    { $as_echo "$as_me:$LINENO: result: ${have_GL}" >&5
$as_echo "${have_GL}" >&6; }
Failing this, it goes on with the similar checks for alternatives, as per your log.
On a side note, the log shows you're compiling 0.4.4, is there any reason why you're not trying the more recent 0.5 if not the bleeding edge svn?
chocard
Trader
Trader
Posts: 30
Joined: Mon Oct 23, 2006 9:47 am

Re: strange : "cannot find GL library" for an Ubuntu user

Post by chocard »

"On a side note, the log shows you're compiling 0.4.4, is there any reason why you're not trying the more recent 0.5 if not the bleeding edge svn?"

:shock: ??? I downloaded the SVN version. And I just check : I'm "à la revision 12762" (in plain English : Rev.: 12762). Perhaps that's the problem : I have some files and trying to configure others ?
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: strange : "cannot find GL library" for an Ubuntu user

Post by CLoneWolf »

False alarm, sorry, it's configure's fault as it logs this:

Code: Select all

# Define the identity of the package.
 PACKAGE='vegastrike'
 VERSION='0.4.4'
The VERSION line is clearly outdated, but totally unrelated to your problem.
chocard
Trader
Trader
Posts: 30
Joined: Mon Oct 23, 2006 9:47 am

Re: strange : "cannot find GL library" for an Ubuntu user

Post by chocard »

ok, thanks, so good news ... but bad news. The solution isn't there.

Back to the basic : why "configure" doesn't find the existing GL librairies ?
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: strange : "cannot find GL library" for an Ubuntu user

Post by klauss »

You need libGL installed, your config log suggests it isn't.

libGL is supplied by your graphics drivers, and not by any "gl" package. So you may not have 3D accelerated drivers installed.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chocard
Trader
Trader
Posts: 30
Joined: Mon Oct 23, 2006 9:47 am

Re: strange : "cannot find GL library" for an Ubuntu user

Post by chocard »

Actually it is accelerated :

$ glxinfo | grep "direct rendering"
direct rendering: Yes

My driver : Nvidia driver (version 185).

How may I install libGL ?
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: strange : "cannot find GL library" for an Ubuntu user

Post by CLoneWolf »

You might check that the libGL is actually referring to the accelerated one provided by the nvidia package;
if you issue the command

ls -l /usr/lib/libGL.so.1

you should see that /usr/lib/libGL.so.1 is a link to the real lib, in your case /usr/lib/libGL.so.185.X.X
if that's not the case, you might be using a libGL provided for instance by the libgl1-mesa-glx packet
chocard
Trader
Trader
Posts: 30
Joined: Mon Oct 23, 2006 9:47 am

Re: strange : "cannot find GL library" for an Ubuntu user

Post by chocard »

I have :
ls -l /usr/lib/libGL.so.1
lrwxrwxrwx 1 root root 18 2009-10-30 09:44 /usr/lib/libGL.so.1 -> libGL.so.185.18.36

The driver number is 185 so I presume it's correct, isn't ?

(it looks more and more like an Ubuntu forum than a space game forum :D And THANKS a lot for the time wasting with a poor lonesome player... )
CLoneWolf
ISO Party Member
ISO Party Member
Posts: 443
Joined: Thu May 01, 2008 5:14 pm

Re: strange : "cannot find GL library" for an Ubuntu user

Post by CLoneWolf »

chocard wrote:I have :
ls -l /usr/lib/libGL.so.1
lrwxrwxrwx 1 root root 18 2009-10-30 09:44 /usr/lib/libGL.so.1 -> libGL.so.185.18.36

The driver number is 185 so I presume it's correct, isn't ?
Surely correct, and that's the kind of good news that turns into bad news as it still leaves us without a culprit :?
chocard wrote:(it looks more and more like an Ubuntu forum than a space game forum :D And THANKS a lot for the time wasting with a poor lonesome player... )
Hehe don't worry about that, there's always something to learn from such cases so it's not a whole waste :)
But still, a more qualified help is needed... Klauss, any more ideas? Chuck, anything here ringing a bell with regard to your Ubuntu setup?
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: strange : "cannot find GL library" for an Ubuntu user

Post by chuck_starchaser »

I'm no expert at these things at all, and an eternal Ubuntu newbie.
Been following this thread and no idea.
All that's shocked me, in the config.log, is,

Code: Select all

  $ ./configure --enable-debug
There must be a reason, but I can't tell what it would be --for compiling with debug-- unless you intend to run the thing in a debugger.
My usual configure line is,

Code: Select all

$ ./configure --disable-debug --enable-release --with-boost=system
I fear that if you enable debug you may need debug versions of some of the libraries; but like I said, I don't know much.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: strange : "cannot find GL library" for an Ubuntu user

Post by klauss »

Weird. If you have /usr/lib/libGL.so, configure should have succeeded.

Do you have it? (ie: libGL.so, no version prefix, it should be a symlink to libGL.so.1).

Edit: if you do, please reconfigure - the right sequence is:

./boostrap.sh
./configure --enable-release --disable-debug
make
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chocard
Trader
Trader
Posts: 30
Joined: Mon Oct 23, 2006 9:47 am

Re: strange : "cannot find GL library" for an Ubuntu user

Post by chocard »

Hi all,

Sorry for the delay but I has some issue with a plane and a volcano....

About my other problem, the big one with the GL library, I tried all your solutions and it's a NO GO. Worse, I try to install Vega Strike from the repository and it doesn't work.

There is a new version of Ubuntu planned soon. I'll try again after this.

Thanks
chocard
Trader
Trader
Posts: 30
Joined: Mon Oct 23, 2006 9:47 am

Re: SOLVED:strange : "cannot find GL library" for an Ubuntu user

Post by chocard »

ok, problem solved with the upgrade to Lucid Lynx. I don't know what the issue was, but it's no more an issue. :D

I'm happy in space know. Next questions : which space craft, which weapon, what to do and how to win :wink:
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: SOLVED:strange : "cannot find GL library" for an Ubuntu

Post by TBeholder »

Had the same problem once. Reinstalling libgl1-mesa-dev solved this.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
Post Reply