Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 878593 - dev-libs/protobuf-c: gcc is unable to compile with -flto
Summary: dev-libs/protobuf-c: gcc is unable to compile with -flto
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
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: lto
  Show dependency tree
 
Reported: 2022-10-29 04:22 UTC by Jocelyn Mayer
Modified: 2023-01-24 11:01 UTC (History)
1 user (show)

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


Attachments
output from emerge --info =dev-libs/protobuf-c-1.4.1 (emerge-infos-protobuf,24.20 KB, text/plain)
2022-10-29 04:23 UTC, Jocelyn Mayer
Details
Emerge failure using gcc and '-flto' flags build log (protobuf-c-1.4.1:20221029-034525.log.gz,7.84 KB, application/gzip)
2022-10-29 04:24 UTC, Jocelyn Mayer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jocelyn Mayer 2022-10-29 04:22:34 UTC
If having '-flto' in compilation flags, gcc fails to compile protobuf-c:
t/generated-code2/cxx-generate-packed-data fails to generate test-full-cxx-output.inc
Compiling using '-fno-lto' or using clang is OK

Reproducible: Always

Steps to Reproduce:
1. Add '-flto' to compilation flags
2. Try to build dev-libs/protobuf-c using gcc
3.
Actual Results:  
Build of test programs fails

Expected Results:  
Build to succeed.

Disabling lto when using gcc seems required
Comment 1 Jocelyn Mayer 2022-10-29 04:23:45 UTC
Created attachment 825773 [details]
output from emerge --info =dev-libs/protobuf-c-1.4.1

Note that this is the merged version, with '-fno-lto' flags set.
Comment 2 Jocelyn Mayer 2022-10-29 04:24:33 UTC
Created attachment 825775 [details]
Emerge failure using gcc and '-flto' flags build log