[SOLVED] "No rule to make target `/usr/lib/libGL.so' etc."

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
User avatar
bigglesworth
Novice
Novice
Posts: 211
Joined: 11 Nov 2007, 04:23
Location: Land of Ooo

[SOLVED] "No rule to make target `/usr/lib/libGL.so' etc."

Post by bigglesworth » 01 May 2011, 09:24

I've done a fresh install of Ubuntu 11.04 amd64 and the ATI Catalyst proprietary display driver for Linux x86_64. I've installed all current dependencies to be able to compile the current Manasource client for TMW from git.

Code: Select all

git clone git://gitorious.org/mana/mana.git mana
cd mana
cmake -D CMAKE_INSTALL_PREFIX=$HOME/mana .
make
My only problem was the following error:

Code: Select all

milkchan@natty64:~/mana$ make
[  3%] Built target enet
make[2]: *** No rule to make target `/usr/lib/libGL.so', needed by `src/mana'.  Stop.
make[1]: *** [src/CMakeFiles/mana.dir/all] Error 2
make: *** [all] Error 2
milkchan@natty64:~/mana$
The error is from a broken link to libGL.so. The solution is to delete the broken link and then recreate the link. This has been happening every time I do a fresh Ubuntu install, but I always forget the link I need to repair. This needs to be done only once for each fresh OS install.

Code: Select all

milkchan@natty64:~$ sudo ln -s /usr/lib/libGL.so.1 /usr/lib/mesa/libGL.so
[sudo] password for milkchan: 
ln: creating symbolic link `/usr/lib/mesa/libGL.so': File exists
milkchan@natty64:~$ sudo rm /usr/lib/mesa/libGL.so
milkchan@natty64:~$ sudo ln -s /usr/lib/libGL.so.1 /usr/lib/mesa/libGL.so
milkchan@natty64:~$
After fixing the broken link, the client will compile and install.

Code: Select all

milkchan@natty64:~/mana$ make
[  3%] Built target enet
Linking CXX executable mana
[ 97%] Built target mana
Scanning dependencies of target translations
[ 97%] Generating de.gmo
[ 97%] Generating es.gmo
[ 97%] Generating fi.gmo
[ 97%] Generating fr.gmo
[ 97%] Generating pt_BR.gmo
[ 97%] Generating ru.gmo
[100%] Built target translations
milkchan@natty64:~/mana$ make install
Hopefully, this post will help someone other than myself in the future.
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: [SOLVED] "No rule to make target `/usr/lib/libGL.so' etc

Post by Jaxad0127 » 01 May 2011, 10:37

bigglesworth wrote:This has been happening every time I do a fresh Ubuntu install, but I always forget the link I need to repair. This needs to be done only once for each fresh OS install.
You should tell them.
Image
User avatar
bigglesworth
Novice
Novice
Posts: 211
Joined: 11 Nov 2007, 04:23
Location: Land of Ooo

Re: [SOLVED] "No rule to make target `/usr/lib/libGL.so' etc

Post by bigglesworth » 01 May 2011, 11:06

Hi jaxad0127,

I guess I was selfishly using the forum to document a bookmark for myself. I bought the ATI card primarily to play games in Windows with the knowledge that ATI/AMD provided functioning, although proprietary, Linux drivers. I meant no harm towards TMW/Manasource, Ubuntu, or AMD.

I'll tell both AMD & Canonical. Help point me to the guilty party? I know that within AMD's Linux driver download web page is a link for driver feedback, but with Canonical, I have no direct idea where to go. I'll start with AMD.
User avatar
bigglesworth
Novice
Novice
Posts: 211
Joined: 11 Nov 2007, 04:23
Location: Land of Ooo

Re: [SOLVED] "No rule to make target `/usr/lib/libGL.so' etc

Post by bigglesworth » 01 May 2011, 11:39

I hope this post may add information to those whom seek it.

Code: Select all

milkchan@natty64:~$ man xorg | grep xorg-server
X Version 11                                                       xorg-server 1.10.1                                                            Xorg(1)
milkchan@natty64:~$ X -version

X.Org X Server 1.10.1
Release Date: 2011-04-15
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-29-server x86_64 Ubuntu
Current Operating System: Linux natty64 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-generic root=UUID=118b1ce6-f0dd-4586-afe8-17c25e959804 ro quiet splash vt.handoff=7
Build Date: 19 April 2011  03:40:45PM
xorg-server 2:1.10.1-1ubuntu1 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.20.2
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
milkchan@natty64:~$
EDIT: Removed unnecessary images.
Last edited by bigglesworth on 08 Dec 2012, 14:10, edited 1 time in total.
User avatar
bigglesworth
Novice
Novice
Posts: 211
Joined: 11 Nov 2007, 04:23
Location: Land of Ooo

Re: [SOLVED] "No rule to make target `/usr/lib/libGL.so' etc

Post by bigglesworth » 08 Dec 2012, 14:08

UPDATE: Over one year later, the issue still exists and the solution is slightly different. This time it's a fresh install of Lubuntu 12.04.1 and proprietary AMD drivers.

Error output:

Code: Select all

milkchan@pc1-lubuntu64:~/mana/src$ make
[  3%] Built target enet
make[2]: *** No rule to make target `/usr/lib/libGL.so', needed by `src/mana'.  Stop.
make[1]: *** [src/CMakeFiles/mana.dir/all] Error 2
make: *** [all] Error 2
milkchan@pc1-lubuntu64:~/mana/src$
The problem this time was that libGL.so has a new home. Solution:

Code: Select all

milkchan@pc1-lubuntu64:~/mana/src$ sudo ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/libGL.so
milkchan@pc1-lubuntu64:~/mana/src$ 
Desired result:

Code: Select all

milkchan@pc1-lubuntu64:~/mana/src$ make
[  3%] Built target enet
Linking CXX executable mana
[ 97%] Built target mana
[ 97%] Generating de.gmo
[ 98%] Generating es.gmo
[ 98%] Generating fi.gmo
[ 98%] Generating fr.gmo
[ 99%] Generating pl.gmo
[ 99%] Generating pt_BR.gmo
[100%] Generating ru.gmo
[100%] Built target translations
milkchan@pc1-lubuntu64:~/mana/src$
This time I'd like to credit this blog post for the solution.
User avatar
o11c
Knight
Knight
Posts: 2262
Joined: 20 Feb 2011, 22:09
Location: ^ ^

Re: [SOLVED] "No rule to make target `/usr/lib/libGL.so' etc

Post by o11c » 08 Dec 2012, 22:31

Are you sure you have the opengl dev packages installed?

The specific package appears to be libgl1-mesa-dev (you always link to mesa at buildtime and it selects the right one at runtime)

This should be pulled in by 'apt-get build-dep mana'.

--

You mention the AMD website. If you got drivers from there, this is highly likely to cause problems. You should *always* use the packages supplied by your distribution; they are available in the 'restricted' section of the archive.

It has been a while so I can't give precise installation directions (I'm on Debian Wheezy now, which is different enough in this area), but I recall there's some sort of "system hardware" program that takes care of giving you the choice of installing nonfree hardware drivers. I had an ATI card when I first switched to Linux (it was Ubuntu) and I never had any problem figuring out how to do that.
Former programmer for the TMWA server.
User avatar
bigglesworth
Novice
Novice
Posts: 211
Joined: 11 Nov 2007, 04:23
Location: Land of Ooo

Re: [SOLVED] "No rule to make target `/usr/lib/libGL.so' etc

Post by bigglesworth » 09 Dec 2012, 01:03

Yes, I am using the drivers from AMD's website, not from Ubuntu's "Additional Drivers" program. I don't remember when or under which distribution I picked up that habit. It's been years now. The next time I re-install Ubuntu, I'll install the restricted drivers from within. I do have the libgl1-mesa-dev package installed.

From apt-get dev-build mana:

Code: Select all

milkchan@pc1-lubuntu64:~$ sudo apt-get build-dep mana
[sudo] password for milkchan: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libcurl4-openssl-dev
The following NEW packages will be installed:
  debhelper dh-apparmor hardening-wrapper html2text intltool-debian libcurl4-gnutls-dev po-debconf
0 upgraded, 7 newly installed, 1 to remove and 0 not upgraded.
Need to get 2,042 kB of archives.
After this operation, 2,022 kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
milkchan@pc1-lubuntu64:~$ 
From dpkg:

Code: Select all

milkchan@pc1-lubuntu64:~$ dpkg -l | grep libgl1
ii  libgl1-mesa-dev                        8.0.4-0ubuntu0.2                        free implementation of the OpenGL API -- GLX development files
ii  libgl1-mesa-dri                        8.0.4-0ubuntu0.2                        free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-dri:i386                   8.0.4-0ubuntu0.2                        free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-glx                        8.0.4-0ubuntu0.2                        free implementation of the OpenGL API -- GLX runtime
ii  libgl1-mesa-glx:i386                   8.0.4-0ubuntu0.2                        free implementation of the OpenGL API -- GLX runtime
milkchan@pc1-lubuntu64:~$ 
Post Reply