Re: Help with intel mic target building

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

On Tue, 23 Feb 2016 13:22:18 +0100, Martin Liška <mliska@xxxxxxx> wrote:
> I'm got one another question:
> looks TEST-gcc fails for many of these errors:
> 
> spawn -ignore SIGHUP /home/marxin/Programming/build-offload-light/build-gcc/gcc/xgcc -B/home/marxin/Programming/build-offload-light/build-gcc/gcc/ /home/marxin/Programming/build-offload-light/source-gcc/libgomp/testsuite/libgomp.c/examples-4/array_sections-3.c -B/home/marxin/Programming/build-offload-light/build-gcc/x86_64-pc-linux-gnu/./libgomp/ -B/home/marxin/Programming/build-offload-light/build-gcc/x86_64-pc-linux-gnu/./libgomp/.libs -I/home/marxin/Programming/build-offload-light/build-gcc/x86_64-pc-linux-gnu/./libgomp -I/home/marxin/Programming/build-offload-light/source-gcc/libgomp/testsuite/../../include -I/home/marxin/Programming/build-offload-light/source-gcc/libgomp/testsuite/.. -fmessage-length=0 -fno-diagnostics-show-caret -fdiagnostics-color=never -B/home/marxin/Programming/build-offload-light/install/offload-x86_64-intelmicemul-linux-gnu/libexec/gcc/x86_64-pc-linux-gnu/6.0.0 -B/home/marxin/Programming/build-offload-light/install/offload-x86_64-intelmicemul-linux-gnu/bin
>   
> -fopenmp -O2 -L/home/marxin/Programming/build-offload-light/build-gcc/x86_64-pc-linux-gnu/./libgomp/.libs -lm -o ./array_sections-3.exe

That matches the command line that I'm seeing in libgomp.log.

> lto-wrapper: fatal error: problem with building target image for x86_64-intelmicemul-linux-gnu
> 
> 
> 
> compilation terminated.
> 
> /usr/lib64/gcc/x86_64-suse-linux/5/../../../../x86_64-suse-linux/bin/ld: lto-wrapper failed
> 
> collect2: error: ld returned 1 exit status
> 
> compiler exited with status 1
> output is:
> lto-wrapper: fatal error: problem with building target image for x86_64-intelmicemul-linux-gnu

> 
> 
> Running one manually in strace shows that mkoffload cannot be found:
> [pid 206095] stat("/home/marxin/Programming/build-offload-light/build-gcc/gcc//accel/x86_64-intelmicemul-linux-gnu/mkoffload", 0x7ffda24478d0) = -1 ENOENT (No such file or directory)
> [pid 206095] stat("/home/marxin/Programming/build-offload-light/build-gcc/x86_64-pc-linux-gnu/./libgomp//accel/x86_64-intelmicemul-linux-gnu/mkoffload", 0x7ffda24478d0) = -1 ENOENT (No such file or directory)
> [pid 206095] stat("/home/marxin/Programming/build-offload-light/build-gcc/x86_64-pc-linux-gnu/./libgomp/.libs//accel/x86_64-intelmicemul-linux-gnu/mkoffload", 0x7ffda24478d0) = -1 ENOENT (No such file or directory)
> [pid 206095] stat("/home/marxin/Programming/build-offload-light/install/offload-x86_64-intelmicemul-linux-gnu/bin//accel/x86_64-intelmicemul-linux-gnu/mkoffload", 0x7ffda24478d0) = -1 ENOENT (No such file or directory)
> [pid 206095] write(2, "lto-wrapper: fatal error: problem with building target image for x86_64-intelmicemul-linux-gnu\n\n", 96) = 96
> [pid 206095] write(2, "compilation terminated.\n", 24) = 24
> [pid 206095] exit_group(1)              = ?
> 
> Where $find install/ -name mkoffload
> install/offload-x86_64-intelmicemul-linux-gnu/lib/gcc/x86_64-pc-linux-gnu/6.0.0/accel/x86_64-intelmicemul-linux-gnu/mkoffload

    $ find install/ -name mkoffload
    install/offload-nvptx-none/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/accel/nvptx-none/mkoffload
    install/offload-x86_64-intelmicemul-linux-gnu/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/accel/x86_64-intelmicemul-linux-gnu/mkoffload

So, libexec vs. lib.

> Is it something related to my site script?

I'd assume so, yes, because it contains:

    # If user did not specify libexecdir, set the correct target:
    # Nor FHS nor openSUSE allow prefix/libexec. Let's default to prefix/lib.
    
    if test "$libexecdir" = '${exec_prefix}/libexec' ; then
            libexecdir='${exec_prefix}/lib'
    fi

However, I'll have to try to figure out why GCC then isn't able to locate
the file.  Actually, I think I can already see the problem: you got a
-B/home/marxin/Programming/build-offload-light/install/offload-x86_64-intelmicemul-linux-gnu/libexec/gcc/x86_64-pc-linux-gnu/6.0.0
search path in libgomp.log, but would need a "s%libexec%lib%" for that to
locate your mkoffload.  These -B search paths are generated in
libgomp/plugin/configfrag.ac, which, basically, assumes that your
offloading compilers are configured with "standard" paths.  Will need to
think about how to make that more flexible.  (Ilya CCed, who contributed
this code, together with Andrey Turetskiy.)


Grüße
 Thomas




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux