-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Linux build with native SDK and GLIBC 2.27 #94
Comments
So in particular, this is about the following code in crashpad, which has a comment about why it can't check the GLIBC version: Rather than checking the version, it seems to be enough to actually add the |
I think the right fix here would be to make sure the throw specified is on there for C++. I'm just not sure if all glibc versions have that or if that then breaks it for other setups. |
I will close this for now, as this is specific to crashpad on linux, which we do not yet support. We will revisit this in a few weeks after we have breakpad support ready. |
This is only a problem with a recent clang in c++17 mode as both clang -std=c++14 and GCC (I only tried c++17) seem to work fine. The workaround thus is the following:
I'm using cmake files generated by a slightly modified version of gn_to_cmake.py on windows, darwin and linux without any problems. The above should come right after include()'ing the generated CMakeFiles.ext file. |
oh nice! I wish I knew about that one before |
I dug a bit more: glibc-2.26 does not have this function. glibc-2.27 and later has it, always with __THROW in the declaration. __THROW is a glibc macro which compiles to nothing for gcc and select (very old) g++ versions. If it's desired to avoid preprocessor checks, one can check with cmake (or gn) to see whether this function exists and compile mman.cc selectively. |
The right thing to do is to patch crashpad to have __THROW in both declaration and definition of the said function as that's what it's trying to imitate here. Checking for glibc version is the wrong approach imo. |
Hello,
Using the native SDK with GLIBC 2.27 crashpad doesn't seem to build.
I get the following error:
The thing is that there's no memfd_create() wrapper before glibc 2.27 and in "sentry-native/crashpad/build/crashpad/compat/linux/sys/mman.h" it makes the wrapper if GLIBC is defined instead of checking if GLIBC is < 2.27.
Checking if the version is < 2.27 works.
Thanks
The text was updated successfully, but these errors were encountered: