1

I am trying to update my Linux's AMD VGA driver to use AMD's proprietary Catalyst Driver, which I read is more recommended compared to the generic Linux / Mesa X11 driver http://www.cgl.ucsf.edu/chimera/graphics/updatelinux.html. My laptop still uses old Core2 P8700 processor and ATI Mobility Radeon 3670 VGA. I have downloaded the Catalyst driver from the AMD support website, extracted it and ran it's install script. But it failed, after reading the install log, it says that it Can't exec "gcc...".

So I tried $ gcc, it complained

The program 'gcc' is currently not installed. You can install it by typing: sudo apt install gcc

I did $ sudo apt search gcc, it outputted so much lines, I couldn't even scroll up anymore to see all the results.

So I fired up Synaptics and tried searching 'gcc' there first and try have a look.

From the Synaptics 'gcc' search, I found that I have cpp, cpp-5, dpkg-dev, gcc-5-base, gcc-6-base, libgcc1, libgomp1, libquadmath0, and uno-libs3 already installed. So it already has gcc-5-base and gcc-6-base and many of the gcc libs seems, right?

So what am I missing here? Why I still can't execute $ gcc on my shell?

So what the hell is the 'gcc-5&6-base' there for? Do I still hasn't install 'gcc' or should I install 'gcc-4.7' or 'gcc-4.8' like that?

Sorry I am still learning Linux here (still mostly with Debians Linuxes). I hv been using Windows more often, because the CPU and GPU currently still runs cooler under Windows 7 for my laptop. (Ran lm-sensors on Linux and openhardwaremonitor on Windows). So I am trying to try the AMD's drivers now, to (hopefully) try to bring my Linux's temps down.

------Update for N0rbert's comment: (I ran this as you requested)

user@mate-16.04:~$ apt-cache policy gcc
gcc:
  Installed: (none)
  Candidate: 4:5.3.1-1ubuntu1
  Version table:
     4:5.3.1-1ubuntu1 500
        500 http://ph.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

------Update after I ran $ sudo apt install build-essential and ran the install script:

It still fails, this is part of the log output:

Package build failed!
Package build utility output:
Cleaning in directory .
dpkg-checkbuilddeps: error: Unmet build dependencies: build-essential:native debhelper (>= 7) dh-modaliases execstack
debuild: fatal error at line 1340:
You do not appear to have all build dependencies properly met.
You can use mk-build-deps to generate a dummy package which
Depends on all the required packages, or you can install them manually using dpkg or apt using the error messages just above this message.
dpkg-buildpackage: source package fglrx-installer
dpkg-buildpackage: source version 2:8.970-0ubuntu1
dpkg-buildpackage: source distribution xenial
dpkg-buildpackage: source changed by AMD: Advanced Micro Devices. <http://ati.amd.com/support/driver.html> 
 dpkg-source --before-build fglrx.Skr0IX
dpkg-buildpackage: host architecture amd64
 debian/rules build

------Update: I solved the above dependency problem with $ sudo apt install debhelper dh-modaliases execstack. I succesfully ran the install script, the log says it succesfully generated the .deb packages for my OS. But I could not find any of them on the generated folder after doing la or ll on the folder. This is the generated $ cat /usr/share/ati/fglrx-install.log:

Package /home/user/Downloads/dpkg-deb: has been successfully generated
Package /home/user/Downloads/building has been successfully generated
Package /home/user/Downloads/package has been successfully generated
Package /home/user/Downloads/'fglrx' has been successfully generated
Package /home/user/Downloads/in has been successfully generated
Package /home/user/Downloads/fglrx_8.970-0ubuntu1_amd64.deb'. has been successfully generated
Package /home/user/Downloads/dpkg-deb: has been successfully generated
Package /home/user/Downloads/building has been successfully generated
Package /home/user/Downloads/package has been successfully generated
Package /home/user/Downloads/'fglrx-dev' has been successfully generated
Package /home/user/Downloads/in has been successfully generated
Package /home/user/Downloads/fglrx-dev_8.970-0ubuntu1_amd64.deb'. has been successfully generated
Package /home/user/Downloads/dpkg-deb: has been successfully generated
Package /home/user/Downloads/building has been successfully generated
Package /home/user/Downloads/package has been successfully generated
Package /home/user/Downloads/'fglrx-amdcccle' has been successfully generated
Package /home/user/Downloads/in has been successfully generated
Package /home/user/Downloads/fglrx-amdcccle_8.970-0ubuntu1_amd64.deb'. has been successfully generated

But I could not see any of the generated .deb packages in the ~/Downloads folder? Any idea as to why? Am I doing something wrong or not sure if the legacy AMD script is buggy?

  • 1
    install using sudo apt install build-essential – George Udosen Jul 20 at 19:25
  • @GeorgeUdosen b4 I try it. Can u elaborate more? Maybe explain a bit more to clear out my confusion here if you can.. thx – K4ll-of-D00ty Jul 20 at 19:41
  • Please add output of apt-cache policy gcc. It seems that your repositories are incorrect. Did you forget to run sudo apt-get update? – N0rbert Jul 20 at 19:54
  • @N0rbert I ran Software Updater before trying all this.. Is it different (from apt-get update)?? I will post the output by tomorrow.. i'm gonna sleep now. thx – K4ll-of-D00ty Jul 20 at 20:01
  • 2
    build-essential installs all the packages that you are likely to need to build and install a proprietary driver. You could install gcc alone but then you'd find you are missing make, g++, libc6, and more, and, in some cases, dependencies of those! Welcome to Dependency Purgatory! @GeorgeUdosen is suggesting that you do all in one easy step. – chili555 Jul 20 at 21:49
3

The short answer to solve the problem at hand is to run

sudo apt-get update; sudo apt-get install gcc

You may also want to run sudo apt-get upgrade depending on if you have any concerns about needing to not upgrade older packages.

It seems what you're really after is to find out why you have some components such as gcc-5-base.

There really isn't any way to definitively say why you have part but not all of the gcc package. It may have been installed because it's a dependency for some other package. It may have been installed as part of gcc earlier, but then gcc itself was later uninstalled and it was left behind. Etc.

1

Theoretical solution for this problem was the following - install build tools and dependencies with kernel headers then with

sudo apt-get install gcc build-essential
sudo apt-get install debhelper dh-modaliases execstack
sudo apt-get install linux-headers-generic

and then recompile driver and install its packages with

sudo sh amd-driver-installer-catalyst-13.1-legacy-linux-x86.x86_64.run --buildandinstallpkg Ubuntu/xenial 
sudo apt-get install /tmp/fglrx*.deb

but really it fails on DKMS stage. So it is not possible.


In case of Ubuntu 16.04 LTS which you are running there is a special remark in its release notes:

fglrx

The fglrx driver is now deprecated in 16.04, and we recommend its open source alternatives (radeon and amdgpu). AMD put a lot of work into the drivers, and we backported kernel code from Linux 4.5 to provide a better experience.

When upgrading to Ubuntu 16.04 from a previous release, both the fglrx driver and the xorg.conf will be removed, so that the system is set to use either the amdgpu driver or the radeon driver (depending on the available hardware).

More information is available at https://tjaalton.wordpress.com/2016/03/11/no-catalystfglrx-video-driver-in-ubuntu-16-04/

So installation of build dependencies will not end with expected result.


The corresponding page of AMD site says that driver was released in 2013, and that it is "Automated installer and Display Drivers for Xorg 6.9 to Xserver 1.12 and Kernel version up to 3.4", so it does not suite for Ubuntu 16.04 LTS with Xorg 7.7 (Xserver 1.18) and Kernel 4.4 and higher.

So really it does not compile. You can use open-source drivers instead.

  • Yes, I did that (installed all the remaining dependencies), see my update. Also the Additional Drivers from Software & Updates, returned 'No Additional Drivers Available'. The site you referred to says that 'For Ubuntu 16.04 LTS and above, the AMD Catalyst or fglrx driver is no longer supported by AMD, or in Ubuntu'. My laptop still uses old Core2 P8700 processor and ATI Mobility Radeon 3670 VGA. – K4ll-of-D00ty Jul 21 at 16:22
  • It is very likely that the deb-files are located in /tmp. Check this and then install them with sudo apt-get install /tmp/fglrx*.deb. – N0rbert Jul 21 at 17:13
  • No, ll on /tmp doesn't contain any .deb files. But I have restarted moments ago, to test if the drivers has been installed. – K4ll-of-D00ty Jul 21 at 17:24
  • Can u also unedit, the prev edit. The one b4 this, where you had few (3.. I think) terminal commands (or as much as u want..), I might again try that later. I am not that affraid of my screwing my laptop hehe.. as this is just a test laptop. Thx – K4ll-of-D00ty Jul 21 at 18:17
  • I have just tested them on VM. They really do not work. The fglrx driver will not compile at all. I'm sorry, so I transformed this answer to current form (but mentioned possible solution). – N0rbert Jul 21 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.