Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352322 - app-emulation/virtualbox-4.0.2 is mixing CXX/CFLAGS
Summary: app-emulation/virtualbox-4.0.2 is mixing CXX/CFLAGS
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-21 08:24 UTC by Justin Lecher (RETIRED)
Modified: 2017-08-31 18:05 UTC (History)
6 users (show)

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


Attachments
/var/log/portage/build/app-emulation/virtualbox-4.0.2:20110121-081045.log (virtualbox-4.0.2:20110121-081045.log,348.69 KB, text/plain)
2011-01-21 08:26 UTC, Justin Lecher (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2011-01-21 08:24:46 UTC
AS      RuntimeR3NoCRTGCC - {C}/src/VBox/Runtime/common/string/strchr.asm
  AS      RuntimeR3NoCRTGCC - {C}/src/VBox/Runtime/common/string/strcpy.asm
cc1plus: warning: command line option "-Werror-implicit-function-declaration" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Werror-implicit-function-declaration" is valid for C/ObjC but not for C++
  AS      RuntimeR3NoCRTGCC - {C}/src/VBox/Runtime/common/string/strcmp.asm
  AS      RuntimeR3NoCRTGCC - {C}/src/VBox/Runtime/common/string/strlen.asm

And it is some Werror in it. Evil!!



$ einfo app-emulation/virtualbox-4.0.2
!!! 'app-emulation/virtualbox-4.0.2' is not a valid package atom.
!!! Please check ebuild(5) for full details.
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2011-01-21 08:25:45 UTC
Portage 2.2.0_alpha18 (default/linux/amd64/10.0, gcc-4.5.2-asneeded, glibc-2.12.2-r0, 2.6.36-gentoo-r6 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.36-gentoo-r6-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Fri, 21 Jan 2011 06:30:01 +0000
ccache version 3.1.4 [enabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.5.4-r4, 2.6.6-r1, 2.7.1, 3.1.3
dev-util/ccache:     3.1.4
dev-util/cmake:      2.8.3-r1
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
Repositories: gentoo last-hope dummy science sunrise
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/hddtemp/ /usr/share/nano /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /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="-O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--verbose --jobs=6 --load-average=8 --keep-going -t"
FEATURES="assume-digests binpkg-logs buildsyspkg ccache collision-protect distlocks fixlafiles fixpackages multilib-strict news noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -march=core2 -frecord-gcc-switches -mssse3 -mcx16 -mmmx -g"
GENTOO_MIRRORS=" 	http://gentoo.j-schmitz.net/mirror/ 	ftp://ftp.gentoo.mesh-solutions.com/gentoo/ 	ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ 	ftp://de-mirror.org/distro/gentoo/ 	ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common"
LINGUAS="en"
MAKEOPTS="-j6 -l8"
PKGDIR="/usr/portage/packages"
PORTAGE_BUNZIP2_COMMAND="lbzip2 -f -d"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/data/local/last-hope/ebuilds /data/local/dummy /data/local/sci-dev /data/local/sunrise/reviewed"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 bash-completion berkdb branding bzip2 cli cracklib crypt cups cxx dbus double-precision dri fortran gdbm gif glibc-omitfp gmp gnome gnome-keyring gpm gtk iconv jpeg mmx mmxext modules mudflap multicall multilib multiprocess multiuser nano-syntax ncurses network-cron nls nptl nptlonly nvidia opengl openmp openssl pam pcre perl png pppd python readline session sse sse2 sse3 ssl ssse3 svg svgz sysfs system-sqlite tcpd tiff truetype type1 unicode xorg zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia v4l" 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:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-emulation/virtualbox-4.0.2 was built with the following:
USE="additions alsa extensions (multilib) opengl python qt4 -doc -headless -java -pulseaudio -sdk -vboxwebsrv"


Comment 2 Justin Lecher (RETIRED) gentoo-dev 2011-01-21 08:26:01 UTC
Created attachment 260423 [details]
/var/log/portage/build/app-emulation/virtualbox-4.0.2:20110121-081045.log

build.log
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-01-21 13:23:22 UTC
Okay, here's the answer I got in IRC from a vbox developer:

[13:17:22] <Poly-C> klaus-vb, what's the correct way in virtualbox-4 to submit CFLAGS/CXXFLAGS to the build? It seems like the Gentoo package is doing it wrong from version 4.0.0 on and is mixing CFLAGS in C++ files and vice versa.[14:14:25] <klaus-vb> Poly-C: the correct way is leaving this alone - any attempts to change to CFLAGS/CXXFLAGS risks breaking VirtualBox in subtle ways. there are so many different components depending on vastly different settings that it
[14:14:43] <klaus-vb> 's more likely that things break than that you can do any good
[14:15:30] <klaus-vb> one would have to tweak specific kBuild templates if you want controlled results - and there are dozens of them


So obviously we're on our own finding out how to fix this. As I literally have no clue about the kbuild system I am of no big help here. Any help is highly appreciated.
Comment 4 Ștefan Talpalaru 2011-01-24 23:58:34 UTC
try this:
        MAKE="kmk" emake \
                TOOL_GXX32_CC="$(tc-getCC)" TOOL_GXX32_CXX="$(tc-getCXX)" \
                TOOL_GXX64_CC="$(tc-getCC)" TOOL_GXX64_CXX="$(tc-getCXX)" \
                TOOL_GXX32_AS="$(tc-getCC)" TOOL_GXX32_AR="$(tc-getAR)" \
                TOOL_GXX64_AS="$(tc-getCC)" TOOL_GXX64_AR="$(tc-getAR)" \
                TOOL_GXX32_LD="$(tc-getCXX)" TOOL_GXX32_LD_SYSMOD="$(tc-getLD)" \
                TOOL_GXX64_LD="$(tc-getCXX)" TOOL_GXX64_LD_SYSMOD="$(tc-getLD)" \
                VBOX_GCC_OPT="${CFLAGS}" \
                TOOL_YASM_AS=yasm KBUILD_PATH="${S}/kBuild" \
                all || die "kmk failed"
Comment 5 Alex Funk 2011-01-25 16:19:32 UTC
I (think) I'm having the same issue.

Stephan, my emake-fu is weak.  I'm having trouble running the command you ask.  From where should I run this command?  My system can't find any of the tc-* commands.

Thanks!
Comment 6 Ștefan Talpalaru 2011-01-25 16:25:17 UTC
It's a replacement for the similar command in the ebuild (see the src_compile() function). So to try it you need to set up a local overlay (if you don't have one), copy and modify the ebuild as instructed.
Comment 7 Ben Kohler gentoo-dev 2017-08-31 18:05:35 UTC
Please reopen if this is still a problem