Package Details: osxcross-git 0.17-3

Git Clone URL: https://aur.archlinux.org/osxcross-git.git (read-only, click to copy)
Package Base: osxcross-git
Description: macOS cross-compiling toolchain for Linux, FreeBSD and NetBSD
Upstream URL: https://github.com/tpoechtrager/osxcross
Keywords: apple c c++ clang compiler crosscompiler macos sdk toolchain
Licenses: MIT
Conflicts: apple-darwin-osxcross, osxcross, xar
Provides: osxcross, xar
Submitter: emersion
Maintainer: swyter
Last Packager: swyter
Votes: 1
Popularity: 0.000000
First Submitted: 2017-02-01 10:49 (UTC)
Last Updated: 2026-07-03 08:54 (UTC)

Dependencies (9)

Required by (6)

Sources (2)

Latest Comments

1 2 Next › Last »

swyter commented on 2026-07-03 08:55 (UTC)

@malacology Sure, done.

malacology commented on 2026-07-03 03:31 (UTC)

Please also add git and cmake to makedpends to pass the extra-x86_64-build

swyter commented on 2026-06-21 07:02 (UTC)

Maybe it's because my /etc/makepkg.conf is quite old, from like 2013 or so, and doesn't have any LTO flags enabled. But I don't think it hurts, so disabled link time optimization in the PKGBUILD options array. Hope it helps!

RandoOnSteam commented on 2026-06-15 14:22 (UTC) (edited on 2026-06-15 14:23 (UTC) by RandoOnSteam)

Still get

[ 66%] Linking CXX executable ../../bin/llvm-tblgen
[ 66%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCSectionELF.cpp.o
/usr/bin/ld: ../../lib/libLLVMSupport.a: error adding symbols: file format not recognized
[ 66%] Building CXX object lib/MC/CMakeFiles/LLVMMC.dir/MCSectionMachO.cpp.o
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [utils/TableGen/CMakeFiles/llvm-tblgen.dir/build.make:197: bin/llvm-tblgen] Error 1
make[2]: *** [CMakeFiles/Makefile2:12162: utils/TableGen/CMakeFiles/llvm-tblgen.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....

without adding '!lto' to options. Maybe theres a better way then turning lto off though

swyter commented on 2026-06-08 23:39 (UTC)

Sorry everyone, for some reason I didn't have comment notifications enabled here! It should be fixed now. Thanks to @RandoOnSteam for the patch.

As I haven't had to reinstall this because the 2023 version keeps running fine I didn't notice.

RandoOnSteam commented on 2026-05-06 18:37 (UTC) (edited on 2026-05-06 18:38 (UTC) by RandoOnSteam)

There might be a better fix than this, but this fixed the SDK link and the linker errors

--- /home/user/Downloads/osxcross-git/PKGBUILD  2025-07-07 09:14:34.000000000 -0700
+++ /home/user/Downloads/osxcross-git/PKGBUILDMODDED    2026-05-06 11:29:39.753885163 -0700
@@ -10,7 +10,7 @@
url="https://github.com/tpoechtrager/osxcross"
license=('MIT')
depends=('clang>=3.2')
-makedepends=('patch' 'libxml2' 'bash')
+makedepends=('patch' 'libxml2' 'bash' 'git' 'cmake')
optdepends=(
    'llvm: for Link Time Optimization support and ld64 -bitcode_bundle support'
    'uuid: for ld64 -random_uuid support'
@@ -20,7 +20,7 @@
conflicts=("$_pkgname" xar apple-darwin-osxcross)
source=(
    'git+https://github.com/tpoechtrager/osxcross.git'
-   "https://archive.org/https://s3.dockerproject.org/darwin/v2/${_sdkname}.tar.xz"
+   "https://web.archive.org/https://s3.dockerproject.org/darwin/v2/${_sdkname}.tar.xz"

    # swy: this repository by an anonymous individual seems to have pre-bundled versions of the other SDKs,
    #      in case you want to change $_sdkname and use a newer version, comment the URL above and uncomment this one
@@ -29,7 +29,7 @@
)
md5sums=('SKIP' 'b0d81b95746c7e698c39c7df1e15ca7d')
noextract=("${_sdkname}.tar.xz")
-options=('!strip')
+options=('!strip' '!lto')
install="$pkgname.install"

# https://github.com/tpoechtrager/cctools-port/issues/108
@@ -43,6 +43,10 @@
build() {
    cd "$srcdir/$_pkgname"

+   # Explicitly use system Clang/LLVM to avoid linker confusion
+   export CC=clang
+   export CXX=clang++
+
    # swy: put all the generated files in there
    export OSXCROSS_TARGET_DIR="$srcdir/usr/local/osx-ndk-x86"; mkdir -p "$OSXCROSS_TARGET_DIR"
    sed -i -s "s|export TARGET_DIR\=|export TARGET_DIR\='${OSXCROSS_TARGET_DIR}' #|" "./tools/tools.sh"

Petar commented on 2026-03-31 01:45 (UTC)

Change https://archive.org/ to https://web.archive.org/ in the sources please

micwoj92 commented on 2025-10-22 06:16 (UTC)

Same issue:

  -> Downloading MacOSX10.11.sdk.tar.xz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
==> ERROR: Failure while downloading https://archive.org/https://s3.dockerproject.org/darwin/v2/MacOSX10.11.sdk.tar.xz
    Aborting...
==> ERROR: Could not download sources.

hotaru commented on 2025-07-10 22:54 (UTC)

the SDK URL in this PKGBUILD is 404.

swyter commented on 2024-11-07 17:56 (UTC)

Just built the current head and works just fine for me out of the box.