FS#44784 - [linux] kernel 4.0.1-1-ARCH was compiled with gcc-5.1

Attached to Project: Arch Linux
Opened by red solja (redsolja) - Wednesday, 29 April 2015, 20:22 GMT
Last edited by Evangelos Foutras (foutrelis) - Thursday, 21 May 2015, 23:21 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 11
Private No

Details

Description:
The kernel was compiled with gcc-5.1.

However the gcc version we have in our systems is 4.9.2

This creates a number of problems regarding module recompilation (e.g. vmware).

Fortunately I was able to work around this by uncommenting the testing and the testing-multilib repos, upgrading the system to download the gcc-5.1 and its deps from testing, recompile the vmware modules and downgrade everything back.

Additional info:
* linux-4.0.1-1-ARCH
* gcc-4.9.2
   log.txt (0.8 KiB)
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Thursday, 21 May 2015, 23:21 GMT
Reason for closing:  Fixed
Additional comments about closing:  gcc 5.1.0-4 is now in [core].
Comment by Evangelos Foutras (foutrelis) - Thursday, 30 April 2015, 15:03 GMT
I wouldn't consider this to be an issue with the kernel package; if VMware requires GCC 5.1 just because the kernel was built with it, then that's a problem with VMware itself.
Comment by Kenneth Douglas (kennyd263) - Thursday, 30 April 2015, 22:43 GMT
It is best practice to compile kernel modules with the same compiler as the kernel, this isn't some arbitrary behaviour on the part of VMware.
Comment by Evangelos Foutras (foutrelis) - Thursday, 30 April 2015, 23:43 GMT
I stand corrected; the kernel headers do seem to define some things differently based on the compiler version.
Comment by John (graysky) - Friday, 01 May 2015, 08:46 GMT
Foutrelis - is it a common practice to build official packages in an environment that has [testing] enabled?
Comment by Evangelos Foutras (foutrelis) - Friday, 01 May 2015, 08:58 GMT
Yes, and that is the correct thing to do in most cases.

Edit (to clarify):

- Packages that get uploaded to [testing] are usually built against [testing].
- Packages that get uploaded straight to [extra] or [community] are NOT built with [testing] enabled.
Comment by John (graysky) - Saturday, 02 May 2015, 07:20 GMT
Thanks for the info, foutrelis. In the case of kernel and gcc disconnect (ie one in [core] and then other in [testing]), do you plan to deviate from this practice?
Comment by Skupin Skupin (stefan.skupin) - Saturday, 02 May 2015, 13:51 GMT
Same problem with linux-lts-3.14.40
Comment by red solja (redsolja) - Monday, 04 May 2015, 19:08 GMT
Why don't you just recompile the kernel with [testing] disabled so that noone has a problem? And if gcc 5.1 is required, why don't you push it together with the kernel?
Comment by Eric Duncan (eduncan911) - Thursday, 07 May 2015, 18:49 GMT
While VMware's vmhgfs *will* compile if enabling testing repos and upgrading gcc to 5.1, it does not work. It hard locks the Arch VM if you attempt to enable sharing, share a folder and try to install the tools. The kernel also freezes on boot when enabling vmhgfs.

That's an issue with VMware tools itself because of the newer version of the kernel.

But still, I really think the kernel should be upgraded/released with the same GCC version.
Comment by Ragnar Rova (rrva) - Saturday, 09 May 2015, 10:46 GMT
Same problems for me with vmware vmhgfs: kernel freeze, and then instant reboot when you mount vmhgfs on boot.

Also voting for the kernel to be compiled with gcc 4.x until gcc is out of testing.

Convincing vmware-config-tools.pl to skip the gcc version checks was hard, so have not been able to test if compiling the vmhgfs module with gcc 4.x on the kernel compiled with gcc 5.x at all works.
Comment by Eric Duncan (eduncan911) - Saturday, 09 May 2015, 11:15 GMT
Not trying to make this a vmware-bug, as the original bug report is that the kernel is being compiled with a different GCC than is shipped/sync'd in the repos and we are saying not to ship a kernel unless it was compiled with the same GCC...

But, I did finally get vmhgfs compiled and working without locking up.  For those of u who are coming here looking for VMware help, go here:

https://bbs.archlinux.org/viewtopic.php?pid=1526922#p1526922

In short, recompile the kernel using ABS using GCC 4.9 that is on the system.  If attempting to upgrade GCC to 5.1 that is in testing, it hard locks the VM.  It also requires patching the VMware tools to get around the current Linux kernel api changes (also mentioned in that link).
Comment by Bruno Pagani (ArchangeGabriel) - Wednesday, 20 May 2015, 08:28 GMT
This is an issue for DKMS too with current 4.0.3 kernel. The rebuild of my modules failed because of this.
Comment by red solja (redsolja) - Wednesday, 20 May 2015, 08:42 GMT
3 kernels so far and every one of them is compiled with gcc-5.1.

Keeping on doing this, affects the stability of our systems.
Comment by nasosnik (nasosnik) - Wednesday, 20 May 2015, 11:06 GMT
Is there any particular reason that kernel packagers ignore Arch users that have issues that have been reported nearly a month ago?
Is there any explanation why kernel is *still* being compiled with gcc from [testing] repository although it has been reported that causes issues?
Comment by Michael Gisbers (mgisbers) - Thursday, 21 May 2015, 14:19 GMT
I just hit the same problem, all kernel modules using dkms for dynamic updates fail compiling machines booted with recent kernels compiled with gcc-5.1.

The only workaround is to enable testing repo and install gcc from testing.

Compiling core packages (e. g. linux) should only be done by using core compiler versions.

I'm note quite sure if installing gcc-5.1 including dependencies from testing repo might break other programs or packages.
Comment by red solja (redsolja) - Thursday, 21 May 2015, 14:24 GMT
Another workaround besides enabling testing and installing gcc is to recompile the kernel with your compiler.
https://bbs.archlinux.org/viewtopic.php?pid=1526801#p1526801

Still though, we haven't got any serious response on the actual problem :/
Comment by Michael Gisbers (mgisbers) - Thursday, 21 May 2015, 14:42 GMT
Compiling every new kernel after updates and pushing them to all machines cannot be an alternative to shipping a kernel compiled with the compiler shipped in the same repo. This should be the normal case. Everyone who needs a kernel compiled with gcc-5.1 from testing repo may do this step, but no 'normal' arch users.
Comment by red solja (redsolja) - Thursday, 21 May 2015, 14:44 GMT
I completely agree - I didn't want to misdirect your point.

I just wanted to inform you about another workaround in case you didn't know about it.

Loading...