LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-29-2016, 01:46 PM   #1
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016
Blog Entries: 5

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
The dangers of upgrading the kernel and gcc


Hi there,

Although connected to a post of mine in the software section, I thought that I should ask a more general question here which may be of interest to other newbies.

I've upgraded the kernel on my Mint 17.3 system to 4.5.2. All works well so far, but the two packages in dkms, ndiswrapper and vboxhost, won't update correctly as they require a gcc command line option, -fstack-protector-strong, which only became available in gcc 4.9 (my system runs 4.8).

So the first question is, how safe is it to upgrade gcc on a working system, in the knowledge that any future software to be installed will need to work with the updated version of gcc, but the distro and its packages expect an older version of gcc?

More importantly, putting hardware support aside, what dangers and pitfalls are there in upgrading the kernel in a tightly-controlled system such as Mint?

To be honest, I'm close to reinstalling my old system with my trusty old kernel (I made a backup of the partition before I upgraded), but I'd like your advice on whether it's worth pursuing the latest kernel.

For info, the reason I want to upgrade to the latest kernel is that I'm learning about ext4 and want to take advantage of the most recent advances in the filesystem's capabilities, including updates to the filesystem driver in the kernel.
 
Old 04-29-2016, 02:00 PM   #2
v4r3l0v
Member
 
Registered: Dec 2013
Posts: 136

Rep: Reputation: Disabled
Kahm... oh where's Stallman's clergy to see this failure of their beloved OS...
 
Old 04-29-2016, 02:03 PM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016

Original Poster
Blog Entries: 5

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
Quote:
Originally Posted by v4r3l0v View Post
Kahm... oh where's Stallman's clergy to see this failure of their beloved OS...
Care to elucidate?
 
Old 04-29-2016, 02:31 PM   #4
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,316

Rep: Reputation: Disabled
Reinstall? You can have as many kernels installed as you want, and boot the one you choose.
 
Old 04-29-2016, 02:39 PM   #5
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016

Original Poster
Blog Entries: 5

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
Quote:
Originally Posted by Emerson View Post
Reinstall? You can have as many kernels installed as you want, and boot the one you choose.
Indeed, but with the mucking around I've had to do with VirtualBox to try to get it to work under the new kernel, it is now not guaranteed to work correctly with the previous kernel. Rolling back to the previously good configuration will ensure it does.
 
Old 04-29-2016, 02:51 PM   #6
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,316

Rep: Reputation: Disabled
Why not? All modules for different kernel versions are stored separately, when you boot an older kernel it will load vbox modules built for it.
 
Old 04-29-2016, 03:43 PM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
Quote:
Originally Posted by hydrurga View Post
Hi there,


So the first question is, how safe is it to upgrade gcc on a working system, in the knowledge that any future software to be installed will need to work with the updated version of gcc, but the distro and its packages expect an older version of gcc?
.
You mean glibc instead of gcc, no?
AFAIK gcc is a compiler, so I don't see how it could mess with an installed system
 
Old 04-29-2016, 04:03 PM   #8
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016

Original Poster
Blog Entries: 5

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
Quote:
Originally Posted by keefaz View Post
You mean glibc instead of gcc, no?
AFAIK gcc is a compiler, so I don't see how it could mess with an installed system
No, I meant gcc.

This is where my newbieness comes in, and why I asked the question.

The way I see it (obviously erroneously) is this: if a package is installed by being compiled on a target system, it will normally use the default compiler, no? So, if you upgrade the default compiler, and the new compiler is not backwards-compatible with the older one, providing the functionality that the older one had, then you are going to have problems if packages expect the older compiler or can't cope with some new means of operation or functionality in the new one. For example, previous command-line options may be deprecated in the newer version.

Linux Mint 17.3's latest supported version of gcc is 4.8. I imagine that it prefers that all software that it approves for use in the operating system is compiled with the gcc versions that it itself has approved of within the lifetime of the specific version of Mint. If I replace the default gcc compiler with a version outside of those, and programs build against that new version then it reduces the control that Mint has over its own system.

Now that I've got all that out, feel free to blast it to pieces. I deserve it. :-)
 
Old 04-29-2016, 04:05 PM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016

Original Poster
Blog Entries: 5

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
Quote:
Originally Posted by Emerson View Post
Why not? All modules for different kernel versions are stored separately, when you boot an older kernel it will load vbox modules built for it.
You would have thought so, but booting off the older kernel resulted in VirtualBox continuing to refuse to launch clients, albeit for other reasons, so I've just rolled back to my known good configuration.
 
Old 04-29-2016, 04:09 PM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
On rare occasion you will see a software compilation fails because of a too recent version of compiler...

I have a question though, how do you plan to manage the gcc update? You want to compile and install it from source?
 
Old 04-29-2016, 04:21 PM   #11
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19.1 MATE
Posts: 8,016

Original Poster
Blog Entries: 5

Rep: Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859Reputation: 2859
Quote:
Originally Posted by keefaz View Post
On rare occasion you will see a software compilation fails because of a too recent version of compiler...

I have a question though, how do you plan to manage the gcc update? You want to compile and install it from source?
To be honest, I don't know. I was hoping that someone might tell me the safest way of updating it.

I guess that I would minimise the possibility of a "too recently versioned compiler fail" by upgrading from my current gcc 4.8.4 to the -fstack-protector-strong supporting 4.9 rather than any further, but of course it would be better to be able to find a way to allow VirtualBox to compile its modules with 4.9 but not have that as the system default.

As it is, I think I'm just going to install Manjaro as a test operating system for my ext4 work as it appears to have less constraints on it than Mint, while keeping Mint for my main working system. I did try to run Manjaro as a VirtualBox VM but Plasma would crash incessantly and eventually the whole system borked, but perhaps it will work correctly if installed directly on a HDD partition.
 
Old 04-30-2016, 02:52 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,452

Rep: Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601Reputation: 2601
well it you change the kernel and gcc outside of the package manager
you CAN have major issues if caution is not taken

think of it this way

the kernel is the "brain" and gcc is the "heart"


now you can have many different versions of gcc installed , it is designed that way
but you really can not REPLACE the default version of gcc without having "issues"

Quote:
On rare occasion you will see a software compilation fails because of a too recent version of compiler...
i see that ALL THE TIME with Fedora
the version of gcc installed is almost always SO NEW that a lot of software will not YET build with out hacking the program

-- normally it is a simple couple line fix to bring it into compliance with the new gcc ( but not always gcc4.0 to 4.1 and 4.3 were FUN!! )

Last edited by John VV; 04-30-2016 at 02:55 PM.
 
1 members found this post helpful.
Old 04-30-2016, 03:17 PM   #13
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,842

Rep: Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472Reputation: 1472
well, sometimes you can use the -std= option to specify which language standard to use, even which gnu standard to use...

So the compiler is quite flexible that way.
 
1 members found this post helpful.
  


Reply


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
Dangers of not rebooting after a kernel upgrade? Guttorm Debian 3 06-22-2009 11:14 AM
upgrading kernel and gcc crash88 Slackware 2 06-01-2006 08:48 PM
upgrading from gcc 3.2 to gcc 3.4 in redhat 9.0 uma_mahesh_2005 Linux - Software 1 04-03-2006 01:08 AM
Upgrading gcc-3.4.3 from gcc-3.3.5 on Debian v3.1 MKSrivastava Debian 2 11-21-2005 10:09 PM
upgrading gcc ecastro Linux From Scratch 1 02-09-2004 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:54 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration