<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12585</bug_id>
          
          <creation_ts>2018-03-06 16:03:42 +0000</creation_ts>
          <short_desc>Windows SDK &quot;.XZ&quot; archives do not correctly unpack</short_desc>
          <delta_ts>2026-01-22 16:29:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Other YP Layers</product>
          <component>meta-mingw</component>
          <version>2.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>  </status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Reyna">david.reyna</reporter>
          <assigned_to name="Joshua Watt">JPEWhacker</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>stephano</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>79730</commentid>
    <comment_count>0</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2018-03-06 16:03:42 +0000</bug_when>
    <thetext>The current packing model the Window&apos;s compatible SDKs (meta-mingw, SDKMACHINE = &quot;i686-mingw32&quot;) 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 &quot;*.xz&quot; 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:
  $ --&gt; Create a default project
  $ --&gt; Add the meta-mingw layer
  $ echo &quot;SDKMACHINE = \&quot;i686-mingw32\&quot;&quot; &gt;&gt; conf/local.conf
  $ 
  $ bitbake &lt;image&gt; -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 &quot;*.xz&quot; file&apos;s tarball differently than &quot;*.zip&quot; 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 &quot;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 &quot;x86_64-poky-linux-gcc: error: CreateProcess: No such file or directory&quot;.

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 (&quot;...gcc/i686-poky-linux/7.2.0/real-ld.exe: cannot find -lgcc&quot;).

4) With the ZIP file approach I do get an errors of the form &apos;replacing &quot;corei7-64-poky-linux\usr\include\linux\netfilter\xt_mark.h&quot; with &quot;...\xt_MARK.h&quot;&apos; so the upper/lower case problem still arises just as it did with the XZ file, but I got ZERO errors about &quot;symbolic links&quot; (I selected &quot;auto-rename&quot; to continue). Fortunately outside of packages like &quot;ACE&quot; there are not a lot of problems because of this for most applications.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79731</commentid>
    <comment_count>1</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2018-03-06 16:09:47 +0000</bug_when>
    <thetext>As a resolution, I recommend that we move to ZIP as the archive format for Windows compatible SDKs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96917</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-24 14:24:43 +0000</bug_when>
    <thetext>Bulk move from 4.99 or 0.00 to 5.99</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>