Bug 2045681

Summary: gsl-lite: FTBFS in Fedora rawhide/f36
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: gsl-liteAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: code, neuro-sig, sanjay.ankur
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gsl-lite-0.40.0-3.fc36 gsl-lite-0.40.0-5.fc37 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-08 18:20:19 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: 2051740    
Bug Blocks: 2050761    
Attachments:
Description Flags
build.log
none
root.log
none
state.log none

Description Fedora Release Engineering 2022-01-25 18:22:24 UTC
gsl-lite failed to build from source in Fedora rawhide/f36

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


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Please fix gsl-lite 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,
gsl-lite will be orphaned. Before branching of Fedora 37,
gsl-lite 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 2022-01-25 18:22:26 UTC
Created attachment 1854890 [details]
build.log

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

Comment 2 Fedora Release Engineering 2022-01-25 18:22:28 UTC
Created attachment 1854891 [details]
root.log

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

Comment 3 Fedora Release Engineering 2022-01-25 18:22:29 UTC
Created attachment 1854892 [details]
state.log

Comment 4 Ben Beasley 2022-02-06 21:06:19 UTC
Relevant error:


[ 46%] Building CXX object test/CMakeFiles/gsl-lite-v0-cpp20.t.dir/issue.t.cpp.o
cd /builddir/build/BUILD/gsl-lite-0.40.0/redhat-linux-build/test && /usr/bin/g++ -Dgsl_CONFIG_CONTRACT_CHECKING_AUDIT -Dgsl_CONFIG_CONTRACT_VIOLATION_THROWS -Dgsl_CONFIG_UNENFORCED_CONTRACTS_ELIDE -Dgsl_TESTING_ -I/builddir/build/BUILD/gsl-lite-0.40.0/include -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -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 -Werror -Wall -Wextra -Wconversion -Wsign-conversion -fno-elide-constructors -fstrict-aliasing -Wstrict-aliasing=2 -pedantic -Wno-long-long -Wno-error=array-bounds -std=c++20 -Winvalid-pch -include /builddir/build/BUILD/gsl-lite-0.40.0/redhat-linux-build/test/CMakeFiles/gsl-lite-v0-cpp20.t.dir/cmake_pch.hxx -MD -MT test/CMakeFiles/gsl-lite-v0-cpp20.t.dir/issue.t.cpp.o -MF CMakeFiles/gsl-lite-v0-cpp20.t.dir/issue.t.cpp.o.d -o CMakeFiles/gsl-lite-v0-cpp20.t.dir/issue.t.cpp.o -c /builddir/build/BUILD/gsl-lite-0.40.0/test/issue.t.cpp
In file included from /builddir/build/BUILD/gsl-lite-0.40.0/test/gsl-lite.t.hpp:38,
                 from /builddir/build/BUILD/gsl-lite-0.40.0/redhat-linux-build/test/CMakeFiles/gsl-lite-v1-no-exc-cpp98.t.dir/cmake_pch.hxx:5,
                 from <command-line>:
In member function 'gsl::span<int const>::operator=(gsl::span<int const>)',
    inlined from 'use_span_with_array(int const (&) [3], gsl::span<int const>)' at /builddir/build/BUILD/gsl-lite-0.40.0/test/span.t.cpp:404:10:
/builddir/build/BUILD/gsl-lite-0.40.0/include/gsl/gsl-lite.hpp:3882:15: error: storing the address of local variable 'array2' in 'sp_6(D)->last_' [-Werror=dangling-pointer=]
 3882 |         last_ = other.last_;
      |         ~~~~~~^~~~~~~~~~~~~
/builddir/build/BUILD/gsl-lite-0.40.0/test/span.t.cpp: In function 'use_span_with_array(int const (&) [3], gsl::span<int const>)':
/builddir/build/BUILD/gsl-lite-0.40.0/test/span.t.cpp:402:9: note: 'array2' declared here
  402 |     int array2[3] = { 0, 0, 0 };
      |         ^~~~~~
/builddir/build/BUILD/gsl-lite-0.40.0/test/span.t.cpp:402:9: note: 'sp_6(D)' declared here


Upstream PR: https://github.com/gsl-lite/gsl-lite/pull/319

Comment 5 Fedora Update System 2022-02-06 22:06:12 UTC
FEDORA-2022-3260e2eccf has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-3260e2eccf

Comment 6 Fedora Update System 2022-02-06 22:08:44 UTC
FEDORA-2022-3260e2eccf has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Ben Beasley 2022-02-07 22:18:51 UTC
Reopening this because it appears to be a GCC bug: https://github.com/gsl-lite/gsl-lite/pull/319

Comment 8 Ben Beasley 2022-02-07 22:58:01 UTC
Unblocking F36FTBFS because a workaround exists and the package currently builds.

(Patching out -Werror would also be a reasonable workaround.)

Comment 9 Ben Cotton 2022-02-08 20:07:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 10 Fedora Update System 2022-04-08 18:16:55 UTC
FEDORA-2022-650f80408d has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-650f80408d

Comment 11 Fedora Update System 2022-04-08 18:20:19 UTC
FEDORA-2022-650f80408d has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.