Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20210324.1: build fails with glibc 2.33.9000 #952

Closed
kloczek opened this issue May 1, 2021 · 3 comments
Closed

20210324.1: build fails with glibc 2.33.9000 #952

kloczek opened this issue May 1, 2021 · 3 comments
Assignees
Labels

Comments

@kloczek
Copy link

kloczek commented May 1, 2021

[ 56%] Building CXX object absl/debugging/CMakeFiles/failure_signal_handler.dir/failure_signal_handler.cc.o
cd /home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/x86_64-redhat-linux-gnu/absl/debugging && /usr/bin/g++ -Dfailure_signal_handler_EXPORTS -I/home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1 -O2 -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 -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -DNDEBUG -fPIC -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 -o CMakeFiles/failure_signal_handler.dir/failure_signal_handler.cc.o -c /home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/absl/debugging/failure_signal_handler.cc
/home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/absl/debugging/failure_signal_handler.cc: In function ‘bool absl::lts_20210324::SetupAlternateStackOnce()’:
/home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/absl/debugging/failure_signal_handler.cc:139:32: error: no matching function for call to ‘max(long int, int)’
  139 |   size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
      |                        ~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/algorithm:61,
                 from /home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/absl/debugging/failure_signal_handler.cc:36:
/usr/include/c++/11/bits/stl_algobase.h:254:5: note: candidate: ‘template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)’
  254 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:254:5: note:   template argument deduction/substitution failed:
/home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/absl/debugging/failure_signal_handler.cc:139:32: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long int’ and ‘int’)
  139 |   size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
      |                        ~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/algorithm:61,
                 from /home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/absl/debugging/failure_signal_handler.cc:36:
/usr/include/c++/11/bits/stl_algobase.h:300:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:300:5: note:   template argument deduction/substitution failed:
/home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/absl/debugging/failure_signal_handler.cc:139:32: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long int’ and ‘int’)
  139 |   size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
      |                        ~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/algorithm:62,
                 from /home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/absl/debugging/failure_signal_handler.cc:36:
/usr/include/c++/11/bits/stl_algo.h:3461:5: note: candidate: ‘template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)’
 3461 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3461:5: note:   template argument deduction/substitution failed:
/home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/absl/debugging/failure_signal_handler.cc:139:32: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long int’
  139 |   size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
      |                        ~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/algorithm:62,
                 from /home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/absl/debugging/failure_signal_handler.cc:36:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: candidate: ‘template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)’
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3467:5: note:   template argument deduction/substitution failed:
/home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/absl/debugging/failure_signal_handler.cc:139:32: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long int’
  139 |   size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
      |                        ~~~~~~~~^~~~~~~~~~~~~~~~~
make[2]: *** [absl/debugging/CMakeFiles/failure_signal_handler.dir/build.make:85: absl/debugging/CMakeFiles/failure_signal_handler.dir/failure_signal_handler.cc.o] Error 1
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/abseil-cpp-20210324.1/x86_64-redhat-linux-gnu'
make[1]: *** [CMakeFiles/Makefile2:1188: absl/debugging/CMakeFiles/failure_signal_handler.dir/all] Error 2

Here is why it does not compile https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=d9f462fb372fb02da032cefd6b091d7582c425ae

@kloczek kloczek added the bug label May 1, 2021
@kloczek
Copy link
Author

kloczek commented May 1, 2021

Quick fix for that is in Fedora https://src.fedoraproject.org/rpms/abseil-cpp/raw/rawhide/f/abseil-cpp-20200923.3-typematch.patch
However that patch needs to be done in way which still would allow build abseil-cpp against older glibc or non-glibc build env.

@derekmauro derekmauro self-assigned this May 2, 2021
@derekmauro
Copy link
Member

Thank you for the report. A patch is pending. The easy fix that should work everywhere is just std::max<size_t>(SIGSTKSZ, 65536).

@kloczek
Copy link
Author

kloczek commented May 4, 2021

Thank you

derekmauro added a commit to derekmauro/abseil-cpp that referenced this issue Jun 1, 2021
* Fixes build with glibc 2.34 (abseil#952)
* Fixes "illegal thread local variable" on some Apple platforms (abseil#954, abseil#965)

PiperOrigin-RevId: 371693908
derekmauro added a commit that referenced this issue Jun 1, 2021
* Fixes build with glibc 2.34 (#952)
* Fixes "illegal thread local variable" on some Apple platforms (#954, #965)
qtprojectorg pushed a commit to qt/qtwebengine-chromium that referenced this issue Dec 10, 2021
Fixes abseil/abseil-cpp#952

This fix is extracted from:
abseil/abseil-cpp@a9831f1

Change-Id: I337c8c900ef569853046bb9adc3807a3ed12b13b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
MF0773 pushed a commit to MF0773/abseil-cpp that referenced this issue Sep 7, 2023
razmser pushed a commit to razmser/abseil-cpp that referenced this issue Sep 12, 2023
--
cf88f9cf40eab54c06bca7f20795352ec23bb583 by Derek Mauro <dmauro@google.com>:

Fixes build with latest glibc
Fixes abseil#952

PiperOrigin-RevId: 371693908

--
99bcd0f4a747ce7a401e23c745adf34d0ec5131b by Samuel Benzaquen <sbenza@google.com>:

Add support for std::string_view in StrFormat even when
absl::string_view != std::string_view.

PiperOrigin-RevId: 371693633

--
e35463572149a6c2d4a0d439b9300ce03fd6b96d by Abseil Team <absl-team@google.com>:

Cmake builds should only install pkg-config when explicitly requested.

PiperOrigin-RevId: 371403419
GitOrigin-RevId: cf88f9cf40eab54c06bca7f20795352ec23bb583
Change-Id: I4360a18c638a4d901ff44ab1e0a9d8f321c302ea
razmser pushed a commit to razmser/abseil-cpp that referenced this issue Sep 12, 2023
--
cf88f9cf40eab54c06bca7f20795352ec23bb583 by Derek Mauro <dmauro@google.com>:

Fixes build with latest glibc
Fixes abseil#952

PiperOrigin-RevId: 371693908

--
99bcd0f4a747ce7a401e23c745adf34d0ec5131b by Samuel Benzaquen <sbenza@google.com>:

Add support for std::string_view in StrFormat even when
absl::string_view != std::string_view.

PiperOrigin-RevId: 371693633

--
e35463572149a6c2d4a0d439b9300ce03fd6b96d by Abseil Team <absl-team@google.com>:

Cmake builds should only install pkg-config when explicitly requested.

PiperOrigin-RevId: 371403419
GitOrigin-RevId: cf88f9cf40eab54c06bca7f20795352ec23bb583
Change-Id: I4360a18c638a4d901ff44ab1e0a9d8f321c302ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants