On OS X Mojave (10.14.4):
```
$ uname -a
Darwin my-mac.domain.local 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64
```
I followed the build instructions for the latest release:
# Remove stale links.
rm -f $INSTALL_PACKAGE_NAME
popd
```
This is the tar(1) that macOS packages:
```
$ which tar
/usr/bin/tar
$ tar --version
bsdtar 2.8.3 - libarchive 2.8.3
```
whise manpage says nothing about `--owner` but offers instead
```
An input file in mtree(5) format can be used to create an output archive with arbitrary ownership, permissions, or names that differ from existing data on disk:
The official install instructions should explain that you need GNU tar installed, or (preferably) the build script should be patched to handle BSD tar.
On OS X Mojave (10.14.4): 4903.251. 3~3/RELEASE_ X86_64 x86_64
```
$ uname -a
Darwin my-mac.domain.local 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-
```
I followed the build instructions for the latest release:
``` /developer. arm.com/ -/media/ Files/downloads /gnu-rm/ 8-2018q4/ gcc-arm- none-eabi- 8-2018- q4-major- src.tar. bz2 none-eabi- 8-2018- q4-major- src.tar. bz2 none-eabi- 8-2018- q4-major sources. sh # Note: this step is patched with the fix in #1829552 toolchain. sh --skip-steps=manual
$ wget https:/
$ tar xf gcc-arm-
$ cd gcc-arm-
./install-
# instead of "build prerequisites", I did
brew install gmp mpfr libmpc isl libelf
./build-
```
The build ran (for a few hours), but I hit this error, I think at packaging time:
``` apple-darwin10/ package_ tbz2/ apple-darwin10/ package_ tbz2/ kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/release. txt /Users/ kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/install- native/ share/doc/ gcc-arm- none-eabi/ kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/readme. txt /Users/ kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/install- native/ share/doc/ gcc-arm- none-eabi/ kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/license. txt /Users/ kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/install- native/ share/doc/ gcc-arm- none-eabi/ kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/src/ samples /Users/ kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/install- native/ share/gcc- arm-none- eabi/samples kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/install- native/ share/gcc- arm-none- eabi/samples kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/src/ samples kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/install- native/ share/gcc- arm-none- eabi/samples kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/pkg/ gcc-arm- none-eabi- 8-2019- q2-update- mac.tar. bz2 kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/build- native/ gcc-arm- none-eabi- 8-2019- q2-update kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/build- native gcc-arm- none-eabi- 8-2018- q4-major/ build-native ~/src/brew/ gcc-arm- none-eabi- 8-2018- q4-major/ src kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/install- native gcc-arm- none-eabi- 8-2019- q2-update kousu/src/ brew/gcc- arm-none- eabi-8- 2018-q4- major/pkg/ gcc-arm- none-eabi- 8-2019- q2-update- mac.tar. bz2 --owner=0 --group=0 --exclude= host-x86_ 64-apple- darwin10 --exclude= host-i686- w64-mingw32 gcc-arm- none-eabi- 8-2019- q2-update/ arm-none- eabi gcc-arm- none-eabi- 8-2019- q2-update/ bin gcc-arm- none-eabi- 8-2019- q2-update/ lib gcc-arm- none-eabi- 8-2019- q2-update/ share
+ echo Task '[III-11]' /x86_64-
Task [III-11] /x86_64-
+ cp /Users/
+ cp /Users/
+ cp /Users/
+ copy_dir_clean /Users/
+ set +u
+ mkdir -p /Users/
+ cd /Users/
+ cd /Users/
+ tar xf -
+ tar cf - --exclude=CVS --exclude=.svn --exclude=.git --exclude=.pc '--exclude=*~' '--exclude=.#*' '--exclude=*.orig' '--exclude=*.rej' .
+ set -u
+ rm -f /Users/
+ rm -f /Users/
+ pushd /Users/
~/src/brew/
+ ln -s /Users/
+ tar cjf /Users/
tar: Option --owner=0 is not supported
Usage:
List: tar -tf <archive-filename>
Extract: tar -xf <archive-filename>
Create: tar -cf <archive-filename> [filenames...]
Help: tar --help
```
This option is hardcoded at this part of `./build- toolchain. sh`, i.e. it's assuming GNU tar(1).
``` PACKAGE_ NAME
# Start making the package.
pushd $BUILDDIR_NATIVE
ln -s $INSTALLDIR_NATIVE $INSTALL_
# Make the package tarball. $PACKAGE_ NAME_NATIVE. tar.bz2 \ host-$HOST_ NATIVE \ host-$HOST_ MINGW \ PACKAGE_ NAME/arm- none-eabi \ PACKAGE_ NAME/bin \ PACKAGE_ NAME/lib \ PACKAGE_ NAME/share
${TAR} cjf $PACKAGEDIR/
--owner=0 \
--group=0 \
--exclude=
--exclude=
$INSTALL_
$INSTALL_
$INSTALL_
$INSTALL_
# Remove stale links. PACKAGE_ NAME
rm -f $INSTALL_
popd
```
This is the tar(1) that macOS packages:
```
$ which tar
/usr/bin/tar
$ tar --version
bsdtar 2.8.3 - libarchive 2.8.3
```
whise manpage says nothing about `--owner` but offers instead
```
An input file in mtree(5) format can be used to create an output archive with arbitrary ownership, permissions, or names that differ from existing data on disk:
$ cat input.mtree
usr/ bin/ls uid=0 gid=0 mode=0755 type=file content=myls
#mtree
usr/bin uid=0 gid=0 mode=0755 type=dir
$ tar -cvf output.tar @input.mtree
```
How are the official macOS builds done? Do those machines have GNU tar installed? I found GNU tar in brew:
```
$ brew install gnu-tar
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from 5a63de022 to e098c37dc.
Updated 1 tap (homebrew/cask).
==> Downloading https:/ /homebrew. bintray. com/bottles/ gnu-tar- 1.32.mojave. bottle. tar.gz /akamai. bintray. com/62/ 62ef2c92bf090b1 ada1b8434034be2 1ac4534e9ab8138 8516191b7cecd6c 095a?__ gda__=exp= 1558108291~ hmac=2973c821ff 783c60ae70d80b3 7c6898af84ad970 0046772b850af53 ab1a8 ####### ####### ####### ####### ####### ####### ####### ####### ####### ## 100.0% 1.32.mojave. bottle. tar.gz
==> Downloading from https:/
#######
==> Pouring gnu-tar-
==> Caveats
GNU "tar" has been installed as "gtar".
If you need to use it as "tar", you can add a "gnubin" directory
to your PATH from your bashrc like:
PATH= "/usr/local/ opt/gnu- tar/libexec/ gnubin: $PATH" Cellar/ gnu-tar/ 1.32: 15 files, 1.7MB
==> Summary
🍺 /usr/local/
```
Rerunning as
``` usr/local/ opt/gnu- tar/libexec/ gnubin: $PATH" ./build- toolchain. sh --skip_steps=manual
$ PATH="/
```
made it build, but that's not a good fix.
The official install instructions should explain that you need GNU tar installed, or (preferably) the build script should be patched to handle BSD tar.