Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 943861 - dev-python/protobuf-5.28.0 fails with c23/gcc-15.0.0_pre20241117: python/descriptor_pool.c:268:12: error: incompatible types when returning type ‘_Bool’ but ‘PyObject *’ {aka ‘struct _object *’}
Summary: dev-python/protobuf-5.28.0 fails with c23/gcc-15.0.0_pre20241117: python/des...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2024-11-18 21:22 UTC by tdr
Modified: 2024-11-19 03:52 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build failure log (protobuf-5.28.0.20241118-203610.build.log,24.09 KB, text/plain)
2024-11-18 21:22 UTC, tdr
Details
emerge --info (tdr-emerge--info.txt,6.41 KB, text/plain)
2024-11-18 21:22 UTC, tdr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tdr 2024-11-18 21:22:20 UTC
gcc-15.0.0_pre20241117 default to using -std=gnu23 (which is stricter)

Reproducible: Always

Steps to Reproduce:
emerge =gcc-15.0.0_pre20241117
emerge =protobuf-5.28.0
Actual Results:  
python/descriptor_pool.c:268:12: error: incompatible types when returning type ‘_Bool’ but ‘PyObject *’ {aka ‘struct _object *’} was expected
  268 |     return false;
      |            ^~~~~
python/descriptor_pool.c: In function ‘PyUpb_DescriptorPool_Add’:
python/descriptor_pool.c:281:12: error: incompatible types when returning type ‘_Bool’ but ‘PyObject *’ {aka ‘struct _object *’} was expected
  281 |     return false;
      |            ^~~~~
error: command '/usr/bin/x86_64-pc-linux-gnu-gcc' failed with exit code 1
 * ERROR: dev-python/protobuf-5.28.0::gentoo failed (compile phase):




builds with -std=gnu17
also builds with gcc:15.0.0_pre20241110
Comment 1 tdr 2024-11-18 21:22:37 UTC
Created attachment 909645 [details]
build failure log
Comment 2 tdr 2024-11-18 21:22:51 UTC
Created attachment 909646 [details]
emerge --info
Comment 3 immolo 2024-11-18 21:29:51 UTC
Tad too slow ;)
Comment 4 Kostadin Shishmanov 2024-11-18 21:39:34 UTC
(In reply to immolo from comment #3)
> Tad too slow ;)

The other bug is an ICE, even though it's still protobuf, it's not related to this one. Also, someone should change the title, so dev-python/ isn't omitted.
Comment 5 immolo 2024-11-18 22:47:48 UTC
Looks like I've been staring at bugs too long, thanks!

I'll fix as you suggest now.
Comment 6 Larry the Git Cow gentoo-dev 2024-11-19 03:52:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2facc542948cfb79193220e7beb9d1c9837df8a

commit d2facc542948cfb79193220e7beb9d1c9837df8a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-11-19 03:48:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-11-19 03:52:22 +0000

    sys-devel/gcc: backport C23 fix to 15.0.0_pre20241117
    
    Backport a -std=gnu23/-std=c23 fix to 15.0.0_pre20241117 which prevented
    coersion from _Bool to NULL. Note that this is still dodgy code and some
    are proposing this be banned in a future C version (maybe even C2y), but
    it shouldn't be rejected in this version at least.
    
    I've added Closes tags for all bugs which, at a glance, look related,
    but I haven't re-tested them all and one or two might need reopening.
    
    Bug: https://gcc.gnu.org/PR112556
    Closes: https://bugs.gentoo.org/943862
    Closes: https://bugs.gentoo.org/943861
    Closes: https://bugs.gentoo.org/943843
    Closes: https://bugs.gentoo.org/943811
    Closes: https://bugs.gentoo.org/943809
    Closes: https://bugs.gentoo.org/943753
    Closes: https://bugs.gentoo.org/943715
    Closes: https://bugs.gentoo.org/943704
    Closes: https://bugs.gentoo.org/942958
    Signed-off-by: Sam James <sam@gentoo.org>

 ...llow-bool-and-enum-null-pointer-constants.patch | 244 +++++++++++++++++++++
 sys-devel/gcc/gcc-15.0.0_pre20241117-r2.ebuild     |  54 +++++
 2 files changed, 298 insertions(+)