Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 843437

Summary: app-emulation/virtualbox-6.1.32-r1[-pam]: build fails with missing include security/pam_appl.h
Product: Gentoo Linux Reporter: François-Xavier Carton <fx.carton91>
Component: Current packagesAssignee: Viorel Munteanu <ceamac>
Status: RESOLVED FIXED    
Severity: normal CC: bonbons, jaglover, jstein, proxy-maint
Priority: Normal Keywords: PATCH, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/26342
https://bugs.gentoo.org/show_bug.cgi?id=856769
https://bugs.gentoo.org/show_bug.cgi?id=864274
https://bugs.gentoo.org/show_bug.cgi?id=910509
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
applied patch to vbox
patch applied to ebuild so that CXXFLAGS are honored

Description François-Xavier Carton 2022-05-09 15:26:33 UTC
Building virtualbox[-pam] without PAM installed fails because of <security/pam_appl.h> missing.

I was able to build the package by:
1) applying fix_no_pam.patch (which I'll attach) which is an adaptation for that version of vbox from upstream patch https://www.virtualbox.org/changeset/94406/vbox
2) adding -DIPRT_WITHOUT_PAM=1 to CXXFLAGS with package.env, because I wasn't able to figure out how to set it with the build system
3) add the following to the ebuild, right before the configure line at the end of src_configure, so that CXXFLAGS are honored (right now they are not or filtered):

cat >> LocalConfig.kmk <<EOF || die
CFLAGS=${CFLAGS}
CXXFLAGS=${CXXFLAGS}                                                                                                   
EOF

Reproducible: Always
Comment 1 François-Xavier Carton 2022-05-09 15:29:36 UTC
Created attachment 777782 [details]
build.log
Comment 2 François-Xavier Carton 2022-05-09 15:32:18 UTC
Created attachment 777785 [details, diff]
applied patch to vbox

see https://www.virtualbox.org/changeset/94406/vbox
Comment 3 François-Xavier Carton 2022-05-09 15:35:06 UTC
Created attachment 777788 [details, diff]
patch applied to ebuild so that CXXFLAGS are honored
Comment 4 François-Xavier Carton 2022-05-09 15:38:45 UTC
Also I should add that this happened while upgrading the package. The previous version I had, 6.1.28-r1, was fine.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-06 02:24:41 UTC
*** Bug 852554 has been marked as a duplicate of this bug. ***
Comment 6 Larry the Git Cow gentoo-dev 2022-07-06 03:01:38 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19111a37141aee3704830806a4419c1cced2d131

commit 19111a37141aee3704830806a4419c1cced2d131
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-06 02:14:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-06 02:14:54 +0000

    app-emulation/virtualbox: fix build w/o PAM; respect CFLAGS
    
    Closes: https://bugs.gentoo.org/583148
    Closes: https://bugs.gentoo.org/843437
    Thanks-to: François-Xavier Carton <fx.carton91@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/virtualbox-6.1.34-no-pam.patch           | 22 +++++++++++++++
 ....1.34-r2.ebuild => virtualbox-6.1.34-r3.ebuild} | 32 ++++++++++++----------
 2 files changed, 39 insertions(+), 15 deletions(-)
Comment 7 Larry the Git Cow gentoo-dev 2022-07-12 03:10:11 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=605d086c0214e6ca8fa1ff5b62cc5d5e33a3aa47

commit 605d086c0214e6ca8fa1ff5b62cc5d5e33a3aa47
Author:     Viorel Munteanu <ceamac.paragon@gmail.com>
AuthorDate: 2022-07-11 08:17:07 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-12 03:09:58 +0000

    app-emulation/virtualbox: revert QA fix for CFLAGS
    
    It causes worse issues (the virtual machines do not start at all)
    
    This is an emergency fix, so we can unmask the package
    
    Bug: https://bugs.gentoo.org/843437
    Closes: https://bugs.gentoo.org/856811
    Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/26342
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{virtualbox-6.1.34-r5.ebuild => virtualbox-6.1.34-r6.ebuild}   | 7 -------
 profiles/package.mask                                              | 4 ----
 2 files changed, 11 deletions(-)