Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] configure, tests: Fix running with busybox-w32 (PR #21230)
@ 2025-12-17 22:30 Martin Storsjö via ffmpeg-devel
  0 siblings, 0 replies; only message in thread
From: Martin Storsjö via ffmpeg-devel @ 2025-12-17 22:30 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Martin Storsjö

PR #21230 opened by Martin Storsjö (mstorsjo)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21230
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21230.patch

With these two small changes, it's possible to build and run fate tests on busybox-w32 on Windows, as an alternative to msys2.

This can be useful in particular on ARM, as msys2 only exists in emulated x86_64 form still, while busybox can be a native aarch64 binary. (A quick comparison on github actions shows that a full setup+build+test on aarch64 takes 26 minutes on msys2 and 18 minutes on busybox-w32. The `make -j$(nproc) fate` phase takes almost 18 minutes on msys2, but only 11 minutes on busybox-w32.)

Running the tests still requires one fix for busybox's md5sum, see https://lists.busybox.net/pipermail/busybox/2025-December/091851.html. (The same issue also appears if running tests on busybox on Linux.)


From e7f748ba7ed9ce2036c31527479cf390d6747d37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Wed, 3 Dec 2025 21:10:25 +0000
Subject: [PATCH 1/2] configure: Recognize uname "Windows_NT" as using an .exe
 suffix

Busybox-w32 [1] works for building ffmpeg on Windows (as an
alternative to msys2, cygwin or WSL).

On busybox-w32, "uname" returns "Windows_NT"; recognize this
in exesuf() as having an .exe suffix.

If building in this environment with a mingw toolchain, one has
to explicitly set --target-os=mingw32. (We probably don't
want to imply that this uname, set as target_os_default, would
default to mingw?) But despite what is set with --target-os,
one can't override the configure variable "host_os", which
exesuf() has to recognize.

[1] https://github.com/rmyorston/busybox-w32
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 083a30972a..9dfb854917 100755
--- a/configure
+++ b/configure
@@ -4909,7 +4909,7 @@ fi
 
 exesuf() {
     case $1 in
-        mingw32*|mingw64*|msys*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;;
+        mingw32*|mingw64*|msys*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian|windows_nt) echo .exe ;;
     esac
 }
 
-- 
2.49.1


From 7f3c07663845afdfa18be0eee834c253576c5025 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Wed, 3 Dec 2025 21:36:45 +0000
Subject: [PATCH 2/2] tests: Fix fate-run.sh to handle busybox-w32 absolute
 paths

Busybox-w32 uses regular Windows style paths with drive letters,
but with forward slashes; thus an absolute path starts with "c:/".

Make the target_path() function in fate-run.sh (which converts a
potentially relative path to an absolute one, under the target_path
prefix) handle this case.

With this in place, running fate tests almost works in
busybox-w32 - only one issue remains. A patch [1] has been sent to
upstream busybox for fixing that issue (which also is present if
running fate tests on busybox on Linux), but it hasn't been
responded to yet.

[1] https://lists.busybox.net/pipermail/busybox/2025-December/091851.html
---
 tests/fate-run.sh | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 6d1fe1185c..0e0c11ac3b 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -43,8 +43,17 @@ esac
 
 
 target_path(){
-    test ${1} = ${1#/} && p=${target_path}/
-    echo ${p}${1}
+    case ${1} in
+    [a-zA-Z]:/*)
+        echo ${1}
+        ;;
+    /*)
+        echo ${1}
+        ;;
+    *)
+        echo ${target_path}/${1}
+        ;;
+    esac
 }
 
 # $1=value1, $2=value2, $3=threshold
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-17 22:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-17 22:30 [FFmpeg-devel] [PATCH] configure, tests: Fix running with busybox-w32 (PR #21230) Martin Storsjö via ffmpeg-devel

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git