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

_FORTIFY_SOURCE seems to break compilation #89

Open
tammela opened this issue Feb 2, 2020 · 2 comments · May be fixed by #97
Open

_FORTIFY_SOURCE seems to break compilation #89

tammela opened this issue Feb 2, 2020 · 2 comments · May be fixed by #97

Comments

@tammela
Copy link
Contributor

tammela commented Feb 2, 2020

Compiling with _FORTIFY_SOURCE, which might standard in some distros, seems to break the compilation process with an error on libc's function vnsprintf().

The following patch can fix the compilation:

-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -Wall")
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -U_FORTIFY_SOURCE -Wall")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -U_FORTIFY_SOURCE -O3")

Might need more info as alpine uses musl.

Setup:
Alpine 39
gcc (Alpine 8.3.0) 8.3.0

@karanankit01
Copy link
Contributor

i want to look on this issue.
Is this error arose after addition of libraries to make work on all platform?

@tammela
Copy link
Contributor Author

tammela commented Feb 24, 2020 via email

@karanankit01 karanankit01 linked a pull request Mar 6, 2020 that will close this issue
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