| Summary: |
Windows SDK ".XZ" archives do not correctly unpack |
| Product: |
[Build System, Metadata & Runtime] Other YP Layers
|
Reporter: |
David Reyna <david.reyna> |
| Component: |
meta-mingw | Assignee: |
Joshua Watt <JPEWhacker> |
| Status: |
NEW
---
|
QA Contact: |
|
| Severity: |
normal
|
|
|
| Priority: |
Medium
|
CC: |
meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie, ross.burton, stephano
|
| Version: |
2.5 | |
|
| Target Milestone: |
5.99 | |
|
| Hardware: |
x86 | |
|
| OS: |
Multiple | |
|
| Whiteboard: |
|
|
OS type for building Yocto:
|
---
|
Type of Regression:
|
---
|
|
Verified:
|
|
Documentation change:
|
Yes (doc changes required)
|
The current packing model the Window's compatible SDKs (meta-mingw, SDKMACHINE = "i686-mingw32") is a TAR file within an XZ archive. However, using the recommend tool 7ZIP on Windows to extract this results in multiple fatal errors. If you instead repack the SDK in a ZIP, it extracts cleanly in a single step and builds applications without problems. This is an example workaround: 1) Create the Windows SDK as per normal on Linux 2) Extract the resulting "*.xz" file on your Linux host 3) Re-package it with ZIP 4) Extract that ZIP file on your Windows host with 7ZIP 5) Open a Windows shell, start the environment, and build away Specifically on Linux: $ --> Create a default project $ --> Add the meta-mingw layer $ echo "SDKMACHINE = \"i686-mingw32\"" >> conf/local.conf $ $ bitbake <image> -c populate_sdk $ $ # NEW STEPS: $ $ mkdir sdk_mingw $ cd sdk_mingw/ $ cp ../tmp/deploy/sdk/*.xz . $ unxz -d *.xz $ tar -xf *.tar $ rm *.tar $ cd .. $ zip -r sdk_mingw.zip sdk_mingw Notes: 1) The problem appears to be that 7ZIP treats "*.xz" file's tarball differently than "*.zip" files, specifically in the area of translating symlinks. I am using 7ZIP version 16.00, 64-bit, 2016-05-10 on Windows 7. 2) When you extract the XZ file you get a TAR. When you extract the TAR that you get more that 100 errors of the form "Can not create symbolic link: Access is denied”. If you attempt to build applications against this SDK you will either get (a) silent errors from empty binaries, or (b) errors of the form "x86_64-poky-linux-gcc: error: CreateProcess: No such file or directory". 3) If you run 7ZIP in Administrator mode then you do _not_ get the syslink access errors, but apparently neither can you build C applications ("...gcc/i686-poky-linux/7.2.0/real-ld.exe: cannot find -lgcc"). 4) With the ZIP file approach I do get an errors of the form 'replacing "corei7-64-poky-linux\usr\include\linux\netfilter\xt_mark.h" with "...\xt_MARK.h"' so the upper/lower case problem still arises just as it did with the XZ file, but I got ZERO errors about "symbolic links" (I selected "auto-rename" to continue). Fortunately outside of packages like "ACE" there are not a lot of problems because of this for most applications.