* [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows
@ 2025-05-23 9:32 Coia Prant
2025-05-25 14:50 ` Martin Storsjö
0 siblings, 1 reply; 6+ messages in thread
From: Coia Prant @ 2025-05-23 9:32 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
On x86 32-bit toolchain msys2 environment
`uname -m` returned `x86_64` instead of `i686` or `x86`
So check MSYSTEM_CARCH on windows (for arm64 and i686)
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..ed30b6b 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 test "$MSYSTEM_CARCH" != ""; then
+ arch_default="$MSYSTEM_CARCH"
else
arch_default=$(uname -m)
fi
--
2.49.0.windows.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] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows
2025-05-23 9:32 [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows Coia Prant
@ 2025-05-25 14:50 ` Martin Storsjö
2025-05-25 14:52 ` Coia Prant
2025-05-26 11:48 ` Martin Storsjö
0 siblings, 2 replies; 6+ messages in thread
From: Martin Storsjö @ 2025-05-25 14:50 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Coia Prant
On Fri, 23 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
>
> On x86 32-bit toolchain msys2 environment
> `uname -m` returned `x86_64` instead of `i686` or `x86`
>
> So check MSYSTEM_CARCH on windows (for arm64 and i686)
>
> 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..ed30b6b 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 test "$MSYSTEM_CARCH" != ""; then
> + arch_default="$MSYSTEM_CARCH"
> else
> arch_default=$(uname -m)
> fi
> --
> 2.49.0.windows.1
This approach seems reasonable to me.
(On i686 vs x86_64, it hasn't been an issue, since they all map into "x86"
within ffmpeg, and configure then checks the bitness, but for arm64 it's
indeed an issue.)
I can push the patch soon if nobody minds it.
// 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] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows
2025-05-25 14:50 ` Martin Storsjö
@ 2025-05-25 14:52 ` Coia Prant
2025-05-26 11:48 ` Martin Storsjö
1 sibling, 0 replies; 6+ messages in thread
From: Coia Prant @ 2025-05-25 14:52 UTC (permalink / raw)
To: Martin Storsjö; +Cc: FFmpeg development discussions and patches
Thank you!
Can you merge it in x264?
I also send a merge request.
Martin Storsjö <martin@martin.st> 于 2025年5月25日周日 22:50写道:
> On Fri, 23 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
> >
> > On x86 32-bit toolchain msys2 environment
> > `uname -m` returned `x86_64` instead of `i686` or `x86`
> >
> > So check MSYSTEM_CARCH on windows (for arm64 and i686)
> >
> > 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..ed30b6b 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 test "$MSYSTEM_CARCH" != ""; then
> > + arch_default="$MSYSTEM_CARCH"
> > else
> > arch_default=$(uname -m)
> > fi
> > --
> > 2.49.0.windows.1
>
> This approach seems reasonable to me.
>
> (On i686 vs x86_64, it hasn't been an issue, since they all map into "x86"
> within ffmpeg, and configure then checks the bitness, but for arm64 it's
> indeed an issue.)
>
> I can push the patch soon if nobody minds it.
>
> // 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] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows
2025-05-25 14:50 ` Martin Storsjö
2025-05-25 14:52 ` Coia Prant
@ 2025-05-26 11:48 ` Martin Storsjö
2025-05-26 13:39 ` Coia Prant
1 sibling, 1 reply; 6+ messages in thread
From: Martin Storsjö @ 2025-05-26 11:48 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Coia Prant
On Sun, 25 May 2025, Martin Storsjö wrote:
> On Fri, 23 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
>>
>> On x86 32-bit toolchain msys2 environment
>> `uname -m` returned `x86_64` instead of `i686` or `x86`
>>
>> So check MSYSTEM_CARCH on windows (for arm64 and i686)
>>
>> 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..ed30b6b 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 test "$MSYSTEM_CARCH" != ""; then
>> + arch_default="$MSYSTEM_CARCH"
>> else
>> arch_default=$(uname -m)
>> fi
>> --
>> 2.49.0.windows.1
>
> This approach seems reasonable to me.
>
> (On i686 vs x86_64, it hasn't been an issue, since they all map into "x86"
> within ffmpeg, and configure then checks the bitness, but for arm64 it's
> indeed an issue.)
>
> I can push the patch soon if nobody minds it.
Pushed now, with a rewritten commit message explaining the situation a bit
more.
But it seems like I lost the reference to
https://github.com/msys2/msys2-runtime/issues/171 while rewriting the
text, sorry about that.
// 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] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows
2025-05-26 11:48 ` Martin Storsjö
@ 2025-05-26 13:39 ` Coia Prant
2025-05-27 21:00 ` Martin Storsjö
0 siblings, 1 reply; 6+ messages in thread
From: Coia Prant @ 2025-05-26 13:39 UTC (permalink / raw)
To: Martin Storsjö; +Cc: FFmpeg development discussions and patches
Can u backport it to released branch?
Martin Storsjö <martin@martin.st> 于 2025年5月26日周一 19:48写道:
> On Sun, 25 May 2025, Martin Storsjö wrote:
>
> > On Fri, 23 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
> >>
> >> On x86 32-bit toolchain msys2 environment
> >> `uname -m` returned `x86_64` instead of `i686` or `x86`
> >>
> >> So check MSYSTEM_CARCH on windows (for arm64 and i686)
> >>
> >> 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..ed30b6b 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 test "$MSYSTEM_CARCH" != ""; then
> >> + arch_default="$MSYSTEM_CARCH"
> >> else
> >> arch_default=$(uname -m)
> >> fi
> >> --
> >> 2.49.0.windows.1
> >
> > This approach seems reasonable to me.
> >
> > (On i686 vs x86_64, it hasn't been an issue, since they all map into
> "x86"
> > within ffmpeg, and configure then checks the bitness, but for arm64 it's
> > indeed an issue.)
> >
> > I can push the patch soon if nobody minds it.
>
> Pushed now, with a rewritten commit message explaining the situation a bit
> more.
>
> But it seems like I lost the reference to
> https://github.com/msys2/msys2-runtime/issues/171 while rewriting the
> text, sorry about that.
>
> // 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] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows
2025-05-26 13:39 ` Coia Prant
@ 2025-05-27 21:00 ` Martin Storsjö
0 siblings, 0 replies; 6+ messages in thread
From: Martin Storsjö @ 2025-05-27 21:00 UTC (permalink / raw)
To: Coia Prant; +Cc: FFmpeg development discussions and patches
On Mon, 26 May 2025, Coia Prant wrote:
> Can u backport it to released branch?
Please don't top-post here.
Sure, that can probably be reasonable; I can try to backport it to a few
release branches within a day or two.
// 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] 6+ messages in thread
end of thread, other threads:[~2025-05-27 21:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-23 9:32 [FFmpeg-devel] [PATCH] fix(configure): fix detection on windows Coia Prant
2025-05-25 14:50 ` Martin Storsjö
2025-05-25 14:52 ` Coia Prant
2025-05-26 11:48 ` Martin Storsjö
2025-05-26 13:39 ` Coia Prant
2025-05-27 21:00 ` Martin Storsjö
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