
Rodrigo I'm getting lots of errors from ./configure, see below. Seems to be something to do with your toolchain stuff? I'm lost. Should I worry? If not, could they be made to look less alarming somehow? Simon Entering: checking for C compiler checking for -Qunused-arguments support... Entering: checking for -Qunused-arguments support Execute: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1 found for -Qunused-arguments support: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc supports --target... Entering: checking whether Cc supports --target Execute: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1 found whether Cc supports --target: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc works... Entering: checking whether Cc works Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found whether Cc works: () checking for C99 support... Entering: checking for C99 support Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found for C99 support: () checking whether cc supports extra via-c flags... Entering: checking whether cc supports extra via-c flags Execute: /usr/bin/gcc -c -fwrapv -fno-builtin -Werror -x c -o /tmp/tmp0/test.o /tmp/tmp0/test.c found whether cc supports extra via-c flags: () found for C compiler: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking for C++ compiler... Entering: checking for C++ compiler x86_64-unknown-linux-g++ not found in search path x86_64-unknown-linux-clang++ not found in search path x86_64-unknown-linux-c++ not found in search path checking whether C++ supports --target... Entering: checking whether C++ supports --target Execute: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Command failed: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Exited with code 1 found whether C++ supports --target: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} Execute: /usr/bin/g++ -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp found for C++ compiler: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} checking for C preprocessor...

Thanks for pointing this out, Simon What you’ve pasted is the trace of the ghc-toolchain program. We should probably lower the verbosity after !10976 lands, but in the meantime it’s just useful to debug mostly CI. At the end of the configure step there might be a message that starts with “Don’t worry! This will not affect your build in any way”. That’s as less alarming as I could make it :). If you do see the warning, it’s due to a discrepancy between the output produced by configure and the one produced by ghc-toolchain: We’re fixing all the discrepancies caught by CI in !10976 — after which we’ll always validate these discrepancies in CI, to ensure ghc-toolchain is kept up to date with configure, while configure still configures toolchains. I’ve also been busy writing the blog about this. It should come out soon enough. Rodrigo
On 7 Aug 2023, at 10:50, Simon Peyton Jones
wrote: Rodrigo
I'm getting lots of errors from ./configure, see below.
Seems to be something to do with your toolchain stuff? I'm lost. Should I worry? If not, could they be made to look less alarming somehow?
Simon
Entering: checking for C compiler checking for -Qunused-arguments support... Entering: checking for -Qunused-arguments support Execute: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1
found for -Qunused-arguments support: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc supports --target... Entering: checking whether Cc supports --target Execute: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1
found whether Cc supports --target: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc works... Entering: checking whether Cc works Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found whether Cc works: () checking for C99 support... Entering: checking for C99 support Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found for C99 support: () checking whether cc supports extra via-c flags... Entering: checking whether cc supports extra via-c flags Execute: /usr/bin/gcc -c -fwrapv -fno-builtin -Werror -x c -o /tmp/tmp0/test.o /tmp/tmp0/test.c found whether cc supports extra via-c flags: () found for C compiler: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking for C++ compiler... Entering: checking for C++ compiler x86_64-unknown-linux-g++ not found in search path x86_64-unknown-linux-clang++ not found in search path x86_64-unknown-linux-c++ not found in search path checking whether C++ supports --target... Entering: checking whether C++ supports --target Execute: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Command failed: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Exited with code 1
found whether C++ supports --target: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} Execute: /usr/bin/g++ -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp found for C++ compiler: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} checking for C preprocessor...

At the end of the configure step there might be a message that starts with “Don’t worry! This will not affect your build in any way”. That’s as less alarming as I could make it :).
I do see that message, but apparently it refers only to the immediately preceding warning, namely
configure: WARNING: There are some differences between the toolchain configured by "configure" (hadrian/cfg/default.target) and the toolchain configured by the "ghc-toolchain" program (hadrian/cfg/default.target.ghc-toolchain).
It did nothing to reassure me about earlier errors in the configure stuff;
it seemed to be about something different.
Suggestion
- Instead of "This will not affect..." say "This difference in toolchain
output won't affect...", so the target of "This" is clearer.
- Suppress these gcc errors. You can switch them on in your build!
Simon
On Mon, 7 Aug 2023 at 10:57, Rodrigo Mesquita
Thanks for pointing this out, Simon
What you’ve pasted is the trace of the ghc-toolchain program. We should probably lower the verbosity after !10976 lands, but in the meantime it’s just useful to debug mostly CI.
At the end of the configure step there might be a message that starts with “Don’t worry! This will not affect your build in any way”. That’s as less alarming as I could make it :).
If you do see the warning, it’s due to a discrepancy between the output produced by configure and the one produced by ghc-toolchain: We’re fixing all the discrepancies caught by CI in !10976 — after which we’ll always validate these discrepancies in CI, to ensure ghc-toolchain is kept up to date with configure, while configure still configures toolchains.
I’ve also been busy writing the blog about this. It should come out soon enough.
Rodrigo
On 7 Aug 2023, at 10:50, Simon Peyton Jones
wrote: Rodrigo
I'm getting lots of errors from ./configure, see below.
Seems to be something to do with your toolchain stuff? I'm lost. Should I worry? If not, could they be made to look less alarming somehow?
Simon
Entering: checking for C compiler checking for -Qunused-arguments support... Entering: checking for -Qunused-arguments support Execute: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1
found for -Qunused-arguments support: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc supports --target... Entering: checking whether Cc supports --target Execute: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1
found whether Cc supports --target: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc works... Entering: checking whether Cc works Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found whether Cc works: () checking for C99 support... Entering: checking for C99 support Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found for C99 support: () checking whether cc supports extra via-c flags... Entering: checking whether cc supports extra via-c flags Execute: /usr/bin/gcc -c -fwrapv -fno-builtin -Werror -x c -o /tmp/tmp0/test.o /tmp/tmp0/test.c found whether cc supports extra via-c flags: () found for C compiler: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking for C++ compiler... Entering: checking for C++ compiler x86_64-unknown-linux-g++ not found in search path x86_64-unknown-linux-clang++ not found in search path x86_64-unknown-linux-c++ not found in search path checking whether C++ supports --target... Entering: checking whether C++ supports --target Execute: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Command failed: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Exited with code 1
found whether C++ supports --target: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} Execute: /usr/bin/g++ -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp found for C++ compiler: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} checking for C preprocessor...

The trace is akin to the configure trace — it shows invocations of the toolchain in trying to determine properties of said toolchain e.g. which flags are supported. For example
checking for -Qunused-arguments support... Entering: checking for -Qunused-arguments support Execute: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1 found for -Qunused-arguments support: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}}
Is the trace of invoking the C compiler with -Qunused-arguments, checking whether the C compiler supports such an option. That command exited with code 1 likely because the compiler doesn’t indeed support -Qunused-arguments. That’s fine, it means we won’t pass -Qunused-arguments to your C compiler. Rodrigo
On 7 Aug 2023, at 10:50, Simon Peyton Jones
wrote: Rodrigo
I'm getting lots of errors from ./configure, see below.
Seems to be something to do with your toolchain stuff? I'm lost. Should I worry? If not, could they be made to look less alarming somehow?
Simon
Entering: checking for C compiler checking for -Qunused-arguments support... Entering: checking for -Qunused-arguments support Execute: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1
found for -Qunused-arguments support: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc supports --target... Entering: checking whether Cc supports --target Execute: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1
found whether Cc supports --target: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc works... Entering: checking whether Cc works Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found whether Cc works: () checking for C99 support... Entering: checking for C99 support Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found for C99 support: () checking whether cc supports extra via-c flags... Entering: checking whether cc supports extra via-c flags Execute: /usr/bin/gcc -c -fwrapv -fno-builtin -Werror -x c -o /tmp/tmp0/test.o /tmp/tmp0/test.c found whether cc supports extra via-c flags: () found for C compiler: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking for C++ compiler... Entering: checking for C++ compiler x86_64-unknown-linux-g++ not found in search path x86_64-unknown-linux-clang++ not found in search path x86_64-unknown-linux-c++ not found in search path checking whether C++ supports --target... Entering: checking whether C++ supports --target Execute: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Command failed: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Exited with code 1
found whether C++ supports --target: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} Execute: /usr/bin/g++ -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp found for C++ compiler: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} checking for C preprocessor...

But the other tests look like
checking for gnutar... no
checking for gtar... no
checking for tar... /usr/bin/tar
checking for gpatch... no
checking for patch... /usr/bin/patch
checking for autoreconf... /usr/bin/autoreconf
Can't you say
checking for -Qunused-arguments... no
You can explain this to me, now, and that helps me, today. But I'm trying
to save you from having to explain it to many future GHC devs, and/or save
them time in hunting for answers to the same question.
No rush
Simon
On Mon, 7 Aug 2023 at 11:07, Rodrigo Mesquita
The trace is akin to the configure trace — it shows invocations of the toolchain in trying to determine properties of said toolchain e.g. which flags are supported.
For example
checking for -Qunused-arguments support... Entering: checking for -Qunused-arguments support Execute: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1
found for -Qunused-arguments support: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}}
Is the trace of invoking the C compiler with -Qunused-arguments, checking whether the C compiler supports such an option. That command exited with code 1 likely because the compiler doesn’t indeed support -Qunused-arguments. That’s fine, it means we won’t pass -Qunused-arguments to your C compiler.
Rodrigo
On 7 Aug 2023, at 10:50, Simon Peyton Jones
wrote: Rodrigo
I'm getting lots of errors from ./configure, see below.
Seems to be something to do with your toolchain stuff? I'm lost. Should I worry? If not, could they be made to look less alarming somehow?
Simon
Entering: checking for C compiler checking for -Qunused-arguments support... Entering: checking for -Qunused-arguments support Execute: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1
found for -Qunused-arguments support: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc supports --target... Entering: checking whether Cc supports --target Execute: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1
found whether Cc supports --target: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc works... Entering: checking whether Cc works Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found whether Cc works: () checking for C99 support... Entering: checking for C99 support Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found for C99 support: () checking whether cc supports extra via-c flags... Entering: checking whether cc supports extra via-c flags Execute: /usr/bin/gcc -c -fwrapv -fno-builtin -Werror -x c -o /tmp/tmp0/test.o /tmp/tmp0/test.c found whether cc supports extra via-c flags: () found for C compiler: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking for C++ compiler... Entering: checking for C++ compiler x86_64-unknown-linux-g++ not found in search path x86_64-unknown-linux-clang++ not found in search path x86_64-unknown-linux-c++ not found in search path checking whether C++ supports --target... Entering: checking whether C++ supports --target Execute: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Command failed: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Exited with code 1
found whether C++ supports --target: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} Execute: /usr/bin/g++ -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp found for C++ compiler: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} checking for C preprocessor...

I agree. The alarming trace is due to the verbosity being too high. I’ve opened #23794 to track lowering the verbosity. Then we should get a simpler trace, like the configure one. Rodrigo
On 7 Aug 2023, at 11:11, Simon Peyton Jones
wrote: But the other tests look like
checking for gnutar... no checking for gtar... no checking for tar... /usr/bin/tar checking for gpatch... no checking for patch... /usr/bin/patch checking for autoreconf... /usr/bin/autoreconf
Can't you say
checking for -Qunused-arguments... no
You can explain this to me, now, and that helps me, today. But I'm trying to save you from having to explain it to many future GHC devs, and/or save them time in hunting for answers to the same question.
No rush
Simon
On Mon, 7 Aug 2023 at 11:07, Rodrigo Mesquita
mailto:rodrigo.m.mesquita@gmail.com> wrote: The trace is akin to the configure trace — it shows invocations of the toolchain in trying to determine properties of said toolchain e.g. which flags are supported.
For example
checking for -Qunused-arguments support... Entering: checking for -Qunused-arguments support Execute: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1 found for -Qunused-arguments support: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}}
Is the trace of invoking the C compiler with -Qunused-arguments, checking whether the C compiler supports such an option. That command exited with code 1 likely because the compiler doesn’t indeed support -Qunused-arguments. That’s fine, it means we won’t pass -Qunused-arguments to your C compiler.
Rodrigo
On 7 Aug 2023, at 10:50, Simon Peyton Jones
mailto:simon.peytonjones@gmail.com> wrote: Rodrigo
I'm getting lots of errors from ./configure, see below.
Seems to be something to do with your toolchain stuff? I'm lost. Should I worry? If not, could they be made to look less alarming somehow?
Simon
Entering: checking for C compiler checking for -Qunused-arguments support... Entering: checking for -Qunused-arguments support Execute: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Qunused-arguments -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1
found for -Qunused-arguments support: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc supports --target... Entering: checking whether Cc supports --target Execute: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Command failed: /usr/bin/gcc -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c Exited with code 1
found whether Cc supports --target: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking whether Cc works... Entering: checking whether Cc works Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found whether Cc works: () checking for C99 support... Entering: checking for C99 support Execute: /usr/bin/gcc -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.c found for C99 support: () checking whether cc supports extra via-c flags... Entering: checking whether cc supports extra via-c flags Execute: /usr/bin/gcc -c -fwrapv -fno-builtin -Werror -x c -o /tmp/tmp0/test.o /tmp/tmp0/test.c found whether cc supports extra via-c flags: () found for C compiler: Cc {ccProgram = Program {prgPath = "/usr/bin/gcc", prgFlags = []}} checking for C++ compiler... Entering: checking for C++ compiler x86_64-unknown-linux-g++ not found in search path x86_64-unknown-linux-clang++ not found in search path x86_64-unknown-linux-c++ not found in search path checking whether C++ supports --target... Entering: checking whether C++ supports --target Execute: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Command failed: /usr/bin/g++ -Werror --target=x86_64-unknown-linux -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp Exited with code 1
found whether C++ supports --target: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} Execute: /usr/bin/g++ -c -o /tmp/tmp0/test.o /tmp/tmp0/test.o.cpp found for C++ compiler: Cxx {cxxProgram = Program {prgPath = "/usr/bin/g++", prgFlags = []}} checking for C preprocessor...
participants (2)
-
Rodrigo Mesquita
-
Simon Peyton Jones