Build Error on OpenBSD: cannot static_cast<pid_t>(pthread_self())
Closed this issue · 2 comments
Describe the issue
reinterpret_cast<pid_t>(pthread_self())
in this line:
https://github.com/abseil/abseil-cpp/blob/master/absl/base/internal/sysinfo.cc#L470
...would silence the error but I'm not sure what the actual correct fix is.
I came across this problem when trying to build and install grpc which relies on abseil. I attempted installing grpc via ruby with:
gem32 install grpc
I'm on the latest version of openbsd at the time of writing (7.4)
Steps to reproduce the problem
# install OpenBSD 7.4 first, the enter in the terminal:
su
# input super user password
pkg_add ruby
gem32 install grpc
# now you will see a abseil build error on the given line of code and in the specified file in this ticket, with the exact error message
### What version of Abseil are you using?
The version shipped with grpc installed from gem32 in openbsd 7.4 (try the reproduce steps to see what I mean)
### What operating system and version are you using?
OpenBSD 7.4
### What compiler and version are you using?
Not sure how to check, whatever ruby is using with gem32
### What build system are you using?
gem32 (ruby)
### Additional context
_No response_
I think this is already fixed, you probably have an old version. The OpenBSD case is here:
abseil-cpp/absl/base/internal/sysinfo.cc
Lines 447 to 449 in c79e6b3
The abseil version provided by ruby's gem install
command is indeed outdated.
Thanks for the information. Hoping they update to a new enough version soon to get this working.