Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 05-23-2020, 12:09 PM   #1
LQ Newbie
Registered: May 2020
Posts: 7

Rep: Reputation: Disabled
Broke gcc while attempting to upgrade it

I needed to upgrade the kernel in order to install my wireless drivers.
However, the gcc that ships with 14.2 was seemingly too old due to retpoline support. I tried to update gcc by installing a newer slackware package with installpkg command. The process seemingly ended successfully.

However now when attempting to run make I receive error message /usr/bin/gcc: No such file or directory.

I checked usr/bin and the symbolic link is there and the target it points to is there as well. However, when I try to run the target it points to directly I also get the "no such file or directory" error.

I tried installing bin-utils slackware package and it did not help. I'm probably making a silly mistake here somewhere sigh.

Any assistance appreciated. thanks
Old 05-23-2020, 01:07 PM   #2
LQ Guru
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,118

Rep: Reputation: 5641Reputation: 5641Reputation: 5641Reputation: 5641Reputation: 5641Reputation: 5641Reputation: 5641Reputation: 5641Reputation: 5641Reputation: 5641Reputation: 5641
You should not be installing upgraded packages with installpkg. This leaves the original package installed and will overwrite some of the files.

Also, you should not be picking and choosing updates, because those packages are built after all previous patches are installed, so it may rely on newer software.

You download all the packages from the patches/ directory on your favorite mirror and use upgradepkg to upgrade all of them. If you want to simplify the upgrade process, look into using slackpkg
Old 05-23-2020, 01:45 PM   #3
LQ Newbie
Registered: May 2020
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thank you! At first I was using installpkg with files brought in by USB because I could not even get the ethernet connection to work (hence the kernel recompilation attempts). With a knoppix USB I was (eventually) able to load the wifi drivers and in turn fix gcc with slackpkg remove and reinstall.
Old 05-25-2020, 04:07 PM   #4
Registered: Apr 2005
Location: Scottsdale, AZ, USA
Distribution: Slackware
Posts: 350

Rep: Reputation: 165Reputation: 165
One way of having an additional gcc version is to install the new version into either /usr/local or /opt. I have GCC 6.3.0 installed into /opt for MATLAB.

I based my build script off the official Slackware SlackBuild in the source tree. Download gcc-6.3.0.tar.bz2 and extract it. Then create a build directory and put in it:




NUMJOBS=" -j 8 "

"$srcdir/configure" \
  --prefix=$destdir \
  --libdir=$destdir/lib$LIBDIRSUFFIX \
  --enable-bootstrap \
  --enable-languages=c,c++,fortran,go,lto,objc,obj-c++ \
  --enable-threads=posix \
  --enable-checking=release \
  --enable-objc-gc \
  --with-system-zlib \
  --enable-libstdcxx-dual-abi \
  --with-default-libstdcxx-abi=gcc4-compatible \
  --with-python-dir=/lib$LIBDIRSUFFIX/python2.7/site-packages \
  --disable-libunwind-exceptions \
  --enable-__cxa_atexit \
  --enable-libssp \
  --enable-lto \
  --disable-install-libiberty \
  --with-gnu-ld \
  --verbose \
  --with-arch-directory=$LIB_ARCH \
  --disable-gtktest \
  --disable-multilib \
  --target=${TARGET} \
  --build=${TARGET} \
  --host=${TARGET} || exit 1

make $NUMJOBS bootstrap;
( cd gcc || exit

          make $NUMJOBS gnattools
make info

make install || exit 1
Now to use it just put /opt/gcc-6.3.0/bin at the beginning of your PATH (that's what my MATLAB startup script does).

You'll probably have to fiddle with the build options for different versions of GCC.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
step 5.10 gcc/limitx.h gcc/glimits.h gcc/limity.h no such file or directory iambrj Linux From Scratch 7 08-07-2018 11:22 AM
Error while compiling GCC 6.3.0 (LFS 8.0) on Arch Linux with GCC 7.1.0 nonick721 Linux From Scratch 6 07-27-2017 04:26 PM
LXer: GCC 4.9 vs. GCC 5.1 vs. GCC 6.0 SVN Compiler Benchmarks LXer Syndicated Linux News 0 06-08-2015 01:00 PM
[SOLVED] SEGMENTATION FAULT using gcc 4.4.4 -O2 , works with gcc 4.1.0 -O2 or gcc 4.4.4 -O1 amir1981 Programming 36 07-26-2010 06:07 PM
Attempting wireless, broke plug in networking hikkerguy Linux - Wireless Networking 0 01-08-2007 01:22 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:52 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration