Bug 1795940

Summary: python-caja fails to build with gcc 10: multiple definition of `_PyCaja...'
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-cajaAssignee: Patrick Monnerat <patrick>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, fedora, mhroncok, patrick
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-29 19:30:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1750908, 1785415, 1792464    

Description Miro Hrončok 2020-01-29 09:53:06 UTC
python-caja fails to build with gcc 10:

/bin/sh ../libtool  --tag=CC   --mode=link gcc -I/usr/include/python3.9  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -module -avoid-version -Wl,-z,defs -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o libcaja-python.la -rpath /usr/lib64/caja/extensions-2.0 libcaja_python_la-caja-python.lo libcaja_python_la-caja-python-object.lo -lpython3.9  -lgmodule-2.0 -pthread -lglib-2.0 -lcaja-extension -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0  
libtool: link: gcc -shared  -fPIC -DPIC  .libs/libcaja_python_la-caja-python.o .libs/libcaja_python_la-caja-python-object.o   -lpython3.9 -lgmodule-2.0 -lcaja-extension -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -g -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -Wl,-z -Wl,defs -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -pthread   -pthread -Wl,-soname -Wl,libcaja-python.so -o .libs/libcaja-python.so
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:73: multiple definition of `_PyCajaOperationHandle_Type'; .libs/libcaja_python_la-caja-python.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:73: first defined here
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/usr/include/pygobject-3.0/pygobject.h:230: multiple definition of `_PyGObject_API'; .libs/libcaja_python_la-caja-python.o:/usr/include/pygobject-3.0/pygobject.h:230: first defined here
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:67: multiple definition of `_PyCajaPropertyPage_Type'; .libs/libcaja_python_la-caja-python.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:67: first defined here
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:43: multiple definition of `_PyGtkWidget_Type'; .libs/libcaja_python_la-caja-python.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:43: first defined here
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:46: multiple definition of `_PyCajaColumn_Type'; .libs/libcaja_python_la-caja-python.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:46: first defined here
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:61: multiple definition of `_PyCajaMenuItem_Type'; .libs/libcaja_python_la-caja-python.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:61: first defined here
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:70: multiple definition of `_PyCajaPropertyPageProvider_Type'; .libs/libcaja_python_la-caja-python.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:70: first defined here
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:55: multiple definition of `_PyCajaLocationWidgetProvider_Type'; .libs/libcaja_python_la-caja-python.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:55: first defined here
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:64: multiple definition of `_PyCajaMenuProvider_Type'; .libs/libcaja_python_la-caja-python.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:64: first defined here
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:49: multiple definition of `_PyCajaColumnProvider_Type'; .libs/libcaja_python_la-caja-python.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:49: first defined here
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:52: multiple definition of `_PyCajaInfoProvider_Type'; .libs/libcaja_python_la-caja-python.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:52: first defined here
/usr/bin/ld: .libs/libcaja_python_la-caja-python-object.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:58: multiple definition of `_PyCajaMenu_Type'; .libs/libcaja_python_la-caja-python.o:/builddir/build/BUILD/python-caja-1.23.0/src/caja-python.h:58: first defined here
collect2: error: ld returned 1 exit status



This blocks the Python 3.9 rebuild of the package.

See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/RYVPP45PMWPXYBBDKXO3CI7YGL7CDQG6/ and https://gcc.gnu.org/gcc-10/porting_to.html#common for more information about the failure.

Comment 1 Wolfgang Ulbrich 2020-01-29 15:24:11 UTC
Patrick,
maybe this is usefull from nemo ?
https://github.com/linuxmint/nemo-extensions/pull/352/commits/5dc8b5586cd774e4b6dce16b6bd7744e0e406d81

Comment 2 Patrick Monnerat 2020-01-29 15:30:42 UTC
Thanks for the info Wolfgang.
There is already a quick fix in rawhide, using -fcommon CFLAG to reinstate commons in gcc 10.
I have a patch very similar to nemo commit that I'll submit very soon as a PR.

Comment 3 Patrick Monnerat 2020-01-29 16:52:34 UTC
Upstream PR at https://github.com/mate-desktop/python-caja/pull/54

Comment 4 Wolfgang Ulbrich 2020-01-29 19:26:04 UTC
Scratch build work fine with your PR.
Thanks
https://koji.fedoraproject.org/koji/taskinfo?taskID=41209219

Comment 5 Wolfgang Ulbrich 2020-01-29 19:27:10 UTC
Why this report is closed?

Comment 6 Wolfgang Ulbrich 2020-01-29 19:30:18 UTC
Got it , you did already a successful build https://koji.fedoraproject.org/koji/buildinfo?buildID=1441884

Any way, i will do a new release of python-caja when PR is merged.

Comment 7 Wolfgang Ulbrich 2020-01-31 11:25:49 UTC
Patrick, i have released 1.23.1
https://github.com/mate-desktop/python-caja/releases