public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/100293] New: MinGW-w64 of nvptx offload engine fails
@ 2021-04-27 17:52 brechtsanders at users dot sourceforge.net
  2021-04-27 18:45 ` [Bug c/100293] " brechtsanders at users dot sourceforge.net
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-04-27 17:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293

            Bug ID: 100293
           Summary: MinGW-w64 of nvptx offload engine fails
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: brechtsanders at users dot sourceforge.net
  Target Milestone: ---

Created attachment 50691
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50691&action=edit
libatomic/config.log

When doing a Windows native build of the GCC 11.1.0 nvptx offload engine on
Windows using MinGW-w64 and binutils 2.36.1 with:
--target=nvptx-none --enable-as-accelerator-for=x86_64-w64-mingw32
or:
--target=nvptx-none --enable-as-accelerator-for=i686-w64-mingw32
the following error is shown:

configure: error: in
`/R/winlibs64_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/nvptx-none/libatomic':
configure: error: C compiler cannot create executables
See `config.log' for more details

Note that binutils is version 2.36.1 but had patches applied as advises in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98860 as these were needed to
build the earlier GCC 11 snapshots.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/100293] MinGW-w64 of nvptx offload engine fails
  2021-04-27 17:52 [Bug c/100293] New: MinGW-w64 of nvptx offload engine fails brechtsanders at users dot sourceforge.net
@ 2021-04-27 18:45 ` brechtsanders at users dot sourceforge.net
  2021-04-27 19:02 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-04-27 18:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293

--- Comment #1 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Also tried with unpatched binutils 2.36.1, same outcome.

Building GCC targetting nvptx (--target=nvptx-none) also stops with the same
error. libatomic/config.log reports:

configure:3756: checking whether the C compiler works
configure:3778:
/R/winlibs64_stage/nvptx-gcc-11.1.0/gcc-11.1.0/build_nvptx_gcc/./gcc/xgcc
-B/R/winlibs64_stage/nvptx-gcc-11.1.0/gcc-11.1.0/build_nvptx_gcc/./gcc/
-nostdinc
-B/R/winlibs64_stage/nvptx-gcc-11.1.0/gcc-11.1.0/build_nvptx_gcc/nvptx-none/newlib/
-isystem
/R/winlibs64_stage/nvptx-gcc-11.1.0/gcc-11.1.0/build_nvptx_gcc/nvptx-none/newlib/targ-include
-isystem /R/winlibs64_stage/nvptx-gcc-11.1.0/gcc-11.1.0/newlib/libc/include
-B/R/winlibs64_stage/inst_nvptx-gcc-11.1.0/share/nvptx-gcc/nvptx-none/bin/
-B/R/winlibs64_stage/inst_nvptx-gcc-11.1.0/share/nvptx-gcc/nvptx-none/lib/
-isystem
/R/winlibs64_stage/inst_nvptx-gcc-11.1.0/share/nvptx-gcc/nvptx-none/include
-isystem
/R/winlibs64_stage/inst_nvptx-gcc-11.1.0/share/nvptx-gcc/nvptx-none/sys-include
   -g -O2   conftest.c  >&5
error reading R:\winlibs64_stage\_TMP_\ccKq7IbV.o
collect2.exe: error: ld returned 1 exit status

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/100293] MinGW-w64 of nvptx offload engine fails
  2021-04-27 17:52 [Bug c/100293] New: MinGW-w64 of nvptx offload engine fails brechtsanders at users dot sourceforge.net
  2021-04-27 18:45 ` [Bug c/100293] " brechtsanders at users dot sourceforge.net
@ 2021-04-27 19:02 ` jakub at gcc dot gnu.org
  2021-04-27 19:54 ` brechtsanders at users dot sourceforge.net
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-27 19:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Did you follow https://gcc.gnu.org/wiki/Offloading
in particular have you installed nvptx-tools, linked in the right nvptx newlib,
added --disable-sjlj-exceptions --enable-newlib-io-long-long
?
PTX doesn't use binutils, but uses nvptx-tools instead.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/100293] MinGW-w64 of nvptx offload engine fails
  2021-04-27 17:52 [Bug c/100293] New: MinGW-w64 of nvptx offload engine fails brechtsanders at users dot sourceforge.net
  2021-04-27 18:45 ` [Bug c/100293] " brechtsanders at users dot sourceforge.net
  2021-04-27 19:02 ` jakub at gcc dot gnu.org
@ 2021-04-27 19:54 ` brechtsanders at users dot sourceforge.net
  2021-04-28  8:53 ` [Bug target/100293] " vries at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-04-27 19:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293

--- Comment #3 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
My bad, yes I was using nvptx-tools (master from
https://github.com/MentorEmbedded/nvptx-tools).

my configure command for nvptx offload engine looks like this
./configure --prefix=/R/winlibs64_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc
--build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=nvptx-none
--enable-as-accelerator-for=x86_64-w64-mingw32
--with-build-time-tools=/d/Prog/winlibs64_stage/custombuilt/share/nvptx-tools/nvptx-none/bin
--with-gnu-as --with-gnu-ld --disable-serial-configure
--enable-checking=release --without-libbacktrace --without-included-gettext
--without-cuda-driver --enable-multiarch --enable-newlib-io-long-long
--enable-linker-build-id --enable-multilib --disable-sjlj-exceptions
--disable-libunwind-exceptions --disable-libgomp
--enable-languages=c,c++,lto,objc,obj-c++,d

So yes, --disable-sjlj-exceptions --enable-newlib-io-long-long is there.

Note that the same build scripts worked fine with GCC 10.3.0 and older.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/100293] MinGW-w64 of nvptx offload engine fails
  2021-04-27 17:52 [Bug c/100293] New: MinGW-w64 of nvptx offload engine fails brechtsanders at users dot sourceforge.net
                   ` (2 preceding siblings ...)
  2021-04-27 19:54 ` brechtsanders at users dot sourceforge.net
@ 2021-04-28  8:53 ` vries at gcc dot gnu.org
  2021-04-28  8:59 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: vries at gcc dot gnu.org @ 2021-04-28  8:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vries at gcc dot gnu.org

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
If I do:
...
$ cat conftest.c
int
main ()
{
  return 0;
}
...
and copy the corresponding command from libatomic/config.log, and add -v
-Wl,-v, I get:
...
 /home/vries/oacc/trunk/build-gcc-offload-nvptx-none/./gcc/collect2
-L/home/vries/oacc/trunk/build-gcc-offload-nvptx-none/./gcc
-L/home/vries/oacc/trunk/build-gcc-offload-nvptx-none/nvptx-none/newlib
-L/home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/lib
-L/home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/usr/lib
/tmp/ccQ2YOg0.o -v -lgcc -lg -lc -lgcc
collect2 version 12.0.0 20210420 (experimental)
/home/vries/oacc/trunk/build-gcc-offload-nvptx-none/./gcc/collect-ld
-L/home/vries/oacc/trunk/build-gcc-offload-nvptx-none/./gcc
-L/home/vries/oacc/trunk/build-gcc-offload-nvptx-none/nvptx-none/newlib
-L/home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/lib
-L/home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/usr/lib
/tmp/ccQ2YOg0.o -v -lgcc -lg -lc -lgcc
Linking /tmp/ccQ2YOg0.o as 0
trying lib libc.a
trying lib libg.a
trying lib libgcc.a
...

Looking into collect-ld, it has:
...
ORIGINAL_LD_FOR_TARGET="/home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/bin/ld"
...
which is a link to nvptx-none-ld:
...
$ /home/vries/oacc/trunk/install/offload-nvptx-none/nvptx-none/bin/ld --help
Usage: nvptx-none-ld [option...] [files]
Options:
  -o FILE               Write output to FILE
  -v                    Be verbose
  -l LIBRARY            Link with LIBRARY
  -L DIR                Search for libraries in DIR
  --help                Print this help and exit
  --version             Print version number and exit

Report bugs to <https://github.com/MentorEmbedded/nvptx-tools/issues>.
...

Can you do the same: create conftest.c, copy command from config.log, add
-Wl,-v -v. Then do you see collect-ld being called? If so, does collect-ld have
the correct linker hardcoded in there?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/100293] MinGW-w64 of nvptx offload engine fails
  2021-04-27 17:52 [Bug c/100293] New: MinGW-w64 of nvptx offload engine fails brechtsanders at users dot sourceforge.net
                   ` (3 preceding siblings ...)
  2021-04-28  8:53 ` [Bug target/100293] " vries at gcc dot gnu.org
@ 2021-04-28  8:59 ` jakub at gcc dot gnu.org
  2021-04-28 10:03 ` brechtsanders at users dot sourceforge.net
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-28  8:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The log file contains:
error reading R:\winlibs64_stage\_TMP_\ccYEwkZW.o
collect2.exe: error: ld returned 1 exit status
which I bet is the problem, but it is unclear if the _TMP_ subdir exists...

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/100293] MinGW-w64 of nvptx offload engine fails
  2021-04-27 17:52 [Bug c/100293] New: MinGW-w64 of nvptx offload engine fails brechtsanders at users dot sourceforge.net
                   ` (4 preceding siblings ...)
  2021-04-28  8:59 ` jakub at gcc dot gnu.org
@ 2021-04-28 10:03 ` brechtsanders at users dot sourceforge.net
  2021-04-28 10:19 ` brechtsanders at users dot sourceforge.net
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-04-28 10:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293

--- Comment #6 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Yes, that folder exists and that's where my TMP and TEMP environment variables
point to.

I also tried to point them to a folder on the C: drive, as R: is a RAM drive
and I wanted to exclude that that was the issue, but the result was the same:
build fails in the same place when configuring libatomic.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/100293] MinGW-w64 of nvptx offload engine fails
  2021-04-27 17:52 [Bug c/100293] New: MinGW-w64 of nvptx offload engine fails brechtsanders at users dot sourceforge.net
                   ` (5 preceding siblings ...)
  2021-04-28 10:03 ` brechtsanders at users dot sourceforge.net
@ 2021-04-28 10:19 ` brechtsanders at users dot sourceforge.net
  2021-04-28 10:27 ` brechtsanders at users dot sourceforge.net
  2021-08-15 19:20 ` brechtsanders at users dot sourceforge.net
  8 siblings, 0 replies; 10+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-04-28 10:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293

--- Comment #7 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
I ran the following commands based on what was in config.log

cat > conftest.c << EOF
/* confdefs.h */
#define PACKAGE_NAME "GNU Atomic Library"
#define PACKAGE_TARNAME "libatomic"
#define PACKAGE_VERSION "1.0"
#define PACKAGE_STRING "GNU Atomic Library 1.0"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL "http://www.gnu.org/software/libatomic/"
#define PACKAGE "libatomic"
#define VERSION "1.0"
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
EOF
/R/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/./gcc/xgcc
-B/R/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/./gcc/
-B/R/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/bin/
-B/R/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/lib/
-isystem
/R/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include
-isystem
/R/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include
   -g -O2   conftest.c -v

and the result was:

Reading specs from
R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/specs
COLLECT_GCC=R:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\xgcc.exe
COLLECT_LTO_WRAPPER=R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/lto-wrapper.exe
Target: nvptx-none
Configured with: ../configure
--prefix=/R/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc
--build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=nvptx-none
--enable-as-accelerator-for=i686-w64-mingw32 --with-pkgversion='built by
Brecht Sanders'
--with-build-time-tools=/d/Prog/winlibs32_stage/custombuilt/share/nvptx-tools/nvptx-none/bin
--with-gnu-as --with-gnu-ld --disable-serial-configure
--enable-checking=release --without-libbacktrace --without-included-gettext
--without-cuda-driver --enable-multiarch --enable-newlib-io-long-long
--enable-linker-build-id --enable-multilib --disable-sjlj-exceptions
--disable-libunwind-exceptions --disable-libgomp
--enable-languages=c,c++,lto,objc,obj-c++,d
Thread model: single
Supported LTO compression algorithms: zlib zstd
gcc version 11.1.0 (built by Brecht Sanders)
COLLECT_GCC_OPTIONS='-B'
'R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/'
'-B'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/bin/'
'-B'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/lib/'
'-isystem'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include'
'-isystem'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include'
'-g' '-O2' '-v' '-dumpdir' 'a-'

R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/cc1.exe
-quiet -v -iprefix
r:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\../lib/gcc/i686-w64-mingw32/11.1.0D:/Prog/msys64/accel/nvptx-none/
-isystem
R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/include
-isystem
R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/include-fixed
-isystem
R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include
-isystem
R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include
conftest.c -quiet -dumpdir a- -dumpbase conftest.c -dumpbase-ext .c -g -O2
-version -o R:\winlibs32_stage\_TMP_\ccu9TSoP.s
GNU C17 (built by Brecht Sanders) version 11.1.0 (nvptx-none)
        compiled by GNU C version 11.1.0, GMP version 6.2.1, MPFR version
4.1.0, MPC version 1.2.1, isl version isl-0.23-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include"
ignoring nonexistent directory
"R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include"
ignoring nonexistent directory
"r:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\../lib/gcc/i686-w64-mingw32/11.1.0D:/Prog/msys64/accel/nvptx-none/include"
ignoring nonexistent directory
"r:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\../lib/gcc/i686-w64-mingw32/11.1.0D:/Prog/msys64/accel/nvptx-none/include-fixed"
ignoring nonexistent directory
"r:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\../lib/gcc/i686-w64-mingw32/11.1.0D:/Prog/msys64/accel/nvptx-none/../../../../../../nvptx-none/sys-include"
ignoring nonexistent directory
"r:\winlibs32_stage\gcc-offload-nvptx-11.1.0\gcc-11.1.0\build_win_offload-nvptx\gcc\../lib/gcc/i686-w64-mingw32/11.1.0D:/Prog/msys64/accel/nvptx-none/../../../../../../nvptx-none/include"
ignoring nonexistent directory
"r:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/lib/gcc/i686-w64-mingw32/11.1.0/accel/nvptx-none/include"
ignoring nonexistent directory
"r:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/lib/gcc/i686-w64-mingw32/11.1.0/accel/nvptx-none/include-fixed"
ignoring nonexistent directory
"r:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/nvptx-none/sys-include"
ignoring nonexistent directory
"r:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/nvptx-none/include"
#include "..." search starts here:
#include <...> search starts here:

R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/include

R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/include-fixed
 D:\Prog\winlibs32_stage\custombuilt\include
 D:\Prog\winlibs32_stage\mingw32\include
End of search list.
GNU C17 (built by Brecht Sanders) version 11.1.0 (nvptx-none)
        compiled by GNU C version 11.1.0, GMP version 6.2.1, MPFR version
4.1.0, MPC version 1.2.1, isl version isl-0.23-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 8ee8c6ba1ff9d5a1ffe98751099bf036
COLLECT_GCC_OPTIONS='-B'
'R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/'
'-B'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/bin/'
'-B'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/lib/'
'-isystem'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include'
'-isystem'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include'
'-g' '-O2' '-v' '-dumpdir' 'a-'

R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/as
-v -m sm_35 -o R:\winlibs32_stage\_TMP_\ccYJWYIt.o
R:\winlibs32_stage\_TMP_\ccu9TSoP.s
COMPILER_PATH=R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/
LIBRARY_PATH=R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/
COLLECT_GCC_OPTIONS='-B'
'R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/'
'-B'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/bin/'
'-B'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/lib/'
'-isystem'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/include'
'-isystem'
'R:/winlibs32_stage/inst_gcc-offload-nvptx-11.1.0/share/gcc/nvptx-none/sys-include'
'-g' '-O2' '-v' '-dumpdir' 'a.'

R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/collect2.exe
-LR:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc
R:\winlibs32_stage\_TMP_\ccYJWYIt.o -lgcc -lg -lc -lgcc
error reading R:\winlibs32_stage\_TMP_\ccYJWYIt.o
collect2.exe: error: ld returned 1 exit status

So the missing file should have been geenrated by gcc/as

I was expecting to find gcc/as.exe in my build folder, but instead gcc/as is a
shell script. I very much doubt this can be executed as-is on Windows, even in
MSYS2 shell, as the code executing it would need to know about the shebang
header and that that needs to be executed by running sh.exe

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/100293] MinGW-w64 of nvptx offload engine fails
  2021-04-27 17:52 [Bug c/100293] New: MinGW-w64 of nvptx offload engine fails brechtsanders at users dot sourceforge.net
                   ` (6 preceding siblings ...)
  2021-04-28 10:19 ` brechtsanders at users dot sourceforge.net
@ 2021-04-28 10:27 ` brechtsanders at users dot sourceforge.net
  2021-08-15 19:20 ` brechtsanders at users dot sourceforge.net
  8 siblings, 0 replies; 10+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-04-28 10:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293

--- Comment #8 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Additional test:
Running this manually (in MSYS2 shell) also fails:
R:/winlibs32_stage/gcc-offload-nvptx-11.1.0/gcc-11.1.0/build_win_offload-nvptx/gcc/as
-v -m sm_35 -o 'R:\winlibs32_stage\_TMP_\ccYJWYIt.o'
'R:\winlibs32_stage\_TMP_\ccu9TSoP.s'
nvptx-as: cannot open input ptx file

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/100293] MinGW-w64 of nvptx offload engine fails
  2021-04-27 17:52 [Bug c/100293] New: MinGW-w64 of nvptx offload engine fails brechtsanders at users dot sourceforge.net
                   ` (7 preceding siblings ...)
  2021-04-28 10:27 ` brechtsanders at users dot sourceforge.net
@ 2021-08-15 19:20 ` brechtsanders at users dot sourceforge.net
  8 siblings, 0 replies; 10+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-08-15 19:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100293

--- Comment #9 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Any update on this?
Issue still exists today (in GCC 11.2.0 and in latest snapshot
11.2.1-20210814).

Both when building gcc on Windows for nvptx as well as the offload engine for
nvptx there is an error like this in nvptx-none/libatomic/config.log:

configure:3736: $? = 1
configure:3756: checking whether the C compiler works
configure:3778:
/R/winlibs64_stage/nvptx-gcc-11-20210814/gcc-11-20210814/build_nvptx_gcc/./gcc/xgcc
-B/R/winlibs64_stage/nvptx-gcc-11-20210814/gcc-11-20210814/build_nvptx_gcc/./gcc/
-nostdinc
-B/R/winlibs64_stage/nvptx-gcc-11-20210814/gcc-11-20210814/build_nvptx_gcc/nvptx-none/newlib/
-isystem
/R/winlibs64_stage/nvptx-gcc-11-20210814/gcc-11-20210814/build_nvptx_gcc/nvptx-none/newlib/targ-include
-isystem
/R/winlibs64_stage/nvptx-gcc-11-20210814/gcc-11-20210814/newlib/libc/include
-B/R/winlibs64_stage/inst_nvptx-gcc-11-20210814/share/nvptx-gcc/nvptx-none/bin/
-B/R/winlibs64_stage/inst_nvptx-gcc-11-20210814/share/nvptx-gcc/nvptx-none/lib/
-isystem
/R/winlibs64_stage/inst_nvptx-gcc-11-20210814/share/nvptx-gcc/nvptx-none/include
-isystem
/R/winlibs64_stage/inst_nvptx-gcc-11-20210814/share/nvptx-gcc/nvptx-none/sys-include
   -g -O2   conftest.c  >&5
error reading C:\Temp\ccqpNwjZ.o
collect2.exe: error: ld returned 1 exit status

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-08-15 19:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 17:52 [Bug c/100293] New: MinGW-w64 of nvptx offload engine fails brechtsanders at users dot sourceforge.net
2021-04-27 18:45 ` [Bug c/100293] " brechtsanders at users dot sourceforge.net
2021-04-27 19:02 ` jakub at gcc dot gnu.org
2021-04-27 19:54 ` brechtsanders at users dot sourceforge.net
2021-04-28  8:53 ` [Bug target/100293] " vries at gcc dot gnu.org
2021-04-28  8:59 ` jakub at gcc dot gnu.org
2021-04-28 10:03 ` brechtsanders at users dot sourceforge.net
2021-04-28 10:19 ` brechtsanders at users dot sourceforge.net
2021-04-28 10:27 ` brechtsanders at users dot sourceforge.net
2021-08-15 19:20 ` brechtsanders at users dot sourceforge.net

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).