VirtualBox

Ticket #10523 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Compile problem with gcc-4.7 on i686 => Fixed in SVN

Reported by: mcirsta Owned by:
Priority: major Component: other
Version: VirtualBox 4.1.14 Keywords: compile fail
Cc: Guest type: all
Host type: Linux

Description

I'm having the following problem when compiling Vbox on Linux i686:

/var/tmp/fst/src/VirtualBox-4.1.14/src/VBox/Runtime/generic/critsect-generic.cpp: In function 'int RTCritSectEnterMultipleDebug(size_t, RTCRITSECT, RTUINTPTR, const char*, unsigned int, const char*)': /var/tmp/fst/src/VirtualBox-4.1.14/src/VBox/Runtime/generic/critsect-generic.cpp:459:73: error: narrowing conversion of 'uId' from 'RTUINTPTR {aka long long unsigned int}' to 'volatile RTHCUINTPTR {aka volatile unsigned int}' inside { } is ill-formed in C++11 [-Werror=narrowing] cc1plus: all warnings being treated as errors

Vbox was being compiled with these options:

./configure --disable-docs --nofatal --disable-pulse

Everything compile fine on AMD64.

Change History

comment:1 Changed 2 years ago by frank

Thanks for the report. Actually the error is only triggered when using gcc-4.7. The following fix (which will be included in the next maintenance release) fixes the problem:

--- src/VBox/Runtime/generic/critsect-generic.cpp       (revision 77803)
+++ src/VBox/Runtime/generic/critsect-generic.cpp       (revision 77804)
@@ -454,7 +454,7 @@
 RT_EXPORT_SYMBOL(RTCritSectEnterMultiple);
 
 
-RTDECL(int) RTCritSectEnterMultipleDebug(size_t cCritSects, PRTCRITSECT *papCritSects, RTUINTPTR uId, RT_SRC_POS_DECL)
+RTDECL(int) RTCritSectEnterMultipleDebug(size_t cCritSects, PRTCRITSECT *papCritSects, RTHCUINTPTR uId, RT_SRC_POS_DECL)
 {
     RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
     return rtCritSectEnterMultiple(cCritSects, papCritSects, &SrcPos);

comment:2 Changed 2 years ago by frank

  • Summary changed from compile problem on i686 to Compile problem with gcc-4.7 on i686 => Fixed in SVN

comment:3 Changed 2 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of VirtualBox 4.1.16.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use