On Wed, Sep 17, 2014 at 04:21:42PM +0200, Jakub Jelinek wrote: > >From -v dump, that sounds like a bug in mkoffload, which has been found > properly relatively to the gcc driver or whatever. > > /usr/src/gcc-git/objinst/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.0.0//accel/x86_64-intelmic-linux-gnu/mkoffload > @/tmp/ccS6Q83l > collect2: error trying to exec > '/usr/local/bin/x86_64-intelmic-linux-gnu-g++': execvp: No such file or > directory > lto-wrapper: fatal error: > /usr/src/gcc-git/objinst/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.0.0//accel/x86_64-intelmic-linux-gnu/mkoffload > terminated with signal 11 [Segmentation fault], core dumped > compilation terminated. > /usr/bin/ld: lto-wrapper failed > collect2: error: ld returned 1 exit status >
In the same setup, I've added (as root) #!/bin/sh exec /usr/src/gcc-git/objinst/usr/local/bin/x86_64-intelmic-linux-gnu-g++ "$@" script to /usr/local/bin/x86_64-intelmic-linux-gnu-g++ . But things don't work in that case either, the error is now: /usr/src/gcc-git/objinst/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.0.0//accel/x86_64-intelmic-linux-gnu/mkoffload @/tmp/cc0nIjXd x86_64-intelmic-linux-gnu-g++: error trying to exec 'cc1plus': execvp: No such file or directory lto-wrapper: fatal error: /usr/src/gcc-git/objinst/usr/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/5.0.0//accel/x86_64-intelmic-linux-gnu/mkoffload terminated with signal 11 [Segmentation fault], core dumped compilation terminated. /usr/bin/ld: lto-wrapper failed collect2: error: ld returned 1 exit status which presumably means that some undesirable vars from host environment were kept by mkoffload in the environment for the offloading compiler and that has the undesirable effect of affecting how the offloading compiler driver works. Because, if I invoke /usr/local/bin/x86_64-intelmic-linux-gnu-g++ manually, it can find cc1plus just fine. Jakub