cibuildwheel icon indicating copy to clipboard operation
cibuildwheel copied to clipboard

fix: support linux builds from macOS again

Open henryiii opened this issue 1 year ago • 5 comments

One possible fix for https://github.com/pypa/cibuildwheel/issues/1962. Doesn't fix Windows, though.

henryiii avatar Aug 13 '24 01:08 henryiii

I had some issues with ustar c.f. https://github.com/pypa/cibuildwheel/pull/1434#issuecomment-1475261720 Does gnutar works in your case (only on host side, macOS) ? Maybe it's time to revisit docker cp but I'm not hopeful on Travis CI just yet...

mayeut avatar Aug 15 '24 16:08 mayeut

macOS doesn't have gnutar as an option in it's bsdtar.

tar(bsdtar): manipulate archive files
First option must be a mode specifier:
  -c Create  -r Add/Replace  -t List  -u Update  -x Extract
Common Options:
  -b #  Use # 512-byte records per I/O block
  -f <filename>  Location of archive
  -v    Verbose
  -w    Interactive
Create: tar -c [options] [<file> | <dir> | @<archive> | -C <dir> ]
  <file>, <dir>  add these items to archive
  -z, -j, -J, --lzma  Compress archive with gzip/bzip2/xz/lzma
  --format {ustar|pax|cpio|shar}  Select archive format
  --exclude <pattern>  Skip files that match pattern
  -C <dir>  Change to <dir> before processing remaining files
  @<archive>  Add entries from <archive> to output
List: tar -t [options] [<patterns>]
  <patterns>  If specified, list only entries that match
Extract: tar -x [options] [<patterns>]
  <patterns>  If specified, extract only entries that match
  -k    Keep (don't overwrite) existing files
  -m    Don't restore modification times
  -O    Write entries to stdout, don't restore to disk
  -p    Restore permissions (including ACLs, owner, file flags)
bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8

henryiii avatar Aug 17 '24 15:08 henryiii

It's not listed in --help, if you do man tar, it redirects you to man libarchive-formats which lists gnutar c.f. https://github.com/pypa/cibuildwheel/pull/1434#issuecomment-1475278406 & https://github.com/pypa/cibuildwheel/pull/1434#issuecomment-1475292175

mayeut avatar Aug 17 '24 16:08 mayeut

Copying project into container...

    + mkdir -p /project
tar: gnutar: Invalid archive format
Try `tar --help' or `tar --usage' for more information.
tar: Write error

                                                              ✕ 0.78s

henryiii avatar Aug 19 '24 15:08 henryiii

It shall only be on host side of tar create for macOS only (I pushed a commit to that effect). Would this commit solve the issue you're seeing locally ?

mayeut avatar Aug 19 '24 17:08 mayeut