VirtualBox

Ticket #10160 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Compile virtual box with gcc 4.7

Reported by: sergiomb Owned by:
Priority: major Component: other
Version: VirtualBox 4.1.8 Keywords:
Cc: Guest type: other
Host type: Linux

Description (last modified by frank) (diff)

Hi, has you may know for Fedora 17 will have packages rebuild with gcc 4.7, I try build VB with gcc 4.7, patch in attach.

but it will fail with a :

In file included from /usr/include/string.h:642:0,
from /builddir/build/BUILD/VirtualBox-4.1.8_OSE/include/iprt/string.h:87,                 from /builddir/build/BUILD/VirtualBox-4.1.8_OSE/src/VBox/Runtime/testcase/tstMemAutoPtr.cpp:33:
/usr/include/bits/string3.h:77:28: note: 'void* memset(void*, int,
size_t)' declared here, later in the translation unit

In file included
from /builddir/build/BUILD/VirtualBox-4.1.8_OSE/src/VBox/Runtime/testcase/tstMemAutoPtr.cpp:30:0:
/builddir/build/BUILD/VirtualBox-4.1.8_OSE/include/iprt/cpp/mem.h: In
instantiation of 'RTCMemAutoPtr<T, a_fnDestruct,
a_fnAllocator>::RTCMemAutoPtr(size_t, bool) [with T = char; void (*
a_fnDestruct)(T*) = RTCMemEfAutoFree<char>; void* (*
a_fnAllocator)(void*, size_t, const char*) = RTMemEfReallocNP; size_t =
long unsigned int]':
/builddir/build/BUILD/VirtualBox-4.1.8_OSE/src/VBox/Runtime/testcase/tstMemAutoPtr.cpp:163:82:   required from here
/builddir/build/BUILD/VirtualBox-4.1.8_OSE/include/iprt/cpp/mem.h:172:13: error: 'memset' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation }}}

Attachments

VirtualBox-OSE-4.1.8-gcc47.patch Download (752 bytes) - added by sergiomb 2 years ago.
VirtualBox-OSE-4.1.8-gcc47.patch
errmsg.sed Download (2.4 KB) - added by sergiomb 2 years ago.
VirtualBox-4.1.8_OSE/src/VBox/Runtime/common/err/errmsg.sed

Change History

Changed 2 years ago by sergiomb

VirtualBox-OSE-4.1.8-gcc47.patch

comment:1 Changed 2 years ago by frank

There are much more problem with gcc 4.7 of the current VBox code. We will adapt the code once gcc 4.7 has settled down a bit more.

comment:2 Changed 2 years ago by sergiomb

Has package builder we also build kBuid , after use kBuid compile with gcc 4.7 I got this error on building virtuaBox

/usr/bin/kmk_sed: file /builddir/build/BUILD/VirtualBox-4.1.8_OSE/src/VBox/Runtime/common/err/errmsg.sed line 31: Unmatched [ or [^
kmk: *** [/builddir/build/BUILD/VirtualBox-4.1.8_OSE/obj/obj/Runtime/errmsgdata.h] Error 1
kmk: *** Deleting file `/builddir/build/BUILD/VirtualBox-4.1.8_OSE/obj/obj/Runtime/errmsgdata.h'
kmk: *** Waiting for unfinished jobs....

build virtualbox with same kBuild but that was build with gcc 4.6 I don't have this problem using kBuild-0.1.98-1.r1.fc17 works, using kBuild-0.1.98-2.r1.fc17 I got this error, with kmk_sed.
Any clue is appreciated
Thanks,

Last edited 2 years ago by sergiomb (previous) (diff)

comment:3 Changed 2 years ago by frank

  • Description modified (diff)

It would be interesting if you could attach the file in question (errmsg.sed).

Changed 2 years ago by sergiomb

VirtualBox-4.1.8_OSE/src/VBox/Runtime/common/err/errmsg.sed

comment:4 Changed 2 years ago by sergiomb

I will follow another tip from fedora-devel, I will send news soon. Thanks,

comment:5 Changed 2 years ago by frank

Sorry, my fault. I actually meant to attach errmsgdata.h, see your error message.

comment:6 Changed 2 years ago by sergiomb

the problem is exactly when is generate errmsgdata.h, if I got this error I don't have any errmsgdata.h. I try change sed regexp removing

extensions to regular expressions reefer :  http://sed.sourceforge.net/sedfaq3.html

change [[:alnum:]] by [A-Za-z0-9] Alphanumeric characters

and [[:space:]] by [ \t\v\f] All whitespace chars,

but some white sapces aren't clean like EOL (end of line). and errmsgdata.h got errors, like miss " in EOL

comment:7 Changed 2 years ago by sergiomb

Hi, this ticket report two problems.

First I believe that is solved in VirtaulBox-4.1.10,

But the second about kmk_sed that begins in #comment:2 , I will move it to  http://svn.netlabs.org/kbuild , so please close this bug (I don't have permissions). I will open a new one for kmk_sed, if necessary.

comment:8 Changed 2 years ago by sergiomb

the is after compile kBuild with gcc 4.7  http://koji.fedoraproject.org/koji/packageinfo?packageID=7356

kmk_sed doesn't read well /builddir/build/BUILD/VirtualBox-4.1.10/src/VBox/Runtime/common/err/errmsg.sed

Version 0, edited 2 years ago by sergiomb (next)

comment:9 Changed 2 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use