Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 660808 - app-emulation/virtualbox-5.2.14 PyXPCOM.h invalid conversion from ‘const char*’ to ‘char*’
Summary: app-emulation/virtualbox-5.2.14 PyXPCOM.h invalid conversion from ‘const char...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-09 16:20 UTC by Chris Smith
Modified: 2018-07-18 09:39 UTC (History)
5 users (show)

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


Attachments
virtualbox-5.2.14 build log (virtualbox-5.2.14.build.log.xz,241.63 KB, application/x-xz)
2018-07-09 16:20 UTC, Chris Smith
Details
Patch for const problem (VirtualBox-5.2.14.patch,1.12 KB, patch)
2018-07-10 08:15 UTC, Helmut Jarausch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Smith 2018-07-09 16:20:52 UTC
Created attachment 538990 [details]
virtualbox-5.2.14 build log

virtualbox-5.2.14 fails compile

GENTOO_VM=oracle-jdk-bin-1.8  CLASSPATH="" JAVA_HOME="/opt/oracle-jdk-bin-1.8.0.172"
JAVACFLAGS="-source 1.6 -target 1.6" COMPILER=""

emerge --info =virtualbox-5.2.14
Portage 2.3.41 (python 2.7.15-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-7.3.0, glibc-2.27-r5, 4.16.18-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.16.18-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770K_CPU_@_3.50GHz-with-gentoo-2.6
KiB Mem:    32839752 total,  20991308 free
KiB Swap:    6291452 total,   6114076 free
Timestamp of repository gentoo: Mon, 09 Jul 2018 12:44:21 +0000
Head commit of repository gentoo: 48e1e2c3062e8695ccd5c5e6797bff92e5d6c3e6

sh bash 4.4_p23
ld GNU ld (Gentoo 2.30 p3) 2.30.0
app-shells/bash:          4.4_p23::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.5.5-r1::gentoo, 3.6.6::gentoo, 3.7.0::gentoo
dev-util/cmake:           3.11.4::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r3::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.17::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000

tcgOverlay
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CC="gcc"
CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /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"
CXX="g++"
CXXFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY 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-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O2 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="V=1 -j1"
PKGDIR="/usr/portage/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="/var/tmp"
USE="X a52 aac aalib acl acpi activities aes alsa amd64 amr apache2 audiofile avx bash-completion berkdb bluray branding btrfs bzip2 cairo caps cdaudio cdda cddb cdparanoia cdr cdrdao chm chromecast cleartype cli corefonts crypt cups curl cxx dbus declarative djvu dri dssi dts dv dvb dvd dvdr ebook emboss encode exif fam fdk ffmpeg flac fortran gdbm gif glamor gmp google gphoto2 gpm gstreamer gtk gtk3 iconv icu ieee1394 imagemagick imap imlib introspection ipv6 jack java jpeg jpeg2k kde kipi kpathsea kwallet ladspa lame lash lcms libffi libnotify libtirpc linguas_en_US lv2 lzma mad marble midi mmap mmx mmxext mng modules mozilla mp3 mp4 mpeg mtp musicbrainz ncurses network nls nodrm nptl nsplugin nvidia ofx ogg opencl openexr opengl openmp opus pam pango pcre pdf phonon plasma png policykit popcnt ppds pulseaudio qml qt5 readline rtmp sasl scanner sdl seccomp semantic-desktop slp smp sndfile speex spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification subversion svg systemd theora threads tiff tk transparency truetype type1 udev udisks unicode unwind upower usb v4l vaapi vcd vdpau vim-syntax vorbis vpx vst wav wavpack wayland widgets wmf wxwidgets x264 x265 xattr xcb xcomposite xine xkb xml xscreensaver xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel hdsp hpet hrtimer rtctimer seqdummy virmidi" 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="author braindump flow karbon kexi krita sheets stage words" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NGINX_MODULES_HTTP="autoindex fancyindex fastcgi gzip" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby24 ruby25" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau intel modesetting" 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_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

app-emulation/virtualbox-5.2.14::gentoo was built with the following:
USE="alsa java opengl pam pulseaudio python qt5 sdk udev -debug -doc -headless -libressl -lvm -pax_kernel -vboxwebsrv -vnc" ABI_X86="(64)" PYTHON_TARGETS="python2_7"
Comment 1 Chris Smith 2018-07-09 17:00:22 UTC
It builds with -python use flag. But have always built it with python bindings in the past.

It appears it is now trying to use python-3.7 instead of python-2.7 which could be the problem.
Comment 2 Helmut Jarausch 2018-07-10 08:15:09 UTC
Created attachment 539038 [details, diff]
Patch for const problem
Comment 3 Juergen Rose 2018-07-15 08:31:32 UTC
(In reply to Helmut Jarausch from comment #2)
> Created attachment 539038 [details, diff] [details, diff]
> Patch for const problem

Thanks Helmut, the patch worked here.
Comment 4 Chris Smith 2018-07-15 18:02:22 UTC
Any chance this bug can get conformed and the fix put in the tree?
Comment 5 Juergen Rose 2018-07-16 20:57:57 UTC
The same issue happens with virtualbox-5.2.14-r1:
...
/var/tmp/portage/app-emulation/virtualbox-5.2.14-r1/work/VirtualBox-5.2.14/src/libs/xpcom18a4/python/src/ErrorUtils.cpp: In function ‘char* PyTraceback_AsString(PyObject*)’:
/var/tmp/portage/app-emulation/virtualbox-5.2.14-r1/work/VirtualBox-5.2.14/src/libs/xpcom18a4/python/src/PyXPCOM.h:141:51: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
 #   define PyUnicode_AsUTF8(o) _PyUnicode_AsString(o)
/var/tmp/portage/app-emulation/virtualbox-5.2.14-r1/work/VirtualBox-5.2.14/src/libs/xpcom18a4/python/src/ErrorUtils.cpp:443:21: note: in expansion of macro ‘PyUnicode_AsUTF8’
  char *tempResult = PyUnicode_AsUTF8(obResult);
                     ^~~~~~~~~~~~~~~~
kmk: *** [/usr/share/kBuild/footer-pass2-compiling-targets.kmk:226: /var/tmp/portage/app-emulation/virtualbox-5.2.14-r1/work/VirtualBox-5.2.14/out/linux.amd64/release/obj/VBoxPython3_7m/src/ErrorUtils.o] Error 1
 * ERROR: app-emulation/virtualbox-5.2.14-r1::gentoo failed (compile phase):
 *   emake failed
Comment 6 Juergen Rose 2018-07-16 21:44:12 UTC
The patch of comment 2 fixes the problem virtualbox-5.2.14-r1 as well.
Comment 7 Larry the Git Cow gentoo-dev 2018-07-18 09:39:14 UTC
The bug has been closed via the following commit(s):

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

commit e424f15cec2f913b6b57da33d60fe682d7f4b0cb
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2018-07-18 09:34:39 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2018-07-18 09:39:05 +0000

    virtualbox packages: Bump to version 5.2.16
    
    Closes: https://bugs.gentoo.org/660808
    Package-Manager: Portage-2.3.43, Repoman-2.3.10

 app-emulation/virtualbox-additions/Manifest        |   1 +
 .../virtualbox-additions-5.2.16.ebuild             |  33 ++
 app-emulation/virtualbox-bin/Manifest              |   4 +
 .../virtualbox-bin-5.2.16.123759.ebuild            | 287 +++++++++++++
 app-emulation/virtualbox-extpack-oracle/Manifest   |   1 +
 .../virtualbox-extpack-oracle-5.2.16.123759.ebuild |  42 ++
 app-emulation/virtualbox-guest-additions/Manifest  |   2 +
 .../virtualbox-guest-additions-5.2.16.ebuild       | 229 ++++++++++
 app-emulation/virtualbox-modules/Manifest          |   1 +
 .../virtualbox-modules-5.2.16.ebuild               |  51 +++
 app-emulation/virtualbox/Manifest                  |   2 +
 app-emulation/virtualbox/virtualbox-5.2.16.ebuild  | 471 +++++++++++++++++++++
 12 files changed, 1124 insertions(+)