Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54918 - vmware 4.5.2.8848 fails to compile a module with gcc-3.4.0
Summary: vmware 4.5.2.8848 fails to compile a module with gcc-3.4.0
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on: 48528
Blocks:
  Show dependency tree
 
Reported: 2004-06-23 12:23 UTC by Jon Marston
Modified: 2004-09-12 09:00 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Marston 2004-06-23 12:23:05 UTC
vmware fails to compile one of the modules with gcc-3.4.0 as the selected compiler.  All modules build ok with gcc-3.3.3.

Reproducible: Always
Steps to Reproduce:
1.emerge vmware-workstation
2./opt/vmware/bin/vmware-config.pl
3.

Actual Results:  
Building for VMware Workstation 4.5.2.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config6/vmmon-only'
make -C /lib/modules/2.6.7-ck1/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.7-ck1'
  CC [M]  /tmp/vmware-config6/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config6/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-config6/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-config6/vmmon-only/common/hash.o
  CC [M]  /tmp/vmware-config6/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-config6/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-config6/vmmon-only/common/task.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC
but not for C++
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid
for C/ObjC but not for C++
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC
but not for C++
In file included from /tmp/vmware-config6/vmmon-only/./include/vcpuset.h:56,
                 from /tmp/vmware-config6/vmmon-only/./include/modulecall.h:23,
                 from /tmp/vmware-config6/vmmon-only/common/task.c:37:
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h: In function `uint32
Atomic_ReadWrite(Atomic_uint32*, uint32)':
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h:213: warning: read-write
constraint does not allow a register
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h: In function `uint32
Atomic_ReadIfEqualWrite(Atomic_uint32*, uint32, uint32)':
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h:273: warning: read-write
constraint does not allow a register
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h: In function `void
Atomic_And(Atomic_uint32*, uint32)':
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h:363: warning: read-write
constraint does not allow a register
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h: In function `void
Atomic_Or(Atomic_uint32*, uint32)':
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h:450: warning: read-write
constraint does not allow a register
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h: In function `void
Atomic_Xor(Atomic_uint32*, uint32)':
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h:537: warning: read-write
constraint does not allow a register
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h: In function `void
Atomic_Add(Atomic_uint32*, uint32)':
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h:624: warning: read-write
constraint does not allow a register
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h: In function `void
Atomic_Sub(Atomic_uint32*, uint32)':
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h:705: warning: read-write
constraint does not allow a register
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h: In function `void
Atomic_Inc(Atomic_uint32*)':
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h:784: warning: read-write
constraint does not allow a register
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h: In function `void
Atomic_Dec(Atomic_uint32*)':
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h:862: warning: read-write
constraint does not allow a register
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h: In function `uint32
Atomic_FetchAndAdd(Atomic_uint32*, uint32)':
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h:1017: warning: read-write
constraint does not allow a register
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h: In function `Bool
Atomic_CMPXCHG64(Atomic_uint64*, const uint64*, const uint64*)':
/tmp/vmware-config6/vmmon-only/./include/vm_atomic.h:1228: warning: read-write
constraint does not allow a register
/tmp/vmware-config6/vmmon-only/common/task.c: In function `void
Task_Switch_TOT(VMDriver*, Vcpuid)':
/tmp/vmware-config6/vmmon-only/common/task.c:878: sorry, unimplemented: inlining
failed in call to 'void SwitchToMonitor(VMCP*, int) [with VMCP =
VMCrossPageTOT]': function body not available
/tmp/vmware-config6/vmmon-only/common/task.c:1053: sorry, unimplemented: called
from here
make[2]: *** [/tmp/vmware-config6/vmmon-only/common/task.o] Error 1
make[1]: *** [_module_/tmp/vmware-config6/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.7-ck1'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config6/vmmon-only'
Unable to build the vmmon module.
 
For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".
 
Execution aborted.


Expected Results:  
Successful module build and install

Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.4.0, glibc-2.3.3.20040420-r0,
2.6.7-ck1)
=================================================================
System uname: 2.6.7-ck1 i686 AMD Athlon(tm) XP 2700+
Gentoo Base System version 1.4.16
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -pipe -ffast-math"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -pipe -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://lug.mtu.edu/gentoo/
ftp://ftp.ussg.iu.edu/pub/linux/gentoo
ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo/
ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ 
ftp://ftp.rnl.ist.utl.pt/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X alsa apm arts avi berkdb bonobo cdr crypt cups dga dvd dvdr encode
esd foomaticdb gdbm gif gnome gpm gtk gtk2 imlib ipv6 java jpeg krb4 libg++
libwww mad mikmod mmx motif mozilla mpeg ncurses nls oggvorbis opengl oss pam
pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcltk tcpd
truetype usb x86 xml2 xmms xv xvid zlib"

Bug can be reproduced with several different kernel versions, versions tested:
2.6.7-ck1
2.6.7-rc3
2.6.6
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2004-06-23 13:11:32 UTC
Please check out the patches in bug #53879 and see if that solves the problem for you.
Comment 2 Jon Marston 2004-06-24 04:42:37 UTC
I applied the patches and, although they applied without rejects, the compile still failed.
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2004-06-24 05:01:39 UTC
Change your CFLAGS to "-O2 -march=athlon-xp -fomit-frame-pointer -pipe" and we'll see if it works.  I've heard of problems with GCC 3.4 and -O3, and -ffast-math creates problems, as it uses inaccurate math, which can definitely cause problems with certain packages.
Comment 4 Jon Marston 2004-06-24 05:13:13 UTC
The problem isn't with the emerge though (doesn't get CFLAGS from make.conf).
THe compile fails when doing:
/opt/vmware/bin/vmware-config.pl
I don't know where it gets the cflags for that compile from, but the line:
CC [M]  /tmp/vmware-config6/vmmon-only/linux/driver.o
suggests it may be using gcc without parameters.
Tell me if I'm way off here though.
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2004-06-24 06:01:33 UTC
Sorry, you're correct.

It looks like VMware will pull CFLAGS from the environment at runtime.  Unless you've modified your environment by exporting CFLAGS manually, they shoudl not affect the build.  Also, it looks as if it gets its compilation options from the kernel Makefile, so it would be the same as what you used to compile your kernel.
Comment 6 Chris Gianelloni (RETIRED) gentoo-dev 2004-06-24 06:02:08 UTC
Can you check the ebuild and see which version of the vmware-any-any-update it is using?
Comment 7 Jon Marston 2004-06-24 06:13:10 UTC
vmware-any-any-update72
Actually, I don't think this happened with the previous version vmware.
Is the only change with the vmware-any-any-update file?
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2004-06-24 06:24:24 UTC
Well, the vmware-any-any-update patch is needed for VMware to successfully compile on many machines.  The 4.5.1 ebuild originally did not include the updates, but it was added when the revision was bumped (I beleive, going form memory).  The 4.5.2 ebuild did not use the update originally, but it was added to fix compilation problems for many people.
Comment 9 Jon Marston 2004-06-24 06:35:05 UTC
So the compile problems are more likely to be down to an incompatibilty with my system than gcc3.4?
We could do with other people testing with gcc3.4
Comment 10 Redeeman 2004-06-24 06:40:52 UTC
fails to compile here too.
Comment 11 Tuan Van (RETIRED) gentoo-dev 2004-06-25 14:15:21 UTC
linux-headers-2.6.7?
Comment 12 Jon Marston 2004-06-26 10:20:28 UTC
Doesn't the script use the headers from /usr/src/linux?
If it does, then /usr/src/linux points to the source for my current kernel.
Comment 13 Tuan Van (RETIRED) gentoo-dev 2004-06-26 22:40:06 UTC
Sorry for my previous comment. It was stupid. The solution is untar /opt/vmware/lib/modules/source/vmmon.tar then apply this patch:

--- vmmon-only/include/vm_basic_types.h.orig    2004-06-26 22:33:51.751238947 -0700
+++ vmmon-only/include/vm_basic_types.h 2004-06-26 22:24:06.069124255 -0700
@@ -286,7 +286,7 @@
  * are added the inline-ness should be removed.
  */

-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ == 3)
 /*
  * Starting at version 3.3, gcc does not always inline functions marked
  * 'inline' (it depends on their size). To force gcc to do so, one must use the

tar it back and run `vmware-config.pl`
It looks like the inline thing has been changed again.
Comment 14 Jon Marston 2004-06-28 04:03:33 UTC
Nice one yeah, it work after that patch - thanks. Although, it still gives a shed load of warnings:
make[1]: Entering directory `/usr/src/linux-2.6.7-mm3'
  CC [M]  /tmp/vmware-config10/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config10/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/hash.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-config10/vmmon-only/common/task.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid f or C/ObjC but not for C++
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
In file included from /tmp/vmware-config10/vmmon-only/./include/vcpuset.h:56,
                 from /tmp/vmware-config10/vmmon-only/./include/modulecall.h:23,
                 from /tmp/vmware-config10/vmmon-only/common/task.c:37:
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h: In function `uint32 Atomi c_ReadWrite(Atomic_uint32*, uint32)':
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h:213: warning: read-write c onstraint does not allow a register
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h: In function `uint32 Atomi c_ReadIfEqualWrite(Atomic_uint32*, uint32, uint32)':
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h:273: warning: read-write c onstraint does not allow a register
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h: In function `void Atomic_ And(Atomic_uint32*, uint32)':
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h:363: warning: read-write c onstraint does not allow a register
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h: In function `void Atomic_ Or(Atomic_uint32*, uint32)':
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h:450: warning: read-write c onstraint does not allow a register
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h: In function `void Atomic_ Xor(Atomic_uint32*, uint32)':
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h:537: warning: read-write c onstraint does not allow a register
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h: In function `void Atomic_ Add(Atomic_uint32*, uint32)':
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h:624: warning: read-write c onstraint does not allow a register
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h: In function `void Atomic_ Sub(Atomic_uint32*, uint32)':
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h:705: warning: read-write c onstraint does not allow a register
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h: In function `void Atomic_ Inc(Atomic_uint32*)':
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h:784: warning: read-write c onstraint does not allow a register
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h: In function `void Atomic_ Dec(Atomic_uint32*)':
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h:862: warning: read-write c onstraint does not allow a register
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h: In function `uint32 Atomi c_FetchAndAdd(Atomic_uint32*, uint32)':
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h:1017: warning: read-write constraint does not allow a register
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h: In function `Bool Atomic_ CMPXCHG64(Atomic_uint64*, const uint64*, const uint64*)':
/tmp/vmware-config10/vmmon-only/./include/vm_atomic.h:1228: warning: read-write constraint does not allow a register
  CC [M]  /tmp/vmware-config10/vmmon-only/common/vmx86.o

As long as it works though!
Again, thanks for your time. 
Comment 15 Chris Gianelloni (RETIRED) gentoo-dev 2004-06-28 06:17:11 UTC
Alright... I've updated the ebuild for 4.5.1 and 4.5.2 to use the latest vmware-any-any-update, which fixes this problem.  I did not bump either, since I saw no reason as it only affects people running GCC > 3.3, which isn't even marked ~x86 yet.

Anyway, sync up and re-emerge to solve this problem.
Comment 16 doug whiteley 2004-08-21 19:09:08 UTC
I get the same (or a very similar) problem, even with the new ebuilds. The line numbers where the problem originates differ, though...

module-building results:

Building for VMware Workstation 4.5.2.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config8/vmmon-only'
make -C /lib/modules/2.6.8.1-mm2/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.8.1-mm2'
  CC [M]  /tmp/vmware-config8/vmmon-only/linux/driver.o
  CC [M]  /tmp/vmware-config8/vmmon-only/linux/hostif.o
  CC [M]  /tmp/vmware-config8/vmmon-only/common/cpuid.o
  CC [M]  /tmp/vmware-config8/vmmon-only/common/hash.o
  CC [M]  /tmp/vmware-config8/vmmon-only/common/memtrack.o
  CC [M]  /tmp/vmware-config8/vmmon-only/common/phystrack.o
  CC [M]  /tmp/vmware-config8/vmmon-only/common/task.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
/tmp/vmware-config8/vmmon-only/common/task.c: In function `void Task_Switch_V45(VMDriver*, Vcpuid)':
/tmp/vmware-config8/vmmon-only/common/task.c:859: sorry, unimplemented: inlining failed in call to 'void SwitchToMonitor(VMCP*, int) [with VMCP = VMCrossPageV45]': function body not available
/tmp/vmware-config8/vmmon-only/common/task.c:1351: sorry, unimplemented: called from here
make[2]: *** [/tmp/vmware-config8/vmmon-only/common/task.o] Error 1
make[1]: *** [_module_/tmp/vmware-config8/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.8.1-mm2'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config8/vmmon-only'
Unable to build the vmmon module.

My emerge info:

Portage 2.0.50-r9 (gcc34, gcc-3.4.1, glibc-2.3.4.20040808-r0, 2.6.8.1-mm2)
=================================================================
System uname: 2.6.8.1-mm2 i686 AMD Athlon(tm) XP 3200+
Gentoo Base System version 1.5.3
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox sfperms"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://194.83.57.3/sites/www.ibiblio.org/gentoo/ http://212.219.56.152/sites/www.ibiblio.org/gentoo/ http://194.83.57.11/sites/www.ibiblio.org/gentoo/ http://212.219.56.162/sites/www.ibiblio.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/bmg-main /usr/local/overlays/bmg-gnome-current /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow S3TC X Xaw3d aac aalib acpi alsa apm avi berkdb bonobo cdr crypt dba directfb divx4linux dvd dvdread encode faad fbcon fbdev flac freetype gdbm ggi gif gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imlib java javascript jpeg libg++ libwww mad matroska mikmod mmx mmx2 monkey motif mozcalendar mozdomi mozilla mozsvg mpeg mysql nas ncurses nls nptl offensive ogg oggvorbis openal opengl pam pcre pdflib perl pic png python quicktime readline ruby samba sdl slang spell sse ssl stencil-buffer svga tcltk tcpd theora tiff transcode truetype usb videos wmf wxwin wxwindows x86 xchattext xine xml xml2 xmms xv xvid zlib"
Comment 17 Chris Arepantis 2004-09-10 07:21:28 UTC
Download http://ftp.cvut.cz/vmware/vmware-any-any-update82.tar.gz and modify the ebuild to use this instead of vmware-any-any-update75.tar.gz and the exact problem above is solved (at least for my box ~x86 gcc3.4.1 and nptl hehe).
Comment 18 Norberto Bensa 2004-09-12 08:49:09 UTC
The requested URL /vmware/vmware-any-any-update82.tar.gz was not found on this server.

:(
Comment 19 Chris Gianelloni (RETIRED) gentoo-dev 2004-09-12 09:00:10 UTC
emerge sync again.... and don't post to resolved bugs... it helps no one