Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 727292 - app-emulation/virtualbox-6.1.6 ignores CC
Summary: app-emulation/virtualbox-6.1.6 ignores CC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Lars Wendler (Polynomial-C)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-06 10:32 UTC by Maxim Mikityanskiy
Modified: 2020-06-13 21:06 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,41.36 KB, text/plain)
2020-06-06 10:34 UTC, Maxim Mikityanskiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Mikityanskiy 2020-06-06 10:32:15 UTC
Due to bug [1] (virtualbox doesn't build with gcc 10), I created an env file to build it with gcc 9:

/etc/portage/env/compiler-gcc9:
CC="gcc-9.3.0"
CXX="g++-9.3.0"

/etc/portage/package.env:
=app-emulation/virtualbox-6.1.6 compiler-gcc9

However, virtualbox doesn't obey this setting and still tries to use /usr/bin/gcc (which is gcc 10).

I found out that the ebuild doesn't pass CC and CXX to virtualbox's build system correctly. Instead of TOOL_GCC3_CC, TOOL_GCC3_CXX, etc., it should use TOOL_GXX3_CC, TOOL_GXX3_CXX, etc. If you look at Config.kmk, you'll see that VBOX_GCC_TOOL is set to GXX3 on Linux systems, and then it sets tools' paths as follows:

VBOX_GCC_PATH_CC               ?= $(which $(TOOL_$(VBOX_GCC_TOOL)_CC))
VBOX_GCC_PATH_CXX              ?= $(which $(TOOL_$(VBOX_GCC_TOOL)_CXX))
...

That means that virtualbox's build system expects the gcc path in TOOL_GXX3_CC on Linux, not in TOOL_GCC3_CC. The ebuild should be fixed accordingly (and for other tools, too).

There is also VBOX_GCC32_TOOL (that can be the same as VBOX_GCC_TOOL or GCC32, depending on the architecture), and also VBOX_GCC_TOOL can be GXX32 or GXX64 when cross-compiling. These cases should also be covered in the ebuild.

[1]: https://bugs.gentoo.org/722676

Reproducible: Always

Steps to Reproduce:
1. eselect gcc set x86_64-pc-linux-gnu-10.1.0
2. Create package.env config as described above to set CC and CXX to gcc 9 for virtualbox.
3. emerge -avt1 virtualbox
Actual Results:  
The build fails, because virtualbox still tries to use /usr/bin/gcc (gcc 10), instead of gcc 9.

Expected Results:  
virtualbox builds with gcc 9.

Portage 2.3.100 (python 3.7.7-final-0, default/linux/amd64/17.0/hardened, gcc-10.1.0, glibc-2.31-r3, 5.7.0-gentoo x86_64)
=================================================================
System uname: Linux-5.7.0-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700K_CPU_@_4.00GHz-with-gentoo-2.7
KiB Mem:    24552020 total,  11252804 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Wed, 03 Jun 2020 10:00:01 +0000
Head commit of repository gentoo: 2ac4eb35b1fe129ec74c118d1cbb32896ec52803
sh bash 5.0_p17
ld GNU ld (Gentoo 2.34 p4) 2.34.0
app-shells/bash:          5.0_p17::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18::gentoo, 3.6.10-r1::gentoo, 3.7.7-r2::gentoo, 3.8.3::gentoo, 3.9.0_beta1::gentoo
dev-util/cmake:           3.17.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.15.1-r2::gentoo, 1.16.2::gentoo
sys-devel/binutils:       2.34-r1::gentoo
sys-devel/gcc:            8.4.0-r1::gentoo, 9.3.0::gentoo, 10.1.0::gentoo
sys-devel/gcc-config:     2.3::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r3::gentoo
Repositories:

gentoo
    location: /build/repositories/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 

local
    location: /build/repositories/local
    masters: gentoo
    priority: 0

steam-overlay
    location: /build/repositories/steam-overlay
    sync-type: laymansync
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

Installed sets: @esteam
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O3 -pipe -march=native"
DISTDIR="/build/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/etc/init.d/*"
LANG="ru_UA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru"
MAKEOPTS="-j8 -l8"
PKGDIR="/build/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/build/tmp"
USE="X a52 aac acl acpi alsa amd64 apparmor avahi avx avx2 bzip2 cairo caps cdda colord crypt cups dbus djvu dri dts dvdr dvi eds emboss encode evo exif fat filecaps firefox firefox-bookmarks flac gif gnome gnome-keyring gnome-online-accounts gstreamer gtk hardened iconv icu introspection ipv6 jit jpeg lcms libnotify libproxy libsecret libtirpc mad mmx mmxext mng modemmanager mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf pie png policykit ppds pulseaudio readline seccomp spell split-usr sse sse2 sse3 sse4_1 sse4_2 ssl ssp ssse3 startup-notification svg systemd tiff tracker truetype udev udisks unicode upnp upnp-av upower usb vaapi vorbis x264 xattr xcb xml xps xtpax xv xvid zeroconf zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25 ruby27" SANE_BACKENDS="net pixma" USERLAND="GNU" VIDEO_CARDS="intel nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Maxim Mikityanskiy 2020-06-06 10:34:12 UTC
Created attachment 643598 [details]
build.log
Comment 2 Larry the Git Cow gentoo-dev 2020-06-13 21:06:31 UTC
The bug has been closed via the following commit(s):

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

commit ab5b46fcf3d20f30ff6cff94cabfa9c32142014b
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2020-06-13 21:06:11 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2020-06-13 21:06:24 +0000

    virtualbox packages: Bump to versions 5.2.42, 6.0.22 and 6.1.10
    
    Bug: https://bugs.gentoo.org/707082
    Closes: https://bugs.gentoo.org/726340
    Closes: https://bugs.gentoo.org/727292
    Package-Manager: Portage-2.3.100, Repoman-2.3.22
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 app-emulation/virtualbox-additions/Manifest        |   3 +
 .../virtualbox-additions-5.2.42.ebuild             |  33 ++
 .../virtualbox-additions-6.0.22.ebuild             |  34 ++
 .../virtualbox-additions-6.1.10.ebuild             |  34 ++
 app-emulation/virtualbox-bin/Manifest              |  10 +
 .../virtualbox-bin-5.2.42.137960.ebuild            | 287 ++++++++++++
 .../virtualbox-bin-6.0.22.137980.ebuild            | 292 ++++++++++++
 .../virtualbox-bin-6.1.10.138449.ebuild            | 292 ++++++++++++
 app-emulation/virtualbox-extpack-oracle/Manifest   |   3 +
 .../virtualbox-extpack-oracle-5.2.42.137960.ebuild |  42 ++
 .../virtualbox-extpack-oracle-6.0.22.137980.ebuild |  43 ++
 .../virtualbox-extpack-oracle-6.1.10.138449.ebuild |  43 ++
 app-emulation/virtualbox-guest-additions/Manifest  |   5 +
 .../virtualbox-guest-additions-5.2.42.ebuild       | 232 ++++++++++
 .../virtualbox-guest-additions-6.0.22.ebuild       | 219 +++++++++
 .../virtualbox-guest-additions-6.1.10.ebuild       | 218 +++++++++
 app-emulation/virtualbox-modules/Manifest          |   3 +
 .../virtualbox-modules-5.2.42.ebuild               |  59 +++
 .../virtualbox-modules-6.0.22.ebuild               |  55 +++
 .../virtualbox-modules-6.1.10.ebuild               |  55 +++
 app-emulation/virtualbox/Manifest                  |   7 +-
 app-emulation/virtualbox/virtualbox-5.2.42.ebuild  | 493 ++++++++++++++++++++
 app-emulation/virtualbox/virtualbox-6.0.22.ebuild  | 507 +++++++++++++++++++++
 app-emulation/virtualbox/virtualbox-6.1.10.ebuild  | 505 ++++++++++++++++++++
 app-emulation/virtualbox/virtualbox-6.1.6.ebuild   |   2 +-
 25 files changed, 3474 insertions(+), 2 deletions(-)