You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems later versions of GCC requires the -O to FORTIFY this makes the compilation error fail with:
[115/198] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/matchers/catch_matchers_string.cpp.oIn file included from /home/user/.cache/CPM/catch2/8336fa0dd617945aa607363db497172b01dc4bf1/src/catch2/matchers/catch_matchers_string.cpp:8:In file included from /home/user/.cache/CPM/catch2/8336fa0dd617945aa607363db497172b01dc4bf1/src/catch2/../catch2/matchers/catch_matchers_string.hpp:11:In file included from /home/user/.cache/CPM/catch2/8336fa0dd617945aa607363db497172b01dc4bf1/src/catch2/../catch2/matchers/catch_matchers.hpp:11:In file included from /home/user/.cache/CPM/catch2/8336fa0dd617945aa607363db497172b01dc4bf1/src/catch2/../catch2/matchers/internal/catch_matchers_impl.hpp:11:In file included from /home/user/.cache/CPM/catch2/8336fa0dd617945aa607363db497172b01dc4bf1/src/catch2/../catch2/internal/catch_test_macro_impl.hpp:12:In file included from /home/user/.cache/CPM/catch2/8336fa0dd617945aa607363db497172b01dc4bf1/src/catch2/../catch2/internal/catch_assertion_handler.hpp:11:In file included from /home/user/.cache/CPM/catch2/8336fa0dd617945aa607363db497172b01dc4bf1/src/catch2/../catch2/catch_assertion_info.hpp:12:In file included from /home/user/.cache/CPM/catch2/8336fa0dd617945aa607363db497172b01dc4bf1/src/catch2/../catch2/internal/catch_source_line_info.hpp:11:In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/cstddef:49:In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/x86_64-pc-linux-gnu/bits/c++config.h:679:In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/x86_64-pc-linux-gnu/bits/os_defines.h:39:/usr/include/features.h:413:4: warning: _FORTIFY_SOURCE requires compiling with optimization (-O) [-W#warnings]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O) ^1 warning generated.
For all sources files, and as -Werror is enabled the whole compilation fails for GCC and CLANG.
I inspected the problematic file /usr/include/features.h:413:4 and here is the content:
#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0
# if!defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
# elif!__GNUC_PREREQ (4, 1)
# warning _FORTIFY_SOURCE requires GCC 4.1 or later
# elif _FORTIFY_SOURCE > 2 && (__glibc_clang_prereq (9, 0) \ || __GNUC_PREREQ (12, 0))
# if _FORTIFY_SOURCE > 3
# warning _FORTIFY_SOURCE > 3 is treated like 3 on this platform
# endif
# define __USE_FORTIFY_LEVEL 3
# elif _FORTIFY_SOURCE > 1
# if _FORTIFY_SOURCE > 2
# warning _FORTIFY_SOURCE > 2 is treated like 2 on this platform
# endif
# define __USE_FORTIFY_LEVEL 2
# else
# define __USE_FORTIFY_LEVEL 1
# endif#endif#ifndef __USE_FORTIFY_LEVEL
# define __USE_FORTIFY_LEVEL 0#endif
It seems it only wants to use FORTIFY for __OPTIMIZE__ > 0.
For the meantime, do you recommend disabling FORTIFY or downgrading GCC?
Thanks for your time and this great repository.
EDIT 1:
Platform: ArchLinux
GCC: 13.1.1 20230429
The text was updated successfully, but these errors were encountered:
It seems later versions of GCC requires the
-O
toFORTIFY
this makes the compilation error fail with:For all sources files, and as
-Werror
is enabled the whole compilation fails for GCC and CLANG.I inspected the problematic file
/usr/include/features.h:413:4
and here is the content:It seems it only wants to use
FORTIFY
for__OPTIMIZE__ > 0
.For the meantime, do you recommend disabling
FORTIFY
or downgrading GCC?Thanks for your time and this great repository.
EDIT 1:
The text was updated successfully, but these errors were encountered: