Welcome to Fractal Forums

Fractal Software => Mandelbulber => Topic started by: Phlop on August 17, 2015, 12:02:27 AM




Title: Linker error in Linux compilation attempt [SOLVED]
Post by: Phlop on August 17, 2015, 12:02:27 AM
I'm trying to build Mandelbulber 2.04 in Linux Mint 17.2 XFCE x64.

I've installed all of the Ubuntu/Debian prerequisite packages listed in Mandelbulber 2.04's readme file.

The command 'make all' ends with the error "/usr/bin/ld: cannot find -lGL".

What package do I need to install to satisfy this linker requirement?


Title: Re: Linker error in Linux compilation attempt
Post by: JohnVV on August 17, 2015, 02:16:39 AM
Quote
he command 'make all' ends with the error "/usr/bin/ld: cannot find -lGL".
then you did not install the opengl dev deb
you are missing some basic prerequisites


install the mesa AND mesa dev packages

you are missing libGL.so and the headers

now if you have a Nvidia 3d card this ( libGL) is already installed IF you are using the nvidia driver and not the nouveau driver



Title: Re: Linker error in Linux compilation attempt
Post by: Phlop on August 17, 2015, 02:46:10 AM
then you did not install the opengl dev deb
you are missing some basic prerequisites

install the mesa AND mesa dev packages

you are missing libGL.so and the headers

now if you have a Nvidia 3d card this ( libGL) is already installed IF you are using the nvidia driver and not the nouveau driver

Thanks for the quick reply.

I do have an Nvidia card, running the proprietary driver version 352.21 (because my GTX 970 card is not supported by the Ubuntu repository's Nvidia drivers yet).

I listed all of the installed packages on my system containing the string 'libgl' via the command "dpkg --get-selections | awk '/libgl/{print $1}' | xargs dpkg-query --show $1". This produced the following list:

Code:
libgl1-mesa-dev	10.1.3-0ubuntu0.4
libgl1-mesa-dri:amd64 10.1.3-0ubuntu0.4
libgl1-mesa-dri:i386 10.1.3-0ubuntu0.4
libgl1-mesa-glx:amd64 10.1.3-0ubuntu0.4
libgl1-mesa-glx:i386 10.1.3-0ubuntu0.4
libglade2-0:amd64 1:2.6.4-2
libglamor0:amd64 0.6.0-0ubuntu4
libglapi-mesa:amd64 10.1.3-0ubuntu0.4
libglapi-mesa:i386 10.1.3-0ubuntu0.4
libgle3 3.1.0-7ubuntu2
libgles1-mesa:amd64 10.1.3-0ubuntu0.4
libgles2-mesa:amd64 10.1.3-0ubuntu0.4
libgles2-mesa-dev 10.1.3-0ubuntu0.4
libglew1.10:amd64 1.10.0-3
libglewmx1.10:amd64 1.10.0-3
libglib-perl 3:1.304-1
libglib2.0-0:amd64 2.40.2-0ubuntu1
libglib2.0-0:i386 2.40.2-0ubuntu1
libglib2.0-bin 2.40.2-0ubuntu1
libglib2.0-data 2.40.2-0ubuntu1
libglib2.0-dev 2.40.2-0ubuntu1
libglibmm-2.4-1c2a:amd64 2.39.93-0ubuntu1
libglu1-mesa:amd64 9.0.0-2
libglu1-mesa:i386 9.0.0-2
libglu1-mesa-dev 9.0.0-2

It seems that I already have the mesa and mesa dev packages installed.

Apparently there is some other issue causing this linker error.


Title: Re: Linker error in Linux compilation attempt
Post by: JohnVV on August 17, 2015, 05:24:01 AM
you do know that the nvidia.run REPLACES the mesa libgl with it's own
for your driver
"/usr/lib64/libGL.so.352.21"
this is interned linked to
"/usr/lib64/libGL.so"
-- or NOT !!! --

as in a broken link

mesa ALSO has a "/usr/lib64/libGL.so.2" of it's own that is ALSO linked to
"/usr/lib64/libGL.so"

see the possible problem here

then to ADD a royal mess to this mess
/usr/include/GL/GL.h
is ALSO!!!!! replaced by the nvidia.run with a DIFFERENT!!!! version than is in mesa

-- a MESS


so

what i do is after every kernel and xorg update that requires REinstalling the nvidia.run
i ALSO force a reinstall of MESA and the mesa development packages

THAT WAY my OS and the packages in the repos ARE USING THE SAME OPENGL

look in /usr/lib64 and see WHAT libGL.so is linking to





Title: Re: Linker error in Linux compilation attempt
Post by: quaz0r on August 17, 2015, 06:32:40 AM
noting also that it is libGL not libgl.  if your libGL.so is located somewhere funky like /usr/lib64/somedir/libGL.so then you will also need to add -L/usr/lib64/somedir so gcc can find it.


Title: Re: Linker error in Linux compilation attempt
Post by: Phlop on August 19, 2015, 03:33:51 AM
see WHAT libGL.so is linking to

Thanks for the tip.

I found that /usr/lib/x86_64-linux-gnu/libGL.so was a link to /usr/lib/x86_64-linux-gnu/mesa/libGL.so, which was a broken link to a non-existent file libGL.so.1.2.0.

All I had to do to fix this was 'sudo ln -sfn /usr/lib/x86_64-linux-gnu/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so'.

After that, the compilation worked without a problem.