LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-25-2021, 07:42 AM   #1
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,065

Rep: Reputation: Disabled
Caveat for ugrading gcc in a distribution based on Slackware-14.2?


Hello,

I have gcc version 5.5.0 (genuine Slackware package).

If upgrading to the version in -current (10.2.0) or at least 9.2.0, will I have rebuild libtool after that ?

According to gentoo I would need to also rebuild llvm, clang and wxGTK3 (installed in Slint). Others that come to mind?

On the other hand, do I need to first upgrade other components of the system before upgrading gcc?

Thanks for any clue.

PS The reason I consider upgrading is that some software need or will soon need a more recent GCC
 
Old 02-25-2021, 07:50 AM   #2
BrunoLafleur
Member
 
Registered: Apr 2020
Location: France
Distribution: Slackware
Posts: 405

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by Didier Spaier View Post
Hello,

I have gcc version 5.5.0 (genuine Slackware package).

If upgrading to the version in -current (10.2.0) or at least 9.2.0, will I have rebuild libtool after that ?

According to gentoo I would need to also rebuild llvm, clang and wxGTK3 (installed in Slint). Others that come to mind?

On the other hand, do I need to first upgrade other components of the system before upgrading gcc?

Thanks for any clue.

PS The reason I consider upgrading is that some software need or will soon need a more recent GCC
I suppose you will recompile gcc. If so I don't think you need to upgrade any other libraries. I have already compile gcc form scratch for cross-compilers and you can have a new gcc and (very) old libs (even glibc).

For other packages which were compiled with another version of gcc, the libs libgcc_s.so libstdc++.so of that version should be kept alongside the new ones.
 
1 members found this post helpful.
Old 02-25-2021, 08:05 AM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,065

Original Poster
Rep: Reputation: Disabled
Thanks. Indeed will I recompile (I do that already for the kernels). That means that I will need to also rebuild aaa_elflibs that also ships these libraries. And I will of course keep the /usr/lib64/*.la files else a lot of installed software will become unhappy.

Last edited by Didier Spaier; 02-25-2021 at 08:21 AM. Reason: s/-/_/
 
Old 02-25-2021, 08:29 AM   #4
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 907

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Quote:
Originally Posted by Didier Spaier View Post
PS The reason I consider upgrading is that some software need or will soon need a more recent GCC
I would recommend (and is what I do) installing a newer GCC into /opt. I do this for MATLAB.

No, this isn't a proper Slackware package, but it's installed in /opt and I assume GCC is well-behaved

do_build.sh: (I tweak for each different version of GCC, using Pat's SlackBuilds as guides)
Code:
#!/bin/sh

srcdir=../gcc-8.4.0
destdir=/opt/gcc-8.4.0

SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
LIB_ARCH=amd64

TARGET=x86_64-slackware-linux

NUMJOBS=" -j 8 "

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
"$srcdir/configure" \
  --prefix=$destdir \
  --libdir=$destdir/lib$LIBDIRSUFFIX \
  --enable-bootstrap \
  --enable-languages=ada,brig,c,c++,fortran,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 gnatlib GNATLIBCFLAGS="$SLKCFLAGS"

  CFLAGS="$SLKCFLAGS" \
	  CXXFLAGS="$SLKCFLAGS" \
	  make $NUMJOBS gnattools
)
make info

make install || exit 1
Then in my startup.m for MATLAB I have:
Code:
% Add GCC to PATH
if contains(ver_str, 'R2016b') || contains(ver_str, 'R2017a') || ...
        contains(ver_str, 'R2017b')
    if exist('/opt/gcc-4.9.4/bin', 'dir')
        setenv('PATH', ['/opt/gcc-4.9.4/bin:' getenv('PATH')]);
    end
end
if contains(ver_str, 'R2018a') || contains(ver_str, 'R2018b') || ...
        contains(ver_str, 'R2019a') || contains(ver_str, 'R2019b') || ...
        contains(ver_str, 'R2020a')
    if exist('/opt/gcc-6.3.0/bin', 'dir')
        setenv('PATH', ['/opt/gcc-6.3.0/bin:' getenv('PATH')]);
    end
end
if contains(ver_str, 'R2020b')
    if exist('/opt/gcc-8.4.0/bin', 'dir')
        setenv('PATH', ['/opt/gcc-8.4.0/bin:' getenv('PATH')]);
    end
end
So when compiling things in MATLAB it will automagically pick up the correct GCC version.
 
1 members found this post helpful.
Old 02-25-2021, 09:01 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,065

Original Poster
Rep: Reputation: Disabled
Thanks drumz. However it's for Slint not for me, so I can't handle things that way.
 
  


Reply



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
Fedora 7 Caveat dfowensby Fedora 8 06-03-2007 11:53 AM
LXer: Feilner's OpenVPN a Good Read - With One Caveat LXer Syndicated Linux News 0 12-15-2006 10:54 AM
After ugrading php it aint working *** :) Belize Slackware 1 01-07-2005 02:47 AM
ugrading parts of 9.0 to 9.2 bbking SUSE / openSUSE 3 12-01-2004 11:14 AM
CAVEAT: /boot/kernel.h & how not to clobber your kernel sources (Conectiva, Red Hat) JCCyC LinuxQuestions.org Member Success Stories 0 08-07-2003 07:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:58 PM.

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