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] fix(configure): fix detection on windows arm64
@ 2025-05-12  5:59 Coia Prant
  0 siblings, 0 replies; 5+ messages in thread
From: Coia Prant @ 2025-05-12  5:59 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Coia Prant

On Windows Arm64
`uname -m` returned `x86_64` instead of `aarch64`
Link: https://github.com/msys2/msys2-runtime/issues/171

But `uname -s` contains `ARM64` suffix
So check suffix on windows arm64 (for clangarm64)

This problem also in VideoLAN/x264
Link: https://code.videolan.org/videolan/x264/-/merge_requests/177

Signed-off-by: Coia Prant <coiaprant@gmail.com>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure b/configure
index 2e69b3c..d8c1e09 100755
--- a/configure
+++ b/configure
@@ -4157,6 +4157,8 @@ if test "$target_os_default" = aix; then
     arch_default=$(uname -p)
     strip_default="strip -X32_64"
     nm_default="nm -g -X32_64"
+elif [[ "$target_os_default" == "mingw"*"arm64" ]] || [[ "$target_os_default" == "msys"*"arm64" ]]; then
+    arch_default="aarch64"
 else
     arch_default=$(uname -m)
 fi
-- 
2.47.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows arm64
  2025-05-13 19:30 ` Martin Storsjö
@ 2025-05-14  8:36   ` Coia Prant
  0 siblings, 0 replies; 5+ messages in thread
From: Coia Prant @ 2025-05-14  8:36 UTC (permalink / raw)
  To: Martin Storsjö; +Cc: FFmpeg development discussions and patches

Or do we detect the MSYSTEM environment variable?

Martin Storsjö <martin@martin.st> 于 2025年5月14日周三 03:31写道:

> On Mon, 12 May 2025, Coia Prant wrote:
>
> > On Windows Arm64
> > `uname -m` returned `x86_64` instead of `aarch64`
> > Link: https://github.com/msys2/msys2-runtime/issues/171
> >
> > But `uname -s` contains `ARM64` suffix
> > So check suffix on windows arm64 (for clangarm64)
> >
> > This problem also in VideoLAN/x264
> > Link: https://code.videolan.org/videolan/x264/-/merge_requests/177
> >
> > Signed-off-by: Coia Prant <coiaprant@gmail.com>
> > ---
> > configure | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/configure b/configure
> > index 2e69b3c..d8c1e09 100755
> > --- a/configure
> > +++ b/configure
> > @@ -4157,6 +4157,8 @@ if test "$target_os_default" = aix; then
> >     arch_default=$(uname -p)
> >     strip_default="strip -X32_64"
> >     nm_default="nm -g -X32_64"
> > +elif [[ "$target_os_default" == "mingw"*"arm64" ]] || [[
> "$target_os_default" == "msys"*"arm64" ]]; then
> > +    arch_default="aarch64"
> > else
>
> I don't think we should be detecting this for the msys*arm64 cases here.
> If we're in the msys environment, as opposed to the mingw ones, then the
> x86_64 that "uname -m" returns really is correct (even if running emulated
> on aarch64, the msys environment itself is x86_64, so that's the target
> architecture of the compilation).
>
> For the mingw*arm64 case, I haven't thought about all the potential
> consequences of the patch; it may be acceptable. But the script is a
> strict POSIX sh script, it can't use bash constructs (which is what
> Michael observed in testing the patch).
>
> // Martin
>
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows arm64
  2025-05-12  6:02 Coia Prant
  2025-05-13 15:15 ` Michael Niedermayer
@ 2025-05-13 19:30 ` Martin Storsjö
  2025-05-14  8:36   ` Coia Prant
  1 sibling, 1 reply; 5+ messages in thread
From: Martin Storsjö @ 2025-05-13 19:30 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Coia Prant

On Mon, 12 May 2025, Coia Prant wrote:

> On Windows Arm64
> `uname -m` returned `x86_64` instead of `aarch64`
> Link: https://github.com/msys2/msys2-runtime/issues/171
>
> But `uname -s` contains `ARM64` suffix
> So check suffix on windows arm64 (for clangarm64)
>
> This problem also in VideoLAN/x264
> Link: https://code.videolan.org/videolan/x264/-/merge_requests/177
>
> Signed-off-by: Coia Prant <coiaprant@gmail.com>
> ---
> configure | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/configure b/configure
> index 2e69b3c..d8c1e09 100755
> --- a/configure
> +++ b/configure
> @@ -4157,6 +4157,8 @@ if test "$target_os_default" = aix; then
>     arch_default=$(uname -p)
>     strip_default="strip -X32_64"
>     nm_default="nm -g -X32_64"
> +elif [[ "$target_os_default" == "mingw"*"arm64" ]] || [[ "$target_os_default" == "msys"*"arm64" ]]; then
> +    arch_default="aarch64"
> else

I don't think we should be detecting this for the msys*arm64 cases here. 
If we're in the msys environment, as opposed to the mingw ones, then the 
x86_64 that "uname -m" returns really is correct (even if running emulated 
on aarch64, the msys environment itself is x86_64, so that's the target 
architecture of the compilation).

For the mingw*arm64 case, I haven't thought about all the potential 
consequences of the patch; it may be acceptable. But the script is a 
strict POSIX sh script, it can't use bash constructs (which is what 
Michael observed in testing the patch).

// Martin

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows arm64
  2025-05-12  6:02 Coia Prant
@ 2025-05-13 15:15 ` Michael Niedermayer
  2025-05-13 19:30 ` Martin Storsjö
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Niedermayer @ 2025-05-13 15:15 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 762 bytes --]

On Mon, May 12, 2025 at 02:02:41PM +0800, Coia Prant wrote:
> On Windows Arm64
> `uname -m` returned `x86_64` instead of `aarch64`
> Link: https://github.com/msys2/msys2-runtime/issues/171
> 
> But `uname -s` contains `ARM64` suffix
> So check suffix on windows arm64 (for clangarm64)
> 
> This problem also in VideoLAN/x264
> Link: https://code.videolan.org/videolan/x264/-/merge_requests/177
> 
> Signed-off-by: Coia Prant <coiaprant@gmail.com>
> ---
>  configure | 2 ++
>  1 file changed, 2 insertions(+)

./configure
./configure: 4160: [[: not found
./configure: 4160: [[: not found


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows arm64
@ 2025-05-12  6:02 Coia Prant
  2025-05-13 15:15 ` Michael Niedermayer
  2025-05-13 19:30 ` Martin Storsjö
  0 siblings, 2 replies; 5+ messages in thread
From: Coia Prant @ 2025-05-12  6:02 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Coia Prant

On Windows Arm64
`uname -m` returned `x86_64` instead of `aarch64`
Link: https://github.com/msys2/msys2-runtime/issues/171

But `uname -s` contains `ARM64` suffix
So check suffix on windows arm64 (for clangarm64)

This problem also in VideoLAN/x264
Link: https://code.videolan.org/videolan/x264/-/merge_requests/177

Signed-off-by: Coia Prant <coiaprant@gmail.com>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure b/configure
index 2e69b3c..d8c1e09 100755
--- a/configure
+++ b/configure
@@ -4157,6 +4157,8 @@ if test "$target_os_default" = aix; then
     arch_default=$(uname -p)
     strip_default="strip -X32_64"
     nm_default="nm -g -X32_64"
+elif [[ "$target_os_default" == "mingw"*"arm64" ]] || [[ "$target_os_default" == "msys"*"arm64" ]]; then
+    arch_default="aarch64"
 else
     arch_default=$(uname -m)
 fi
-- 
2.47.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-14  8:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-12  5:59 [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows arm64 Coia Prant
2025-05-12  6:02 Coia Prant
2025-05-13 15:15 ` Michael Niedermayer
2025-05-13 19:30 ` Martin Storsjö
2025-05-14  8:36   ` Coia Prant

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