Closed myclevorname closed 3 months ago
This could solve it? https://github.com/ndless-nspire/Ndless/pull/420
This could solve it? #420
That did not fix it.
...
ndless-sdk> checking for suffix of executables... ../../download/gcc-14.1.0/libcpp/expr.cc: In function 'unsigned int cpp_classify_number(cpp_reader*, const cpp_token*, const char**, location_t)':
ndless-sdk> ../../download/gcc-14.1.0/libcpp/expr.cc:842:35: error: format not a string literal and no format arguments [8;;https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Wformat-security-Werror=format-security8;;]
ndless-sdk> 842 | cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
ndless-sdk> | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ndless-sdk> 843 | 0, message);
ndless-sdk> | ~~~~~~~~~~~
ndless-sdk> ../../download/gcc-14.1.0/libcpp/expr.cc:845:38: error: format not a string literal and no format arguments [8;;https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Wformat-security-Werror=format-security8;;]
ndless-sdk> 845 | cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
ndless-sdk> | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ndless-sdk> 846 | virtual_location, 0, message);
ndless-sdk> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ndless-sdk> ../../download/gcc-14.1.0/libcpp/expr.cc:855:33: error: format not a string literal and no format arguments [8;;https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Wformat-security-Werror=format-security8;;]
ndless-sdk> 855 | cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
ndless-sdk> | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ndless-sdk> 856 | virtual_location, 0, message);
ndless-sdk> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ndless-sdk> ../../download/gcc-14.1.0/libcpp/expr.cc:867:42: error: format not a string literal and no format arguments [8;;https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Wformat-security-Werror=format-security8;;]
ndless-sdk> 867 | cpp_pedwarning_with_line (pfile, CPP_W_C11_C23_COMPAT,
ndless-sdk> | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ndless-sdk> 868 | virtual_location, 0, message);
ndless-sdk> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ndless-sdk> ../../download/gcc-14.1.0/libcpp/expr.cc:870:39: error: format not a string literal and no format arguments [8;;https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Wformat-security-Werror=format-security8;;]
ndless-sdk> 870 | cpp_warning_with_line (pfile, CPP_W_C11_C23_COMPAT,
ndless-sdk> | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ndless-sdk> 871 | virtual_location, 0, message);
ndless-sdk> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ndless-sdk> ../../download/gcc-14.1.0/libcpp/expr.cc:877:35: error: format not a string literal and no format arguments [8;;https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Wformat-security-Werror=format-security8;;]
ndless-sdk> 877 | cpp_error_with_line (pfile, CPP_DL_PEDWARN, virtual_location, 0,
ndless-sdk> | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ndless-sdk> 878 | message);
ndless-sdk> | ~~~~~~~~
ndless-sdk> gcc -c -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wno-overlength-strings -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I../../download/gcc-14.1.0/fixincludes -I../include -I../../download/gcc-14.1.0/fixincludes/../include ../../download/gcc-14.1.0/fixincludes/fixfixes.c
...
I guess your environment sets incompatible CFLAGS/CXXFLAGS. Make sure those variables are not set.
I found the problem. I had to add hardeningDisable = [ "format" ];
into my Flake.
I am running NixOS unstable with GCC version 13.3.0. When building, I get the error shown below. Please update the version of GCC used.