Cant compile this package on my non-hardened system. It applies all the patches but when it gets to link-lazy.patch during prepare phase, the emerge fails with an error. I then navigated to the patch.out and saw the patch cant find a file and that the patch is to be applied to config.kmk to add some paramters to one line so that it can fix a bug #394757 intended for hardened-gcc compiles. I fixed this bug by commenting out the code in the xf86-video-virtualbox-4.3.4-ebuild file that applies the link-lazy.patch. the coding uses the 'if gcc-specs-now' I guess as a way to check if the compiler is the gcc-hardened one, and then to apply that patch. I assume that check doesn't work since it thought my gcc was hardened and went on to apply the patch. there should be should be a check to see if its hardened else its not-hardened and to skip that patch. Reproducible: Always Steps to Reproduce: 1.tried to emerge package 2.package gets to prepare phase and starts applying patches 3.emerge failed because it tried apply link-lazy.patch, a hardened-gcc patch with a non-hardened gcc. Actual Results: got the message "Failed Patch: xf86-video-virtualbox-link-lazy.patch ! ( /usr/portage/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox/files/xf86-video-virtualbox-link-lazy.patch ) Expected Results: not applied that patch that was added to fix a bug for hardened-gcc and emerged the packaged successfully
Created attachment 365482 [details] emerge --info
Created attachment 365484 [details, diff] /var/tmp/portage/x11-drivers/xf86-video-virtualbox-4.3.4/temp/xf86-video-virtualbox-link-lazy.patch.out
Created attachment 365486 [details] xf86-video-virtualbox-4.3.4.ebuild lines 89, 90, and 91 are the code that check to see if the gcc is a hardened one and then applies the patch. Comment out these lines if you have a non-hardened gcc to successfully compile this package.
please ignore, I just noticed my gcc is hardened. somehow my kernels got mixed up. I have both a non-hardened and hardened kernel selection at grub. its booting a non-hardened karnel with hardened toolchain
Created attachment 367638 [details, diff] Refreshed link lazy patch This refreshed patch allows epatch to do its job.
Created attachment 367640 [details, diff] 4.3.6 Ebuild Patch to use refreshed lazy link patch
+*xf86-video-virtualbox-4.2.22 (11 Jan 2014) + + 11 Jan 2014; Lars Wendler <polynomial-c@gentoo.org> + +xf86-video-virtualbox-4.2.22.ebuild, xf86-video-virtualbox-4.3.6.ebuild, + +files/xf86-video-virtualbox-4.3.6-link-lazy.patch: + Version bump. Fixed link lazy patch (bug #494478). + Please test and report back your results.
(In reply to Lars Wendler (Polynomial-C) from comment #7) > +*xf86-video-virtualbox-4.2.22 (11 Jan 2014) > + > + 11 Jan 2014; Lars Wendler <polynomial-c@gentoo.org> > + +xf86-video-virtualbox-4.2.22.ebuild, xf86-video-virtualbox-4.3.6.ebuild, > + +files/xf86-video-virtualbox-4.3.6-link-lazy.patch: > + Version bump. Fixed link lazy patch (bug #494478). > + > Please test and report back your results. Well, it fixes the compilation for me, but now I have this issue: Failed to load /usr/lib64/xorg/modules/drivers/vboxvideo_drv.so: /usr/lib64/xorg/modules/drivers/vboxvideo_drv.so: undefined symbol: vgaHWFree HWRec And I'm a bit stuck now.
Created attachment 374382 [details, diff] Updated patch to add lazy linking A little bruteforce addition of -Wl,-z,lazy to LDFLAGS definitions created this patch. The 2nd part is same as previous patch. All three parts are certainly not necessary but I wasn't really sure what was the appropriate place to add it and it doesn't complain
Still broken with Virtualbox 4.3.16 / hardened GCC (as per comment 8, missing symbol in vboxvideo_drv.so). The patch from Fredric Johansson works.
*** This bug has been marked as a duplicate of bug 546362 ***