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

Add ignore SAFESH flags in cmake #173

Closed
rafagan opened this issue Mar 12, 2020 · 1 comment · Fixed by #177
Closed

Add ignore SAFESH flags in cmake #173

rafagan opened this issue Mar 12, 2020 · 1 comment · Fixed by #177

Comments

@rafagan
Copy link

rafagan commented Mar 12, 2020

When I run cmake the following error occurs:

PS C:\Users\rafagan\Desktop\sentry-native> cmake --build build --parallel
Microsoft (R) Build Engine version 15.5.180.51428 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

getopt.vcxproj -> C:\Users\rafagan\Desktop\sentry-native\build\getopt.lib
zlib.vcxproj -> C:\Users\rafagan\Desktop\sentry-native\build\zlib.lib
mini_chromium.vcxproj -> C:\Users\rafagan\Desktop\sentry-native\build\mini_chromium.lib
crashpad_compat.vcxproj -> C:\Users\rafagan\Desktop\sentry-native\build\crashpad_compat.lib
crashpad_tools.vcxproj -> C:\Users\rafagan\Desktop\sentry-native\build\crashpad_tools.lib
crashpad_util.vcxproj -> C:\Users\rafagan\Desktop\sentry-native\build\crashpad_util.lib
crashpad_client.vcxproj -> C:\Users\rafagan\Desktop\sentry-native\build\crashpad_client.lib
crashpad_snapshot.vcxproj -> C:\Users\rafagan\Desktop\sentry-native\build\crashpad_snapshot.lib
crashpad_minidump.vcxproj -> C:\Users\rafagan\Desktop\sentry-native\build\crashpad_minidump.lib
crashpad_util.lib(capture_context_win.obj) : error LNK2026: module unsafe for SAFESEH image. [C:\Users\rafagan\Desktop
sentry-native\build\external\crashpad\handler\crashpad_handler.vcxproj]
crashpad_util.lib(safe_terminate_process.obj) : error LNK2026: module unsafe for SAFESEH image. [C:\Users\rafagan\Deskt
op\sentry-native\build\external\crashpad\handler\crashpad_handler.vcxproj]
C:\Users\rafagan\Desktop\sentry-native\build\crashpad_handler.exe : fatal error LNK1281: Unable to generate SAFESEH ima
ge. [C:\Users\rafagan\Desktop\sentry-native\build\external\crashpad\handler\crashpad_handler.vcxproj]

Then I added the following lines and the errors had gone:

SET(CMAKE_CXX_FLAGS           "${CMAKE_CXX_FLAGS} /D \"SAFESEH:NO\"")
SET(CMAKE_EXE_LINKER_FLAGS    "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")
@jan-auer
Copy link
Member

@Swatinem It looks like we need to bring back this: #64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants