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

Bug 416573

Summary: x11-drivers/xf86-video-virtualbox - invalid conversion from ‘void*’ to ‘RTHEAPSIMPLEBLOCK*’ [-fpermissive]
Product: Gentoo Linux Reporter: Arvydas Sidorenko <asido4>
Component: New packagesAssignee: Alessio Cassibba (X-Drum) <swapon>
Severity: normal CC: bkohler, polynomial-c, proxy-maint
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: -fpermissive GCC flag fixes the issue
invalid conversion from ‘void*’ to ‘char*’ [-fpermissive]

Description Arvydas Sidorenko 2012-05-18 23:49:45 UTC
As the title says, x11-drivers/xf86-video-virtualbox fails to build with error:
error: invalid conversion from ‘void*’ to ‘RTHEAPSIMPLEBLOCK*’ [-fpermissive]

epatch'ing the attached patch inside src_prepare() of xf86-video-virtualbox-4.1.14.ebuild fixes the problem.

And FYI, here is my ``$ emerge --info``:
Portage (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.15-r2, 3.4.0-rc7-next-20120518 x86_64)
System uname: Linux-3.4.0-rc7-next-20120518-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8600_@_3.33GHz-with-gentoo-2.1
Timestamp of tree: Fri, 18 May 2012 23:00:01 +0000
app-shells/bash:          4.2_p28
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.8-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.5
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.7.1
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo wirelay asido
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=native -mtune=native -O2 -pipe"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -mtune=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/wirelay /usr/local/portage"
USE="X a52 aac acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran g3dvl gdbm gif gpm iconv jpeg lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nsplugin nvidia ogg opengl openmp optimization pam pango pcre pdf png policykit ppds pppd qt3support readline sdl session smp spell sse sse2 ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vaapi vdpau vim-syntax vmware-tools vorbis wxwidgets x264 xcb xinerama xml xorg xulrunner xv xvid zlib zsh-completion" 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" 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau vmware virtualbox" 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"
Comment 1 Arvydas Sidorenko 2012-05-18 23:50:15 UTC
Created attachment 312229 [details, diff]
-fpermissive GCC flag fixes the issue
Comment 2 Sebastian Pipping gentoo-dev 2012-06-09 11:37:33 UTC
Created attachment 314773 [details]
invalid conversion from ‘void*’ to ‘char*’ [-fpermissive]

I run into a variation

  invalid conversion from ‘void*’ to ‘char*’ [-fpermissive]
of this, see attached log excerpt.
Comment 3 László Szalma 2012-06-16 18:42:13 UTC
Similar for 4.1.12, (at different file)

I'm using amd64 gentoo, but ~amd64 gentoo-sources (3.4.2-r1).

In file included from /var/tmp/portage/x11-drivers/xf86-video-virtualbox-4.1.12/work/VirtualBox-4.1.12/src/VBox/Runtime/common/alloc/alloc.cpp:38:0:
/var/tmp/portage/x11-drivers/xf86-video-virtualbox-4.1.12/work/VirtualBox-4.1.12/include/iprt/string.h: In function ‘char* RTLatin1PutCp(char*, RTUNICP)’:
/var/tmp/portage/x11-drivers/xf86-video-virtualbox-4.1.12/work/VirtualBox-4.1.12/include/iprt/string.h:1405:5: error: invalid conversion from ‘void*’ to ‘char*’ [-fpermissive]
  CXX     RuntimeGuestR0 - {C}/common/checksum/crc32.cpp
kmk: *** [/var/tmp/portage/x11-drivers/xf86-video-virtualbox-4.1.12/work/VirtualBox-4.1.12/out/linux.amd64/release/obj/RuntimeGuestR0/common/alloc/alloc.o] Error 1

If needed I can attach the full build log, but I think this is the same problem.

4.1.16 compiles (and works) fine!

I think it's not OK to have a stable ebuild in the tree to not compile with almos default installation... If the attached patch fixes the problem, I sugegst to push it in the portage tree. (it's attached here 1 month ago).
Comment 4 László Szalma 2012-06-16 18:54:35 UTC
Created attachment 315541 [details]
Comment 5 László Szalma 2012-06-16 18:56:49 UTC
xf86-video-virtualbox-fpermissive.patch file contains the patch attached first to the bug.

I tested, and it works fine. I don't say the fpermissive switch for the gcc is a good fix, but it works, and it's better to use this hack, than having a broken stable ebuild in the portage tree. As I can see this coding problem is fixed by upstream in 4.1.16.
Comment 6 László Szalma 2012-06-16 18:59:56 UTC
Created attachment 315543 [details]

comment fix (sorry for abusing the bug system with too many comments)
Comment 7 Ben Kohler gentoo-dev 2013-10-03 20:20:05 UTC
Affected versions are long-gone, closing