VirtualBox

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#15219 closed defect (fixed)

GCC6: error, the program should also define void operator delete

Reported by: sergiomb Owned by:
Component: other Version: VirtualBox 5.0.16
Keywords: Cc:
Guest type: other Host type: Linux

Description

kBuild: Compiling RuntimeEFCPP - /builddir/build/BUILD/VirtualBox-5.0.17-105881/src/VBox/Runtime/r3/alloc-ef-cpp.cpp => /builddir/build/BUILD/VirtualBox-5.0.17-105881/obj/obj/RuntimeEFCPP/r3/alloc-ef-cpp.o
g++ -c -O2 -g -pipe -pedantic -Wshadow -Wshadow -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wno-unused-parameter -Wlogical-op -Wno-long-long -Wno-long-long -Wno-delete-non-virtual-dtor -Wno-variadic-macros -O2 -mtune=generic -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fvisibility-inlines-hidden  -fPIC -Werror -m64 -I/builddir/build/BUILD/VirtualBox-5.0.17-105881/src/VBox/Runtime/include -I/builddir/build/BUILD/VirtualBox-5.0.17-105881/src/libs/liblzf-3.4 -I/builddir/build/BUILD/VirtualBox-5.0.17-105881/src/libs/kStuff/kStuff/include -I/builddir/build/BUILD/VirtualBox-5.0.17-105881/obj/obj/RuntimeEFCPP/dtrace -I/usr/include/libxml2 -I/builddir/build/BUILD/VirtualBox-5.0.17-105881/include -I/builddir/build/BUILD/VirtualBox-5.0.17-105881/obj -DVBOX -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_DEBUGGER -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/lib64/virtualbox\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib64/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/lib64/virtualbox\" -DRTPATH_APP_DOCS=\"/usr/lib64/virtualbox\" -D_REENTRANT -DIN_RING3 -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DVBOX_WITH_DTRACE -DVBOX_WITH_DTRACE_R3 -DPIC -DIN_RT_R3 -DIN_SUP_R3 -DLDR_WITH_NATIVE -DLDR_WITH_ELF32 -DLDR_WITH_PE -DRT_WITH_VBOX -DRT_NO_GIP -DRT_WITHOUT_NOCRT_WRAPPERS -DIPRT_WITH_OPENSSL -DLDR_WITH_KLDR -DRT_WITH_ICONV_CACHE -Wp,-MD,/builddir/build/BUILD/VirtualBox-5.0.17-105881/obj/obj/RuntimeEFCPP/r3/alloc-ef-cpp.o.dep -Wp,-MT,/builddir/build/BUILD/VirtualBox-5.0.17-105881/obj/obj/RuntimeEFCPP/r3/alloc-ef-cpp.o -Wp,-MP -o /builddir/build/BUILD/VirtualBox-5.0.17-105881/obj/obj/RuntimeEFCPP/r3/alloc-ef-cpp.o /builddir/build/BUILD/VirtualBox-5.0.17-105881/src/VBox/Runtime/r3/alloc-ef-cpp.cpp

/builddir/build/BUILD/VirtualBox-5.0.17-105881/src/VBox/Runtime/r3/alloc-ef-cpp.cpp:91:6: error: the program should also define 'void operator delete(void*, std::size_t)' [-Werror=sized-deallocation]
 void RT_EF_CDECL operator delete(void *pv) RT_EF_NOTHROW
      ^~~~~~~~
/builddir/build/BUILD/VirtualBox-5.0.17-105881/src/VBox/Runtime/r3/alloc-ef-cpp.cpp:127:6: error: the program should also define 'void operator delete [](void*, std::size_t)' [-Werror=sized-deallocation]
 void RT_EF_CDECL operator delete[](void * pv) RT_EF_NOTHROW
      ^~~~~~~~
cc1plus: all warnings being treated as errors
kmk: *** [/builddir/build/BUILD/VirtualBox-5.0.17-105881/obj/obj/RuntimeEFCPP/r3/alloc-ef-cpp.o] Error 1

Same environment of ticket #15205, Fedora 24 branch , Fedora 24 pre-alfa version . Fedora 24 will have GCC6 and glibc-2.23, now I think is a gcc6 issue .

Attachments (1)

tosend.patch (2.0 KB ) - added by sergiomb 8 years ago.
fix 3 compile errors on gcc6

Download all attachments as: .zip

Change History (9)

comment:1 by Frank Mehnert, 8 years ago

Already fixed in the public repository and the fix will be part of the next 5.0.x maintenance release. OTOH I'm not sure if we will fully support gcc 6 with VBox 5.0.x soon. gcc 6 is even not yet released.

comment:2 by sergiomb, 8 years ago

yeah , but I haven't choice in F24 , I have to use gcc6 ... Many thanks,

comment:3 by sergiomb, 8 years ago

Anyway I can't find the commit , Can you point me to the commit ? please

Thanks.

comment:4 by Frank Mehnert, 8 years ago

I cannot believe that you don't have a choice. Just install gcc 5 from the fc23 repository. The change I refer to is r59273 but you will observer further build errors.

by sergiomb, 8 years ago

Attachment: tosend.patch added

fix 3 compile errors on gcc6

comment:5 by sergiomb, 8 years ago

GCC6 complains:

pMtx->hMtx == NIL_RTSEMMUTEX and pMtx->hMtx == NULL is the same thing

also with: hTraceBuf == (RTTRACEBUF)pvBlock && (void *)hTraceBuf == pvBlock)

and 3rd patch also seems that we can drop some redundant code ... , I don't know .

comment:6 by Frank Mehnert, 8 years ago

Resolution: fixed
Status: newclosed

I think the major gcc 6 complaints are fixed, only (non-fatal) warnings remain.

Last edited 8 years ago by Frank Mehnert (previous) (diff)

comment:7 by sergiomb, 8 years ago

tosend.patch (remain fixes) is fixed in 5.1.6

comment:8 by Frank Mehnert, 8 years ago

Thanks!

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use