VirtualBox

Ticket #15219 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

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

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

Change History

comment:1 Changed 6 years ago by frank

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 Changed 6 years ago by sergiomb

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

comment:3 Changed 6 years ago by sergiomb

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

Thanks.

comment:4 Changed 6 years ago by frank

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.

Changed 6 years ago by sergiomb

fix 3 compile errors on gcc6

comment:5 Changed 6 years ago by sergiomb

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 Changed 6 years ago by frank

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

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

Last edited 6 years ago by frank (previous) (diff)

comment:7 Changed 6 years ago by sergiomb

tosend.patch (remain fixes) is fixed in 5.1.6

comment:8 Changed 6 years ago by frank

Thanks!

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use