Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1923589 - gnustep-base: linker fails when LTO flags are used
Summary: gnustep-base: linker fails when LTO flags are used
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: gnustep-base
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Antonio T. sagitter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F34FTBFS
TreeView+ depends on / blocked
 
Reported: 2021-02-01 17:17 UTC by Fedora Release Engineering
Modified: 2021-04-03 14:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
build.log (32.00 KB, text/plain)
2021-02-01 17:17 UTC, Fedora Release Engineering
no flags Details
root.log (32.00 KB, text/plain)
2021-02-01 17:17 UTC, Fedora Release Engineering
no flags Details
state.log (999 bytes, text/plain)
2021-02-01 17:17 UTC, Fedora Release Engineering
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github gnustep libs-base issues 172 0 None open Error: symbol `__objc_class_ref__GSMutableInsensitiveDictionary.lto_priv.1' is already defined 2021-02-14 13:24:01 UTC

Description Fedora Release Engineering 2021-02-01 17:17:49 UTC
gnustep-base failed to build from source in Fedora rawhide/f34

https://koji.fedoraproject.org/koji/taskinfo?taskID=60912816


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Please fix gnustep-base at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
gnustep-base will be orphaned. Before branching of Fedora 35,
gnustep-base will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/

Comment 1 Fedora Release Engineering 2021-02-01 17:17:51 UTC
Created attachment 1753722 [details]
build.log

file build.log too big, will only attach last 32768 bytes

Comment 2 Fedora Release Engineering 2021-02-01 17:17:52 UTC
Created attachment 1753723 [details]
root.log

file root.log too big, will only attach last 32768 bytes

Comment 3 Fedora Release Engineering 2021-02-01 17:17:53 UTC
Created attachment 1753724 [details]
state.log

Comment 4 Ben Cotton 2021-02-09 15:57:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 5 Fedora Release Engineering 2021-02-14 04:27:01 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 34.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-03-29).

A week before the mass branching of Fedora 35 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 33 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-35/f-35-key-tasks.html

Comment 6 Fedora Release Engineering 2021-02-14 04:27:02 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 34.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-03-29).

A week before the mass branching of Fedora 35 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 33 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-35/f-35-key-tasks.html

Comment 7 Jeff Law 2021-02-25 19:37:38 UTC
Just an FYI here.  It looks like LTO is at least a triggering event.  gnustep-make creates /usr/lib64/GNUstep/Makefiles/config.make which turns on -flto -ffat-lto-objects

If I remove -flto -ffat-lto-objects from that file I get a clean build.

That may in fact be an indicator of a GCC bug.  But it's also the case that the LTO flags are supposed to be filtered out for scenarios like this (extension builders).  You may want to look at python and other packages that have similar models (where one package stores compile-time flags for use by another package).  There is a standard way that flags are supposed to be filtered for that scenario.

Comment 8 Jeff Law 2021-03-01 20:48:33 UTC
Actually, I think I can conclude LTO is doing the right thing here.  The symbol in question is definitely multiply-defined.

./Additions/obj/Additions.obj/GSInsensitiveDictionary.m.o:00000000 D __objc_class_name__GSMutableInsensitiveDictionary
./Additions/obj/subproject.o:00000000 D __objc_class_name__GSMutableInsensitiveDictionary


This is a package issue, not a compiler issue.

Comment 9 Antonio T. sagitter 2021-03-02 08:11:26 UTC
(In reply to Jeff Law from comment #8)
> Actually, I think I can conclude LTO is doing the right thing here.  The
> symbol in question is definitely multiply-defined.
> 
> ./Additions/obj/Additions.obj/GSInsensitiveDictionary.m.o:00000000 D
> __objc_class_name__GSMutableInsensitiveDictionary
> ./Additions/obj/subproject.o:00000000 D
> __objc_class_name__GSMutableInsensitiveDictionary
> 
> 
> This is a package issue, not a compiler issue.

Thank you Jeff.
I don't know how to pass -fcommon flag to the compiler. Would you co-maintain gnustep-* packages?

Comment 10 Jeff Law 2021-03-02 14:23:21 UTC
Sorry, I don't have the time or interest to maintain any gnustep-* packages.

Rather than using -fcommon it would be better to fix the source so as not to create a common variable in the first place.  For C/C++ that usually means taking the tentative definition out of a header file and ensuring there is one and only one real definition in a .c/.C file.  Objective-C may be close enough in behavior that you'd want to make a similar change.

Alternatively, if you want to add -fcommon, the usual way is to define _legacy_common_support to 1 in the .spec file.  But with this package extracting compile-time flags from gnustep-make, that may not work.  I simply don't know.

Comment 11 Antonio T. sagitter 2021-04-03 14:30:26 UTC
This package is now compiled in Fedora 34+
When 'LTO flags' + '-fno-common' are inoculated by gnustep-make package, then GCC linker fails with following error:

          Error: symbol `__objc_class_ref__GSMutableInsensitiveDictionary.lto_priv.1'

so 'LTO flags' + '-fno-common' are excluded in 'gnustep-make' buildings.
See upstream ticket: https://github.com/gnustep/libs-base/issues/172


Note You need to log in before you can comment on or make changes to this bug.