Bug 2045186 - abseil-cpp: FTBFS in Fedora rawhide/f36
Summary: abseil-cpp: FTBFS in Fedora rawhide/f36
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: abseil-cpp
Version: 36
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rich Mattes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2042434 (view as bug list)
Depends On:
Blocks: PPCTracker 1649936 F36FTBFS F37FTBFS 2053630 2053636
TreeView+ depends on / blocked
 
Reported: 2022-01-25 16:04 UTC by Fedora Release Engineering
Modified: 2022-02-18 14:53 UTC (History)
5 users (show)

Fixed In Version: abseil-cpp-20210324.2-4.fc36 abseil-cpp-20210324.2-4.fc37
Clone Of:
Environment:
Last Closed: 2022-02-18 14:52:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
build.log (32.00 KB, text/plain)
2022-01-25 16:04 UTC, Fedora Release Engineering
no flags Details
root.log (32.00 KB, text/plain)
2022-01-25 16:05 UTC, Fedora Release Engineering
no flags Details
state.log (1014 bytes, text/plain)
2022-01-25 16:05 UTC, Fedora Release Engineering
no flags Details
reduced test (2.88 KB, text/x-csrc)
2022-02-01 13:27 UTC, Dan Horák
no flags Details
preprocessed test case source (452.42 KB, application/gzip)
2022-02-07 13:46 UTC, Dan Horák
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 100912 0 P3 RESOLVED powerpc64le: ieee128 long double incorrectly printed when using shared libstdc++ 2022-02-14 17:29:56 UTC

Description Fedora Release Engineering 2022-01-25 16:04:55 UTC
abseil-cpp failed to build from source in Fedora rawhide/f36

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


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Please fix abseil-cpp 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,
abseil-cpp will be orphaned. Before branching of Fedora 37,
abseil-cpp 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 16:04:59 UTC
Created attachment 1853611 [details]
build.log

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

Comment 2 Fedora Release Engineering 2022-01-25 16:05:01 UTC
Created attachment 1853612 [details]
root.log

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

Comment 3 Fedora Release Engineering 2022-01-25 16:05:03 UTC
Created attachment 1853613 [details]
state.log

Comment 4 Ben Beasley 2022-01-31 18:56:03 UTC
Currently there is one test failure on architectures other than s390x. It looks like it could be a Google Test issue.

Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=82195530

Comment 5 Ben Beasley 2022-01-31 18:58:16 UTC
(In reply to Ben Beasley from comment #4)
> Currently there is one test failure on architectures other than s390x. It
> looks like it could be a Google Test issue.
> 
> Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=82195530

Sorry, that last comment was with LTO disabled. Running another scratch build to see if there are still LTO problems, as in RHBZ#2042434: https://koji.fedoraproject.org/koji/taskinfo?taskID=82197683

Comment 6 Ben Beasley 2022-01-31 18:58:21 UTC
*** Bug 2042434 has been marked as a duplicate of this bug. ***

Comment 7 Ben Beasley 2022-01-31 21:48:35 UTC
Looks like LTO is OK now, so there’s just the test failure to deal with.

Comment 8 Ben Beasley 2022-01-31 23:39:27 UTC
It looks like we now have a version of googletest that understands GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST. If I try removing this from %prep:

> # Remove macro only defined in googletest git master
> sed -i 's|GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST|//|' absl/container/internal/unordered_map_modifiers_test.h

then I get a build that is successful on everything but ppc64le: https://koji.fedoraproject.org/koji/taskinfo?taskID=82204878

Comment 9 Rich Mattes 2022-02-01 00:29:43 UTC
The following tests FAILED:
	 81 - absl_random_beta_distribution_test (Failed)
	 87 - absl_random_exponential_distribution_test (Failed)
	 88 - absl_random_gaussian_distribution_test (Failed)
	 90 - absl_random_uniform_real_distribution_test (Subprocess aborted)
	111 - absl_random_internal_iostream_state_saver_test (Failed)

It looks like most of the failures are related to __ieee128 types:

[  FAILED  ] ExponentialDistributionTypedTest/2.SerializeTest, where TypeParam = __ieee128
[  FAILED  ] GaussianDistributionInterfaceTest/2.SerializeTest, where TypeParam = __ieee128 (282 ms)
[  FAILED  ] GaussianDistributionInterfaceTest/2.SerializeTest, where TypeParam = __ieee128
[  FAILED  ] IOStreamStateSaver.RoundTripLongDoubles
[  FAILED  ] BetaDistributionInterfaceTest/2.SerializeTest, where TypeParam = __ieee128


The subprocess aborted was also related to long double:

Expected equality of these values:
  before
    Which is: 6.953283485615657412940250901535356313e-310 6.953283485615657412940250901535356313e-310
  after
    Which is: 6.953283485615657412940250901535356313e-310 6.953283485615657412940250901535356313e-310
absl_random_uniform_real_distribution_test: /builddir/build/BUILD/abseil-cpp-20210324.2/absl/random/uniform_real_distribution.h:75: absl::lts_20210324::uniform_real_distribution<RealType>::param_type::param_type(absl::lts_20210324::uniform_real_distribution<RealType>::result_type, absl::lts_20210324::uniform_real_distribution<RealType>::result_type) [with RealType = long double; absl::lts_20210324::uniform_real_distribution<RealType>::result_type = long double]: Assertion `lo <= hi' failed.

This might be related to the ppc64 long double changes, I'm blocking the ppc tracker

Comment 10 Dan Horák 2022-02-01 09:01:03 UTC
Yes, it will be related. Does abseil depend on some external libs? Perhaps it's just a build order issue ...

Comment 11 Dan Horák 2022-02-01 09:23:48 UTC
After looking at the code then at least the beta distribution contains some expectation about the behaviour of the "old" IBM long double type for PPC ...

Comment 12 Dan Horák 2022-02-01 13:26:29 UTC
So there is something wrong somewhere :-) I have reduced the absl_random_beta_distribution_test source substantially, so it should be easier to debug.

Comment 13 Dan Horák 2022-02-01 13:27:31 UTC
Created attachment 1858360 [details]
reduced test

Comment 14 Jakub Jelinek 2022-02-07 11:50:41 UTC
Do you have preprocessed version of the reduced test?

Comment 15 Dan Horák 2022-02-07 13:39:28 UTC
Looks to me there is something wrong with the stringstream reader/writer, I am slowly working on it. IMO it's not clear it's GCC's fault, could be libstdc++ ...

Comment 16 Dan Horák 2022-02-07 13:46:41 UTC
Created attachment 1859579 [details]
preprocessed test case source

Comment 17 Dan Horák 2022-02-07 13:47:21 UTC
and the command line:
/usr/bin/g++  -I/home/sharkcz/abseil-cpp/abseil-cpp-20210324.2 -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 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Wextra -Wcast-qual -Wconversion-null -Wformat-security -Wmissing-declarations -Woverlength-strings -Wpointer-arith -Wundef -Wunused-local-typedefs -Wunused-result -Wvarargs -Wvla -Wwrite-strings -DNOMINMAX -Wno-conversion-null -Wno-deprecated-declarations -Wno-missing-declarations -Wno-sign-compare -Wno-unused-function -Wno-unused-parameter -Wno-unused-private-field -std=gnu++17 -MD -MT absl/random/CMakeFiles/absl_random_beta_distribution_test.dir/beta_distribution_test.cc.o -MF CMakeFiles/absl_random_beta_distribution_test.dir/beta_distribution_test.cc.o.d -o CMakeFiles/absl_random_beta_distribution_test.dir/beta_distribution_test.cc.o -c /home/sharkcz/abseil-cpp/abseil-cpp-20210324.2/absl/random/beta_distribution_test.cc

Comment 18 Jakub Jelinek 2022-02-07 15:18:24 UTC
I can reproduce it with just:
#include <sstream>

int
main ()
{
  std::stringstream ss;
  long double a = 9.99999999999999945153271454209571652e-21L;
  long double b;
  ss << a;
  ss >> b;
  __builtin_printf ("%Lg %Lg\n", a, b);
  return 0;
}

which with -mabi=ibmlongdouble prints
1e-20 1e-20
but with -mabi=ieeelongdouble prints
1e-20 6.95326e-310

So looks like libstdc++ issue.

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

Comment 20 Jonathan Wakely 2022-02-14 17:30:26 UTC
Fixed in upstream GCC now.

Comment 21 Ben Beasley 2022-02-15 13:46:30 UTC
Thanks! I opened a PR with the Google Test fix. Hopefully once GCC is updated in Rawhide it will be possible merge and build it without further changes.

https://src.fedoraproject.org/rpms/abseil-cpp/pull-request/2

Comment 23 Fedora Update System 2022-02-18 14:45:29 UTC
FEDORA-2022-6c93a8a110 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-6c93a8a110

Comment 24 Fedora Update System 2022-02-18 14:46:28 UTC
FEDORA-2022-6e05296377 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-6e05296377

Comment 25 Fedora Update System 2022-02-18 14:52:53 UTC
FEDORA-2022-6c93a8a110 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 26 Fedora Update System 2022-02-18 14:53:04 UTC
FEDORA-2022-6e05296377 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


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