gobi
gobi

Reputation: 515

I got error in 'make' gcc-5.3.0 package as referred in Linux from scratch

I get the following error when making gcc:

Makefile:2154: recipe for target 's-attrtab' failed
make[2]: *** [s-attrtab] Killed
make[2]: Leaving directory '/mnt/lfs/sources/gcc-5.3.0/build/gcc'
Makefile:4105: recipe for target 'all-gcc' failed
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/gcc-5.3.0/build'
Makefile:858: recipe for target 'all' failed
make: *** [all] Error 2

Note : this may help someone [compatibility issue] https://www.linuxquestions.org/questions/linux-software-2/gcc-s-attrtab-error-4175557586/

Upvotes: 2

Views: 1194

Answers (3)

Peter VARGA
Peter VARGA

Reputation: 5186

I had exactly the same issue1. The reason for this error is the fact the system is running out of memory. In my case it was caused because I ran make -j 48 and these 48 jobs were too much.

Decreasing the job number to 24 fixed this problem. In other words:

  1. increase your memory or
  2. reduce the jobs using the -j make switch

1 This post helped me then to fix the problem: http://dustint.com/post/669/gentoo-gcc-recipe-for-target-s-attrtab-failed

Upvotes: 1

Knud Larsen
Knud Larsen

Reputation: 5909


The most common errors with the LFS gcc are caused by using a wrong shell. /bin/sh must be a link to bash !

If the wrong shell was used : Start from scratch with binutils.

"Askforhelp" : http://www.linuxfromscratch.org/lfs/view/stable/chapter01/askforhelp.html → 1.5.1. → the essential things to include in any request for help are → ... The host distribution and version being used to create LFS.

Please show the output from $ bash version-check.sh


Upvotes: 0

Ghassan Zein
Ghassan Zein

Reputation: 4189

This is how i installed it on ubuntu 14.04 (gcc 5)

sudo add-apt-repository ppa:ubuntu-toolchain-r/test

sudo apt-get update

sudo apt-get install gcc-5 g++-5
sudo update-alternatives 
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20
sudo update-alternatives --config gcc
sudo update-alternatives --config g++

Upvotes: 0

Related Questions