Bug 2260416

Summary: Link fails with symbol defined in discarded section
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 40CC: dmalcolm, fweimer, jakub, jlaw, jwakely, mcermak, mpolacek, msebor, nickc, nixuser, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: gcc-14.0.1-0.8.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-03-23 00:24:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2259594    

Description Orion Poplawski 2024-01-26 00:38:18 UTC
As discovered by koschei - https://koschei.fedoraproject.org/package/vtk - the update to gcc 14.0.1-0.1 broke building vtk on x86_64.  The error is:

'_ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE10_M_managerERSt9_Any_dataRKSH_St18_Manager_operation' referenced in section `.data.rel.ro.local' of CMakeFiles/FiltersCore.dir/vtkPolyDataPlaneClipper.cxx.o: defined in discarded section `.text._ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEE10_M_managerERSt9_Any_dataRKSH_St18_Manager_operation[_ZN26vtkStaticCellLinksTemplateIxE18ThreadedBuildLinksExxP12vtkCellArray]' of CMakeFiles/FiltersCore.dir/vtkPolyDataPlaneClipper.cxx.o
`_ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_111InsertLinksIxEELb0EEExxxEEE10_M_managerERSt9_Any_dataRKSH_St18_Manager_operation' referenced in section `.data.rel.ro.local' of CMakeFiles/FiltersCore.dir/vtkPolyDataPlaneClipper.cxx.o: defined in discarded section `.text._ZNSt17_Function_handlerIFvvESt5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_111InsertLinksIxEELb0EEExxxEEE10_M_managerERSt9_Any_dataRKSH_St18_Manager_operation[_ZN26vtkStaticCellLinksTemplateIxE18ThreadedBuildLinksExxP12vtkCellArray]' of CMakeFiles/FiltersCore.dir/vtkPolyDataPlaneClipper.cxx.o

which seems to be related to LTO from what I can tell.

Reproducible: Always

Comment 1 Orion Poplawski 2024-01-26 00:46:08 UTC
Hmm, maybe not as LTO is already disabled:

# State Nov 11 2020, LTO causes
# TestXMLHyperTreeGridIO.cxx.o (symbol from plugin): undefined reference to symbol
# '_ZZNSt8__detail18__to_chars_10_implIjEEvPcjT_E8__digits@@LLVM_11'
%global _lto_cflags %{nil}

Comment 2 Aoife Moloney 2024-02-15 23:12:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.

Comment 3 Fedora Update System 2024-02-29 10:58:32 UTC
FEDORA-2024-04a26a52c4 (gcc-14.0.1-0.8.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-04a26a52c4

Comment 4 Fedora Update System 2024-03-01 01:56:59 UTC
FEDORA-2024-04a26a52c4 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-04a26a52c4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-04a26a52c4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2024-03-23 00:24:35 UTC
FEDORA-2024-04a26a52c4 (gcc-14.0.1-0.8.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.