Opened 12 years ago
Closed 12 years ago
#10523 closed defect (fixed)
Compile problem with gcc-4.7 on i686 => Fixed in SVN
| Reported by: | Marius Cirsta | Owned by: | |
|---|---|---|---|
| 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 (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
| Summary: | compile problem on i686 → Compile problem with gcc-4.7 on i686 => Fixed in SVN |
|---|
comment:3 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Fix is part of VirtualBox 4.1.16.


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);