[vlc-commits] [Git][videolan/vlc][master] apple: build.sh: only set --build triplet on Darwin

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Feb 15 14:18:33 UTC 2026



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
50fca9d2 by Alexandre Janniaux at 2026-02-15T14:36:24+01:00
apple: build.sh: only set --build triplet on Darwin

When cross-compiling from Linux with xcode-cross, the clang wrapper
reports a darwin build triplet even though the build machine is Linux.
This causes libtool's max_cmd_len detection to run sysctl kern.argmax,
which doesn't exist on Linux, leading to:
  libtool: line 11569: test: : integer expression expected

Only set VLC_BUILD_TRIPLET on Darwin and conditionally pass --build to
configure, letting config.guess auto-detect the build system on Linux.

- - - - -


1 changed file:

- extras/package/apple/build.sh


Changes:

=====================================
extras/package/apple/build.sh
=====================================
@@ -266,9 +266,11 @@ set_host_triplet()
 #   None
 set_build_triplet()
 {
-    local build_arch="$(uname -m | cut -d. -f1)"
-    VLC_BUILD_TRIPLET="$(${VLC_HOST_CC} -arch "${build_arch}" -dumpmachine)"
-    VLC_BUILD_TRIPLET="${VLC_BUILD_TRIPLET/arm64/aarch64}"
+    if [ "$(uname -s)" = "Darwin" ]; then
+        local build_arch="$(uname -m | cut -d. -f1)"
+        VLC_BUILD_TRIPLET="$(${VLC_HOST_CC} -arch "${build_arch}" -dumpmachine)"
+        VLC_BUILD_TRIPLET="${VLC_BUILD_TRIPLET/arm64/aarch64}"
+    fi
 }
 
 # Take SDK name, verify it exists and populate
@@ -694,7 +696,7 @@ fi
 # Bootstrap contribs
 ../bootstrap \
     --host="$VLC_HOST_TRIPLET" \
-    --build="$VLC_BUILD_TRIPLET" \
+    ${VLC_BUILD_TRIPLET:+--build="$VLC_BUILD_TRIPLET"} \
     --prefix="$VLC_CONTRIB_INSTALL_DIR" \
     "${VLC_CONTRIB_OPTIONS[@]}" \
 || abort_err "Bootstrapping contribs failed"
@@ -788,7 +790,7 @@ mkdir -p "$VLC_INSTALL_DIR"
 vlcSetSymbolEnvironment \
 hostenv "${VLC_SRC_DIR}/configure" \
     --host="$VLC_HOST_TRIPLET" \
-    --build="$VLC_BUILD_TRIPLET" \
+    ${VLC_BUILD_TRIPLET:+--build="$VLC_BUILD_TRIPLET"} \
     --prefix="$VLC_INSTALL_DIR" \
     --with-contrib="$VLC_CONTRIB_INSTALL_DIR" \
     "${VLC_CONFIG_OPTIONS[@]}" \



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/50fca9d25c78dffc00cef24cae467fc202d19466

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/50fca9d25c78dffc00cef24cae467fc202d19466
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list