[Bug libgomp/100160] MinGW-w64 g++ with libgomp and nvptx looks for libgomp-plugin-nvptx.so.1 instead of libgomp-plugin-nvptx-1.dll

vries at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 22 13:14:57 GMT 2021


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

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #1)
> ...
> $ ./install/bin/g++ test-1.cpp -fopenmp -foffload=nvptx-none 
> lto-wrapper: fatal error: could not find accel/nvptx-none/mkoffload in
> /home/vries/oacc/trunk/install/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.0/
> :/home/vries/oacc/trunk/install/bin/../libexec/gcc/ (consider using ‘-B’)
> compilation terminated.
> /usr/bin/ld: error: lto-wrapper failed
> collect2: error: ld returned 1 exit status
> ...

I can make this work by adding:
...
$ ./install/bin/g++ test-1.cpp -fopenmp -foffload=nvptx-none -flto \
  -B $(pwd
-P)/install/offload-nvptx-none/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/ \
  -B $(pwd -P)/install/offload-nvptx-none/bin/
$ LD_LIBRARY_PATH=./install/lib64 ./a.out
Threads: 8 Devices: 1
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4
0 1 2 3 4 0 1 2 3 4 0 1 2 3 
...
Hmm, this actually executes on the target, the -fno-lto case executes the host
fallback.


More information about the Gcc-bugs mailing list