FTBFS on Fedora 40 (PyUnicodeObject) #19

Closed
opened 3 months ago by Francois · 5 comments
Collaborator

Basic information

  • TDE version: 14.1.2
  • Distribution: Fedora 40
  • Hardware: amd64

Description

sip4-tqt fails to build because of PyUnicodeObject errors.

Steps to reproduce

build

Screenshots

make[2]: Entering directory '/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/build/siplib'
gcc -c -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/include/tqt -I/usr/include/tqt3 -I/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/build/../sipgen -DYYERROR_VERBOSE -fPIC -g -w -I. -I/usr/include/python3.12 -I/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib -o siplib.o /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c
/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c: In function ‘compareTypeDef’:
/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:7491:38: error: initialization of ‘const sipTypeDef **’ {aka ‘const struct _sipTypeDef **’} from incompatible pointer type ‘sipTypeDef **’ {aka ‘struct _sipTypeDef **’} [-Wincompatible-pointer-types]
 7491 |             const sipTypeDef **tdp = &module_searched->em_types[etd->et_nr];
      |                                      ^
/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c: In function ‘sipSimpleWrapper_releasebuffer’:
/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:8488:16: error: ‘return’ with a value, in function returning void [-Wreturn-mismatch]
 8488 |         return -1;
      |                ^
/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:8481:13: note: declared here
 8481 | static void sipSimpleWrapper_releasebuffer(sipSimpleWrapper *self,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c: In function ‘convertToWCharArray’:
/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:9765:33: error: passing argument 1 of ‘PyUnicode_AsWideChar’ from incompatible pointer type [-Wincompatible-pointer-types]
 9765 |     ulen = PyUnicode_AsWideChar((PyUnicodeObject *)obj, wc, ulen);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
      |                                 |
      |                                 PyUnicodeObject *
In file included from /usr/include/python3.12/Python.h:51,
                 from /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:20:
/usr/include/python3.12/unicodeobject.h:286:15: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyUnicodeObject *’
  286 |     PyObject *unicode,          /* Unicode object */
      |     ~~~~~~~~~~^~~~~~~
/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c: In function ‘convertToWChar’:
/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:9800:30: error: passing argument 1 of ‘PyUnicode_AsWideChar’ from incompatible pointer type [-Wincompatible-pointer-types]
 9800 |     if (PyUnicode_AsWideChar((PyUnicodeObject *)obj, ap, 1) != 1)
      |                              ^~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              PyUnicodeObject *
/usr/include/python3.12/unicodeobject.h:286:15: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyUnicodeObject *’
  286 |     PyObject *unicode,          /* Unicode object */
      |     ~~~~~~~~~~^~~~~~~
/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c: In function ‘convertToWCharString’:
/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:9840:33: error: passing argument 1 of ‘PyUnicode_AsWideChar’ from incompatible pointer type [-Wincompatible-pointer-types]
 9840 |     ulen = PyUnicode_AsWideChar((PyUnicodeObject *)obj, wc, ulen);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~
      |                                 |
      |                                 PyUnicodeObject *
/usr/include/python3.12/unicodeobject.h:286:15: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyUnicodeObject *’
  286 |     PyObject *unicode,          /* Unicode object */
      |     ~~~~~~~~~~^~~~~~~
make[2]: *** [Makefile:31: siplib.o] Error 1
make[2]: Leaving directory '/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/build/siplib'
make[1]: *** [Makefile:8: install] Error 2
make[1]: Leaving directory '/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/build'
<!-- This is a comment. Please fill in the required fields below. The comments provide instructions on how to do so. Note: You do not need to remove comments. --> ## Basic information - TDE version: 14.1.2 - Distribution: Fedora 40 - Hardware: amd64 <!-- Use SL/* labels to set the severity level. Please do not set a milestone. --> ## Description sip4-tqt fails to build because of PyUnicodeObject errors. ## Steps to reproduce build ## Screenshots ``` make[2]: Entering directory '/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/build/siplib' gcc -c -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/include/tqt -I/usr/include/tqt3 -I/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/build/../sipgen -DYYERROR_VERBOSE -fPIC -g -w -I. -I/usr/include/python3.12 -I/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib -o siplib.o /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c: In function ‘compareTypeDef’: /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:7491:38: error: initialization of ‘const sipTypeDef **’ {aka ‘const struct _sipTypeDef **’} from incompatible pointer type ‘sipTypeDef **’ {aka ‘struct _sipTypeDef **’} [-Wincompatible-pointer-types] 7491 | const sipTypeDef **tdp = &module_searched->em_types[etd->et_nr]; | ^ /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c: In function ‘sipSimpleWrapper_releasebuffer’: /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:8488:16: error: ‘return’ with a value, in function returning void [-Wreturn-mismatch] 8488 | return -1; | ^ /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:8481:13: note: declared here 8481 | static void sipSimpleWrapper_releasebuffer(sipSimpleWrapper *self, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c: In function ‘convertToWCharArray’: /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:9765:33: error: passing argument 1 of ‘PyUnicode_AsWideChar’ from incompatible pointer type [-Wincompatible-pointer-types] 9765 | ulen = PyUnicode_AsWideChar((PyUnicodeObject *)obj, wc, ulen); | ^~~~~~~~~~~~~~~~~~~~~~ | | | PyUnicodeObject * In file included from /usr/include/python3.12/Python.h:51, from /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:20: /usr/include/python3.12/unicodeobject.h:286:15: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyUnicodeObject *’ 286 | PyObject *unicode, /* Unicode object */ | ~~~~~~~~~~^~~~~~~ /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c: In function ‘convertToWChar’: /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:9800:30: error: passing argument 1 of ‘PyUnicode_AsWideChar’ from incompatible pointer type [-Wincompatible-pointer-types] 9800 | if (PyUnicode_AsWideChar((PyUnicodeObject *)obj, ap, 1) != 1) | ^~~~~~~~~~~~~~~~~~~~~~ | | | PyUnicodeObject * /usr/include/python3.12/unicodeobject.h:286:15: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyUnicodeObject *’ 286 | PyObject *unicode, /* Unicode object */ | ~~~~~~~~~~^~~~~~~ /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c: In function ‘convertToWCharString’: /tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/siplib/siplib.c:9840:33: error: passing argument 1 of ‘PyUnicode_AsWideChar’ from incompatible pointer type [-Wincompatible-pointer-types] 9840 | ulen = PyUnicode_AsWideChar((PyUnicodeObject *)obj, wc, ulen); | ^~~~~~~~~~~~~~~~~~~~~~ | | | PyUnicodeObject * /usr/include/python3.12/unicodeobject.h:286:15: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyUnicodeObject *’ 286 | PyObject *unicode, /* Unicode object */ | ~~~~~~~~~~^~~~~~~ make[2]: *** [Makefile:31: siplib.o] Error 1 make[2]: Leaving directory '/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/build/siplib' make[1]: *** [Makefile:8: install] Error 2 make[1]: Leaving directory '/tmp/BUILD.fc40.x86_64/trinity-sip4-tqt-14.1.2~pre3+5e77787c/build' ```
Francois added the SL/critical label 3 months ago
Poster
Collaborator

Compiler information on Fedora 40:

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/14/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-14.0.1-20240127/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none,amdgcn-amdhsa --enable-offload-defaulted --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240127 (Red Hat 14.0.1-0) (GCC) 
Compiler information on Fedora 40: ``` $ gcc -v Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/14/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-14.0.1-20240127/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none,amdgcn-amdhsa --enable-offload-defaulted --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.1 20240127 (Red Hat 14.0.1-0) (GCC) ```
Poster
Collaborator

Tried again today, same issue.

Tried again today, same issue.
Owner

Ah, I think I missed this issue when it was originally reported, or forgot about it. I will have a look.

Ah, I think I missed this issue when it was originally reported, or forgot about it. I will have a look.
MicheleC referenced this issue from a commit 1 month ago
Owner

@Francois I can't reproduce the problem here, but I have prepared a PR based on your build log. Could you test PR #24 and let me know if it fixes the issue? If not, please attached the new build log showing the next point of failure.

@Francois I can't reproduce the problem here, but I have prepared a PR based on your build log. Could you test PR #24 and let me know if it fixes the issue? If not, please attached the new build log showing the next point of failure.
MicheleC referenced this issue from a commit 1 month ago
MicheleC referenced this issue from a commit 1 month ago
Poster
Collaborator

Thanks again @MicheleC , it builds correctly with the latest patch you've just posted.

Thanks again @MicheleC , it builds correctly with the latest patch you've just posted.
MicheleC referenced this issue from a commit 1 month ago
MicheleC closed this issue 1 month ago
MicheleC added this to the R14.1.2 release milestone 1 month ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/sip4-tqt#19
Loading…
There is no content yet.