Logo by AGUS - Contribute your own Logo!
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. September 26, 2017, 11:42:45 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Linker error in Linux compilation attempt [SOLVED]  (Read 1194 times)
Description: The command 'make all' ends with the error "/usr/bin/ld: cannot find -lGL".
0 Members and 1 Guest are viewing this topic.
Phlop
Forums Newbie
*
Posts: 3


« 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?
« Last Edit: August 19, 2015, 03:34:17 AM by Phlop » Logged
JohnVV
Conqueror
*******
Posts: 123


having fun


« Reply #1 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

Logged

Running OpenSUSE 42.1-64bit & ScientificLinux-6.7-64bit
I don't pitch Linux to my friends,I let Microsoft do it for me!"
Phlop
Forums Newbie
*
Posts: 3


« Reply #2 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.
Logged
JohnVV
Conqueror
*******
Posts: 123


having fun


« Reply #3 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



Logged

Running OpenSUSE 42.1-64bit & ScientificLinux-6.7-64bit
I don't pitch Linux to my friends,I let Microsoft do it for me!"
quaz0r
Fractal Molossus
**
Posts: 652



« Reply #4 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.
Logged
Phlop
Forums Newbie
*
Posts: 3


« Reply #5 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.
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Error 500 - Internal server error Discuss Fractal Forums tomot 9 1668 Last post April 22, 2011, 04:06:24 PM
by lenord
[SOLVED]Error in MD3D Mandelbulb 3d « 1 2 » PhotoComix 16 2293 Last post February 18, 2012, 03:03:05 PM
by PhotoComix
opencl/compilation problems with mandelbulber Bug Reporting d13b 5 1146 Last post June 08, 2013, 01:43:24 PM
by Buddhi
Compilation problems on trunk and 1.16 Bug Reporting Herk 1 495 Last post September 16, 2013, 09:07:41 PM
by Buddhi
Fractal Short Kicks 4 compilation Movies Showcase (Rate My Movie) schizo 0 362 Last post September 09, 2014, 10:26:02 PM
by schizo

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.542 seconds with 28 queries. (Pretty URLs adds 0.019s, 2q)