VirtualBox

Opened 4 years ago

Last modified 3 years ago

#20252 assigned defect

[SVN version] compile error under python 3.9: _Py_NewReference was not declared in this scopt

Reported by: winstonwu91 Owned by: pentagonik
Component: other Version:
Keywords: Cc:
Guest type: other Host type: Linux

Description

Hi,

I come across a compilation problem for virtualbox svn with Py_NewReference under Arch Linux and python 3.9.

/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/python/src/PyIID.cpp: In constructor ‘Py_nsIID::Py_nsIID(const nsIID&)’:
/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/python/src/PyIID.cpp:268:2: error: ‘_Py_NewReference’ was not declared in this scope; did you mean ‘_PyWeakReference’?
  268 |  _Py_NewReference(this);
      |  ^~~~~~~~~~~~~~~~
      |  _PyWeakReference
/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/python/src/PyISupports.cpp: In constructor ‘Py_nsISupports::Py_nsISupports(nsISupports*, const nsIID&, PyXPCOM_TypeObject*)’:
/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/python/src/PyISupports.cpp:148:2: error: ‘_Py_NewReference’ was not declared in this scope; did you mean ‘_PyWeakReference’?
  148 |  _Py_NewReference(this);
      |  ^~~~~~~~~~~~~~~~
      |  _PyWeakReference
@g++ -c -O2 -g -pipe -ansi -Wall -Wno-unused -Wno-non-virtual-dtor -Wno-invalid-offsetof -Wno-sign-compare -Wno-unused -Wno-ctor-dtor-privacy -fvisibility-inlines-hidden -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fdiagnostics-show-option -Wno-delete-non-virtual-dtor  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-omit-frame-pointer -fPIC -Wno-write-strings -pthread -m64 -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/python/src -I/usr/include/python3.9 -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/xpcom/build -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/xpcom/ds -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/xpcom/io -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/xpcom/base -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/xpcom/components -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/xpcom/threads -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/xpcom/proxy/src -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/xpcom/reflect/xptcall/src -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/ipc/ipcd/client/src -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/ipc/ipcd/shared/src -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/ipc/ipcd/extensions/lock/src -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/ipc/ipcd/extensions/transmngr/src -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/ipc/ipcd/extensions/transmngr/common -I/build/virtualbox-svn/src/VirtualBox/out/linux.amd64/release/bin/sdk/bindings/xpcom/include -I/build/virtualbox-svn/src/VirtualBox/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/nsprpub -I/build/virtualbox-svn/src/VirtualBox/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/string -I/build/virtualbox-svn/src/VirtualBox/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/xpcom -I/build/virtualbox-svn/src/VirtualBox/out/linux.amd64/release/bin/sdk/bindings/xpcom/include/ipcd -I/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/python -I/build/virtualbox-svn/src/VirtualBox/out/linux.amd64/release/obj/VBoxPython3/dtrace -I/build/virtualbox-svn/src/VirtualBox/include -I/build/virtualbox-svn/src/VirtualBox/out/linux.amd64/release -DVBOX -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -DVBOX_WITH_DEBUGGER -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/lib/virtualbox\" -DRTPATH_APP_DOCS=\"/usr/share/doc/virtualbox\" -DMOZILLA_CLIENT=1 -DNDEBUG=1 -D_IMPL_NS_COM -DXPCOM_DLL_BASE=\"VBoxXPCOM\" -DMOZ_DLL_SUFFIX=\".so\" -DIN_RING3 -DVBOX_USE_IPRT_IN_XPCOM -DVBOX_WITH_XPCOM_NAMESPACE_CLEANUP -DMOZ_PRESERVE_PIC -D_IMPL_NS_COM -D_IMPL_NS_BASE -DEXPORT_XPTI_API -DEXPORT_XPT_API -DVBOX_PYXPCOM -DVBOX_WITH_XPCOM -DPy_LIMITED_API=0x03030000 -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\" -DXP_UNIX=1 -D_GNU_SOURCE -DHAVE_VISIBILITY_ATTRIBUTE=1 -DHAVE_VA_LIST_AS_ARRAY -DHAVE_VA_COPY -DVA_COPY\(a\,b\)=__builtin_va_copy\(a\,b\) -Wp,-MD,/build/virtualbox-svn/src/VirtualBox/out/linux.amd64/release/obj/VBoxPython3/src/TypeObject.o.dep -Wp,-MT,/build/virtualbox-svn/src/VirtualBox/out/linux.amd64/release/obj/VBoxPython3/src/TypeObject.o -Wp,-MP -o /build/virtualbox-svn/src/VirtualBox/out/linux.amd64/release/obj/VBoxPython3/src/TypeObject.o  /build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/python/src/TypeObject.cpp
kBuild: Compiling VBoxPython3 - /build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/python/src/TypeObject.cpp
/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/python/src/TypeObject.cpp: In constructor ‘PyXPCOM_TypeObject::PyXPCOM_TypeObject(const char*, PyXPCOM_TypeObject*, int, PyMethodDef*, PyXPCOM_I_CTOR)’:
/build/virtualbox-svn/src/VirtualBox/src/libs/xpcom18a4/python/src/TypeObject.cpp:437:2: error: ‘_Py_NewReference’ was not declared in this scope; did you mean ‘_PyWeakReference’?
  437 |  _Py_NewReference(this);
      |  ^~~~~~~~~~~~~~~~
      |  _PyWeakReference
kmk: *** [/build/virtualbox-svn/src/VirtualBox/kBuild/footer-pass2-compiling-targets.kmk:277: /build/virtualbox-svn/src/VirtualBox/out/linux.amd64/release/obj/VBoxPython3/src/TypeObject.o] Error 1

I note that there are discussions about removing _Py_NewReference from public API (https://bugs.python.org/issue40989). Maybe it is relevant?

Attached is the full log.

Attachments (1)

compile.log.gz (67.0 KB ) - added by winstonwu91 4 years ago.
Full log (compressed due to size limit)

Download all attachments as: .zip

Change History (3)

by winstonwu91, 4 years ago

Attachment: compile.log.gz added

Full log (compressed due to size limit)

comment:1 by pentagonik, 3 years ago

Thanks for the pointer -- we're working on a fix.

comment:2 by pentagonik, 3 years ago

Owner: set to pentagonik
Status: newassigned
Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette