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 <[email protected]>
MF0773 pushed a commit to MF0773/abseil-cpp that referenced this issue Sep 7, 2023
GerHobbelt pushed a commit to GerHobbelt/abseil-cpp that referenced this issue Sep 26, 2024
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