Bug 1305108 - open-vm-tools FTBFS with GCC 6
open-vm-tools FTBFS with GCC 6
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: open-vm-tools (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ravindra Kumar
Fedora Extras Quality Assurance
:
: 1307816 (view as bug list)
Depends On:
Blocks: F24FTBFS F25BetaBlocker
  Show dependency treegraph
 
Reported: 2016-02-05 11:34 EST by Richard W.M. Jones
Modified: 2016-05-31 05:21 EDT (History)
6 users (show)

See Also:
Fixed In Version: open-vm-tools-10.0.5-2.fc24 open-vm-tools-10.0.5-2.fc23 open-vm-tools-10.0.5-2.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-26 13:31:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
build.log (200.88 KB, text/plain)
2016-04-23 02:42 EDT, Richard W.M. Jones
no flags Details

  None (edit)
Description Richard W.M. Jones 2016-02-05 11:34:34 EST
Description of problem:

We recently did our regular mass rebuild of packages in Fedora,
and open-vm-tools failed to rebuild.  The errors appear to be
connected to the introduction of GCC 6.

https://koji.fedoraproject.org/koji/taskinfo?taskID=12846436
https://kojipkgs.fedoraproject.org//work/tasks/4316/12854316/build.log

Version-Release number of selected component (if applicable):

open-vm-tools-10.0.0-9.fc24

How reproducible:

100%

Steps to Reproduce:
1. Rebuild the package in Rawhide.
Comment 1 Jan Kurik 2016-02-24 09:24:49 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 2 Adam Williamson 2016-04-22 16:45:05 EDT
*** Bug 1307816 has been marked as a duplicate of this bug. ***
Comment 3 Adam Williamson 2016-04-22 16:48:01 EDT
This affects both Rawhide and F24, but it is now critical for Rawhide. open-vm-tools must be rebuilt for the bumped ICU that landed in Rawhide, but it cannot because of this bug.

open-vm-tools-desktop is pulled into the Workstation live image, so this bug prevents the Workstation live image from composing on Rawhide:

http://koji.fedoraproject.org/koji/taskinfo?taskID=13759324

08:18:47,198 ERR anaconda: The following software marked for installation has errors.  This is likely caused by an error with
your installation source.

nothing provides libfreerdp-client.so.2.0()(64bit) needed by vinagre-3.20.1-1.fc25.x86_64.
nothing provides libicudata.so.56()(64bit) needed by open-vm-tools-desktop-10.0.0-8.fc24.x86_64

I'm dealing with the vinagre thing, but this bug is beyond me.

Upstream report: https://github.com/vmware/open-vm-tools/issues/67 , where Debian are also hitting it. Apparently it's doing something clever with bitmasks and left shifts that GCC 6 is not a fan of.

As this entirely prevents the compose of a release-blocking image for Rawhide, marking as an automatic F25 Alpha blocker.
Comment 4 Richard W.M. Jones 2016-04-23 02:42 EDT
Created attachment 1149970 [details]
build.log

Attaching build.log which disappeared from original build.
Comment 5 Adam Williamson 2016-04-24 14:17:43 EDT
If you try building without -Werror, you get these errors:

In file included from /builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/hostinfo.h:35:0,
                 from dndGuest/rpcV3Util.cpp:45:
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:912:51: warning: result of '(-2147483648 << 1)' requires 33 bits to represent, but 'int' only has 32 bits [-Wshift-overflow=]
 #define VMW_BIT_MASK(shift)  (((1 << (shift - 1)) << 1) - 1)
                                ~~~~~~~~~~~~~~~~~~~^~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:916:34: note: in expansion of macro 'VMW_BIT_MASK'
    CPUID_##name##_MASK         = VMW_BIT_MASK(size) << bitpos, \
                                  ^~~~~~~~~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:292:1: note: in expansion of macro 'FIELD'
 FIELD(  0,  0, EAX,  0, 32, NUMLEVELS,                             ANY, FALSE) \
 ^~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:870:4: note: in expansion of macro 'CPUID_FIELD_DATA_LEVEL_0'
    CPUID_FIELD_DATA_LEVEL_0                                           \
    ^~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:927:4: note: in expansion of macro 'CPUID_FIELD_DATA'
    CPUID_FIELD_DATA
    ^~~~~~~~~~~~~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:912:51: error: left operand of shift expression '(-2147483648 << 1)' is negative [-fpermissive]
 #define VMW_BIT_MASK(shift)  (((1 << (shift - 1)) << 1) - 1)
                               ~~~~~~~~~~~~~~~~~~~~^~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:916:34: note: in expansion of macro 'VMW_BIT_MASK'
    CPUID_##name##_MASK         = VMW_BIT_MASK(size) << bitpos, \
                                  ^~~~~~~~~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:292:1: note: in expansion of macro 'FIELD'
 FIELD(  0,  0, EAX,  0, 32, NUMLEVELS,                             ANY, FALSE) \
 ^~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:870:4: note: in expansion of macro 'CPUID_FIELD_DATA_LEVEL_0'
    CPUID_FIELD_DATA_LEVEL_0                                           \
    ^~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:927:4: note: in expansion of macro 'CPUID_FIELD_DATA'
    CPUID_FIELD_DATA
    ^~~~~~~~~~~~~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:292:22: error: enumerator value for 'CPUID_NUMLEVELS_MASK' is not an integer constant
 FIELD(  0,  0, EAX,  0, 32, NUMLEVELS,                             ANY, FALSE) \
                      ^

John Reiser's VMW_BIT_MASK definition is:
#define VMW_BIT_MASK(shift) (int)~((~0u << (shift - 1)) << 1)

If you try that one, you get these errors:

In file included from /builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/hostinfo.h:35:0,
                 from dndGuest/rpcV3Util.cpp:45:
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:916:53: error: left operand of shift expression '(-1 << 0)' is negative [-fpermissive]
    CPUID_##name##_MASK         = VMW_BIT_MASK(size) << bitpos, \
                                                     ^
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:292:1: note: in expansion of macro 'FIELD'
 FIELD(  0,  0, EAX,  0, 32, NUMLEVELS,                             ANY, FALSE) \
 ^~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:870:4: note: in expansion of macro 'CPUID_FIELD_DATA_LEVEL_0'
    CPUID_FIELD_DATA_LEVEL_0                                           \
    ^~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:927:4: note: in expansion of macro 'CPUID_FIELD_DATA'
    CPUID_FIELD_DATA
    ^~~~~~~~~~~~~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:292:22: error: enumerator value for 'CPUID_NUMLEVELS_MASK' is not an integer constant
 FIELD(  0,  0, EAX,  0, 32, NUMLEVELS,                             ANY, FALSE) \
                      ^

Kevin Kofler's definition is:
#define VMW_BIT_MASK(shift)  ((int)(long long)(((1ULL << (shift - 1)) << 1) - 1))

with that one you get similar errors to John's:

In file included from /builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/hostinfo.h:35:0,
                 from dndUIX11.cpp:50:
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:916:53: error: left operand of shift expression '(-1 << 0)' is negative [-fpermissive]
    CPUID_##name##_MASK         = VMW_BIT_MASK(size) << bitpos, \
                                                     ^
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:916:53: note: in definition of macro 'FIELD'
    CPUID_##name##_MASK         = VMW_BIT_MASK(size) << bitpos, \
                                                     ^~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:870:4: note: in expansion of macro 'CPUID_FIELD_DATA_LEVEL_0'
    CPUID_FIELD_DATA_LEVEL_0                                           \
    ^~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:927:4: note: in expansion of macro 'CPUID_FIELD_DATA'
    CPUID_FIELD_DATA
    ^
/builddir/build/BUILD/open-vm-tools-10.0.0-3000743/lib/include/x86cpuid.h:292:22: error: enumerator value for 'CPUID_NUMLEVELS_MASK' is not an integer constant
 FIELD(  0,  0, EAX,  0, 32, NUMLEVELS,                             ANY, FALSE) \
                      ^

Even if we fix this crap, we're gonna run headlong into this one:

https://github.com/vmware/open-vm-tools/issues/82

which requires changes to the code of the kernel modules, and I ain't doing that. So I'm going to drop open-vm-tools packages from F25 comps groups until this is solved.
Comment 6 Adam Williamson 2016-04-26 12:46:24 EDT
For the record, VMware folks pointed out that we don't build any modules in the Fedora package, so #82 should not affect us. Just fixing the bitmask problem should be enough for Fedora (unless there are still other GCC 6 issues lurking).

Even with the comps change, proposing as an F25 Beta blocker, as this breaks Workstation upgrade to F25: open-vm-tools is installed in the old release and so the ICU dependency problem prevents the upgrade from working. See e.g. https://openqa.fedoraproject.org/tests/14555 .
Comment 7 Fedora Update System 2016-05-25 15:07:58 EDT
open-vm-tools-10.0.5-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-4e2c1cd9fb
Comment 8 Fedora Update System 2016-05-25 15:13:17 EDT
open-vm-tools-10.0.5-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0bd6a38cad
Comment 9 Fedora Update System 2016-05-25 15:19:35 EDT
open-vm-tools-10.0.5-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-36485d53b0
Comment 10 Ravindra Kumar 2016-05-25 15:28:00 EDT
Adam, I have submitted updates to address this issue. Could you please help us re-enable open-vm-tools packages wherever you got it disabled? Thanks!
Comment 11 Adam Williamson 2016-05-25 15:39:36 EDT
Yup, doing it now. Thanks for the fix!
Comment 12 Fedora Update System 2016-05-26 00:53:16 EDT
open-vm-tools-10.0.5-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-36485d53b0
Comment 13 Fedora Update System 2016-05-26 01:00:43 EDT
open-vm-tools-10.0.5-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0bd6a38cad
Comment 14 Fedora Update System 2016-05-26 01:01:08 EDT
open-vm-tools-10.0.5-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-4e2c1cd9fb
Comment 15 Fedora Update System 2016-05-26 13:31:38 EDT
open-vm-tools-10.0.5-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2016-05-27 22:23:22 EDT
open-vm-tools-10.0.5-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 17 Fedora Update System 2016-05-31 05:21:09 EDT
open-vm-tools-10.0.5-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.