* Build fails due a warning in lib
@ 2023-10-05 19:27 Vincenzo Palazzo
2023-10-06 10:24 ` Kai Ruottu
0 siblings, 1 reply; 4+ messages in thread
From: Vincenzo Palazzo @ 2023-10-05 19:27 UTC (permalink / raw)
To: gcc-help
Hi list,
I am trying to build gcc with the following command
../../gittea/gcc/configure -v
--prefix=/home/vincenzopalazzo/build-dir/gcc
--enable-languages=c,c++,rust --disable-multilib
and when I ran `make` I got the error reported below. I have the feeling
that I am missing something, because this code is not touched since
2012 (thank git blame)
so I am pretty sure that I am missing something, but not sure what.
P.S: the gcc version that I use to compile gcc is 12.3.0
Cheers,
Vincent.
----
tti -I../../../../gittea/gcc/libcpp -I.
-I../../../../gittea/gcc/libcpp/../include
-I../../../../gittea/gcc/libcpp/include -c -o expr.o -MT expr.o
-MMD -MP -MF .deps/expr.Tpo ../../../../gittea/gcc/libcpp/expr.cc
../../../../gittea/gcc/libcpp/expr.cc: In function ‘unsigned int
cpp_classify_number(cpp_reader*, const cpp_token*, const char**,
location_t)’:
../../../../gittea/gcc/libcpp/expr.cc:842:35: error: format not a
string literal and no format arguments [-Werror=format-security]
842 | cpp_warning_with_line (pfile, CPP_W_LONG_LONG,
virtual_location,
|
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
843 | 0, message);
| ~~~~~~~~~~~
../../../../gittea/gcc/libcpp/expr.cc:845:38: error: format not a
string literal and no format arguments [-Werror=format-security]
845 | cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
846 | virtual_location, 0, message);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../gittea/gcc/libcpp/expr.cc:855:33: error: format not a
string literal and no format arguments [-Werror=format-security]
855 | cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
856 | virtual_location, 0, message);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../gittea/gcc/libcpp/expr.cc:867:42: error: format not a
string literal and no format arguments [-Werror=format-security]
867 | cpp_pedwarning_with_line (pfile, CPP_W_C11_C2X_COMPAT,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
868 | virtual_location, 0, message);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../gittea/gcc/libcpp/expr.cc:870:39: error: format not a
string literal and no format arguments [-Werror=format-security]
870 | cpp_warning_with_line (pfile, CPP_W_C11_C2X_COMPAT,
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
871 | virtual_location, 0, message);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../gittea/gcc/libcpp/expr.cc:877:35: error: format not a
string literal and no format arguments [-Werror=format-security]
877 | cpp_error_with_line (pfile, CPP_DL_PEDWARN,
virtual_location, 0,
|
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
878 | message);
| ~~~~~~~~
cc1plus: some warnings being treated as errors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Build fails due a warning in lib
2023-10-05 19:27 Build fails due a warning in lib Vincenzo Palazzo
@ 2023-10-06 10:24 ` Kai Ruottu
2023-10-06 10:36 ` Kai Ruottu
2023-10-07 14:43 ` Vincenzo Palazzo
0 siblings, 2 replies; 4+ messages in thread
From: Kai Ruottu @ 2023-10-06 10:24 UTC (permalink / raw)
To: Vincenzo Palazzo, gcc-help
Vincenzo Palazzo via Gcc-help kirjoitti 5.10.2023 klo 22.27:
> Hi list,
>
> I am trying to build gcc with the following command
> ../../gittea/gcc/configure -v
> --prefix=/home/vincenzopalazzo/build-dir/gcc
> --enable-languages=c,c++,rust --disable-multilib
>
> and when I ran `make` I got the error reported below. I have the feeling
> that I am missing something, because this code is not touched since
> 2012 (thank git blame)
> so I am pretty sure that I am missing something, but not sure what.
>
> P.S: the gcc version that I use to compile gcc is 12.3.0
>
> tti -I../../../../gittea/gcc/libcpp -I.
> -I../../../../gittea/gcc/libcpp/../include
> -I../../../../gittea/gcc/libcpp/include -c -o expr.o -MT expr.o
> -MMD -MP -MF .deps/expr.Tpo ../../../../gittea/gcc/libcpp/expr.cc
> ../../../../gittea/gcc/libcpp/expr.cc: In function ‘unsigned int
> cpp_classify_number(cpp_reader*, const cpp_token*, const char**,
> location_t)’:
> ../../../../gittea/gcc/libcpp/expr.cc:842:35: error: format not a
> string literal and no format arguments [-Werror=format-security]
> 842 | cpp_warning_with_line (pfile, CPP_W_LONG_LONG,
> virtual_location,
> |
> ~~~~~
> cc1plus: some warnings being treated as errors
You are missing to tell what is the C++ compiler you are using to
compile the
'libcpp' stuff. Please don't expect a C++ compiler from 2012 or earlier to
"grok" some uptodate C++ code. For the gcc-12.3.0 sources I myself would
try gcc-7.5.0 or newer as the stage-1 compiler in the native-GCC case.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Build fails due a warning in lib
2023-10-06 10:24 ` Kai Ruottu
@ 2023-10-06 10:36 ` Kai Ruottu
2023-10-07 14:43 ` Vincenzo Palazzo
1 sibling, 0 replies; 4+ messages in thread
From: Kai Ruottu @ 2023-10-06 10:36 UTC (permalink / raw)
To: Vincenzo Palazzo, gcc-help
Kai Ruottu kirjoitti 6.10.2023 klo 13.24:
> Vincenzo Palazzo via Gcc-help kirjoitti 5.10.2023 klo 22.27:
>> Hi list,
>>
>> I am trying to build gcc with the following command
>> ../../gittea/gcc/configure -v
>> --prefix=/home/vincenzopalazzo/build-dir/gcc
>> --enable-languages=c,c++,rust --disable-multilib
>>
>> and when I ran `make` I got the error reported below. I have the feeling
>> that I am missing something, because this code is not touched since
>> 2012 (thank git blame)
>> so I am pretty sure that I am missing something, but not sure what.
>>
>> P.S: the gcc version that I use to compile gcc is 12.3.0
>> cc1plus: some warnings being treated as errors
> You are missing to tell what is the C++ compiler you are using to
> compile the
> 'libcpp' stuff. Please don't expect a C++ compiler from 2012 or
> earlier to
> "grok" some uptodate C++ code. For the gcc-12.3.0 sources I myself would
> try gcc-7.5.0 or newer as the stage-1 compiler in the native-GCC case.
Maybe I misunderstood your writing.... Using gcc-12.3.0 to compile some
old GCC sources would also be questionable. Using some older g++ then
would succeed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Build fails due a warning in lib
2023-10-06 10:24 ` Kai Ruottu
2023-10-06 10:36 ` Kai Ruottu
@ 2023-10-07 14:43 ` Vincenzo Palazzo
1 sibling, 0 replies; 4+ messages in thread
From: Vincenzo Palazzo @ 2023-10-07 14:43 UTC (permalink / raw)
To: Kai Ruottu; +Cc: gcc-help
Hi all,
FYI I found the solution, the problem was my nix shell that was
adding additional build flags.
This was a known problem around the nix community, see [1]
[1] https://stackoverflow.com/questions/77249760/gcc-build-fails-due-a-warning-in-libcpp/77250223#77250223
Cheers,
Vincent.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-07 14:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-05 19:27 Build fails due a warning in lib Vincenzo Palazzo
2023-10-06 10:24 ` Kai Ruottu
2023-10-06 10:36 ` Kai Ruottu
2023-10-07 14:43 ` Vincenzo Palazzo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).