[yocto] Are Windows SDKs (mingw layer) supposed to work?
Reyna, David
david.reyna at windriver.com
Mon Mar 5 21:32:47 PST 2018
Hi all,
I am trying to enable a customer for using YP SDKs on Windows. It apparently is supposed to work, but I am unable to get past fatal errors.
I have looked for documentation at the YP site and the meta-mingw repo, but to no avail.
1) My project is a simple default "qemux86-64" with YP-2.5 HEAD, with the latest "meta-mingw" layer added and <SDKMACHINE ?= "i686-mingw32">.
The SDK builds fine and I get the "*.xz" generated file.
2) However, when I use 7ZIP to extract it on my Windows host (which is recommended for XY files), I get several fatal issues.
(a) I get more than a hundred errors "Can not create symbolic link: Access is denied".
While I do not care about the ones for the bin tools in the sysroot, I do care that most of the cross toolchain EXE files are thusly broken, plus many of the libraries and header files in the sysroot.
Am I missing a step?
If I in fact extract this file on my Linux host, I can directly see that it is full of symlinks! Why are there symlinks in a Windows-specific tarball?
(b) If I attempt to build a simple C file from the shell in the SDK environment, I either get a silent failure (for the 32-bit toolchain) or a blatant error as per:
x86_64-poky-linux-gcc: error: CreateProcess: No such file or directory
I am assuming this error arises from the broken symlinks, specifically all those broken files in:
SDKDIR\sysroots\i686-pokysdk-mingw32\usr\bin\x86_64-poky-linux-gnux32 (all zero length):
03/04/2018 08:29 PM 0 x86_64-poky-linux-gnux32-addr2line.exe
03/04/2018 08:29 PM 0 x86_64-poky-linux-gnux32-ar.exe
03/04/2018 08:29 PM 0 x86_64-poky-linux-gnux32-as.exe
03/04/2018 08:29 PM 0 x86_64-poky-linux-gnux32-c++.exe
03/04/2018 08:29 PM 0 x86_64-poky-linux-gnux32-c++filt.exe
03/04/2018 08:29 PM 0 x86_64-poky-linux-gnux32-cpp.exe
03/04/2018 08:29 PM 0 x86_64-poky-linux-gnux32-elfedit.exe
03/04/2018 08:29 PM 0 x86_64-poky-linux-gnux32-g++.exe
03/04/2018 08:29 PM 0 x86_64-poky-linux-gnux32-gcc-ar.exe
...
SDKDIR\sysroots\i686-pokysdk-mingw32\usr\libexec\x86_64-poky-linux\gcc\x86_64-poky-linux\7.3.0\*
03/04/2018 08:29 PM 0 ar.exe
03/04/2018 08:29 PM 0 as.exe
02/23/2018 03:48 PM 21,962,568 cc1.exe
02/23/2018 03:48 PM 23,256,499 cc1plus.exe
02/23/2018 03:48 PM 812,905 collect2.exe
03/04/2018 08:29 PM 0 cpp.exe
03/04/2018 08:29 PM 0 gcc.exe
03/04/2018 08:29 PM 0 ld.exe
02/23/2018 03:48 PM 1,101,508 lto-wrapper.exe
03/04/2018 08:29 PM 0 nm.exe
03/04/2018 08:29 PM 0 objcopy.exe
03/04/2018 08:29 PM 0 objdump.exe
03/04/2018 08:29 PM 0 ranlib.exe
03/04/2018 08:29 PM 0 real-ld.exe
03/04/2018 08:29 PM 0 strip.exe
3) I have done '-v' and ProcessMonitor tracing, and it all seems to come down to these broken links.
4) I see that Yang Wang had the same question (below), and I have not seen an answer.
Please help,
David Reyna
From: yocto-bounces at yoctoproject.org [mailto:yocto-bounces at yoctoproject.org] On Behalf Of Wang, Yang Y
Sent: Thursday, August 17, 2017 11:41 PM
To: Yocto
Subject: [yocto] toolchain from meta-mingw gets error x86_64-poky-linux-gcc: error: CreateProcess: No such file or directory
I'm using Yocto krogoth and meta-mingw to build the meta-toolchain for windows system. The build is quite smooth.
I extract the built toolchain poky-glibc-x86_64-meta-toolchain-core2-64-toolchain-2.1.tar.xz on windows to c:/yocto2.1
However when I try to run a simple build from windows cmd console after I set up the environment-setup-core2-64-poky-linux.bat, I got the following error.
By further check, it seems the error is related to the symbolic link in folder sysroots/x86_64-pokysdk-mingw32/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/5.3.0/ where the as, ar etc binutiles are the symbolic link to the file in -> ../../../../../bin/x86_64-poky-linux/
However on windows, such "../../" symbolic link can't work. Simply execute the symbolic 'as.exe' will get error "Access is denied."
Anyone has the idea on how to solve this issue?
c:\Yocto2.1>%CC% c:/temp/temp/temp/test.c
x86_64-poky-linux-gcc: error: CreateProcess: No such file or directory
c:\Yocto2.1>%CC% c:/temp/temp/temp/test.c --verbose
Using built-in specs.
COLLECT_GCC=x86_64-poky-linux-gcc
COLLECT_LTO_WRAPPER=c:/yocto2.1/sysroots/x86_64-pokysdk-mingw32/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/5.3.0/lto-wrapper.exe
Target: x86_64-poky-linux
....
GNU C11 (GCC) version 5.3.0 (x86_64-poky-linux)
compiled by GNU C version 5.3.0, GMP version 6.1.0, MPFR version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 4b6c2d45c1da5393637e027504b4f2dd
COLLECT_GCC_OPTIONS='--sysroot=c:\Yocto2.1\\sysroots\core2-64-poky-linux' '-m64' '-march=core2' '-mtune=core2' '-msse3' '-mfpmath=sse' '-v'
c:/yocto2.1/sysroots/x86_64-pokysdk-mingw32/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/5.3.0/as.exe -v --64 -o C:\Users\ywang30\AppData\Local\Temp\ccREtk4o.o C:\Users\ywang30\AppData\Local\Temp\ccbqVhdf.s
x86_64-poky-linux-gcc: error: CreateProcess: No such file or directory
c:\Yocto2.1> c:/yocto2.1/sysroots/x86_64-pokysdk-mingw32/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/5.3.0/as.exe
Access is denied.
c:\Yocto2.1>ls c:/yocto2.1/sysroots/x86_64-pokysdk-mingw32/usr/bin/x86_64-poky-linux/../../libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/5.3.0/ -l
total 67783
lrwxrwxrwx 1 ywang30 Domain Users 61 Aug 18 12:05 ar.exe -> ../../../../../bin/x86_64-poky-linux/x86_64-poky-linux-ar.exe
lrwxrwxrwx 1 ywang30 Domain Users 61 Aug 18 12:05 as.exe -> ../../../../../bin/x86_64-poky-linux/x86_64-poky-linux-as.exe
-rwxr-xr-x 1 ywang30 Domain Users 21761467 Aug 18 11:53 cc1.exe
-rwxr-xr-x 1 ywang30 Domain Users 22986939 Aug 18 11:53 cc1plus.exe
-rwxr-xr-x 1 ywang30 Domain Users 1658365 Aug 18 11:53 collect2.exe
lrwxrwxrwx 1 ywang30 Domain Users 62 Aug 18 12:05 cpp.exe -> ../../../../../bin/x86_64-poky-linux/x86_64-poky-linux-cpp.exe
lrwxrwxrwx 1 ywang30 Domain Users 62 Aug 18 12:05 gcc.exe -> ../../../../../bin/x86_64-poky-linux/x86_64-poky-linux-gcc.exe
lrwxrwxrwx 1 ywang30 Domain Users 61 Aug 18 12:05 ld.exe -> ../../../../../bin/x86_64-poky-linux/x86_64-poky-linux-ld.exe
-rwxr-xr-x 1 ywang30 Domain Users 129591 Aug 18 11:53 liblto_plugin-0.dll
-rw-r--r-- 1 ywang30 Domain Users 53040 Aug 18 11:53 liblto_plugin.dll.a
-rw-r--r-- 1 ywang30 Domain Users 1381 Aug 18 11:53 liblto_plugin.la
-rwxr-xr-x 1 ywang30 Domain Users 1881552 Aug 18 11:53 lto-wrapper.exe
-rwxr-xr-x 1 ywang30 Domain Users 20913549 Aug 18 11:53 lto1.exe
lrwxrwxrwx 1 ywang30 Domain Users 61 Aug 18 12:05 nm.exe -> ../../../../../bin/x86_64-poky-linux/x86_64-poky-linux-nm.exe
lrwxrwxrwx 1 ywang30 Domain Users 66 Aug 18 12:05 objcopy.exe -> ../../../../../bin/x86_64-poky-linux/x86_64-poky-linux-objcopy.exe
lrwxrwxrwx 1 ywang30 Domain Users 66 Aug 18 12:05 objdump.exe -> ../../../../../bin/x86_64-poky-linux/x86_64-poky-linux-objdump.exe
lrwxrwxrwx 1 ywang30 Domain Users 65 Aug 18 12:05 ranlib.exe -> ../../../../../bin/x86_64-poky-linux/x86_64-poky-linux-ranlib.exe
lrwxrwxrwx 1 ywang30 Domain Users 61 Aug 18 12:05 real-ld.exe -> ../../../../../bin/x86_64-poky-linux/x86_64-poky-linux-ld.exe
lrwxrwxrwx 1 ywang30 Domain Users 64 Aug 18 12:05 strip.exe -> ../../../../../bin/x86_64-poky-linux/x86_64-poky-linux-strip.exe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180306/cbef9875/attachment.html>
More information about the yocto
mailing list