Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] Building for Mac x86 with GCC & NASM
@ 2025-05-27 22:23 softworkz .
  2025-05-28  5:54 ` Martin Storsjö
  0 siblings, 1 reply; 21+ messages in thread
From: softworkz . @ 2025-05-27 22:23 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Hi,

I have an issue with the CI builds for Mac in a way that it prints
tons of lines like this:

ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1008](sao_10bit.o)', assuming: macOS
ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1009](hpeldsp.o)', assuming: macOS
ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1011](huffyuvdsp.o)', assuming: macOS
ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1013](huffyuvencdsp.o)', assuming: macOS


These are all about X86AM output. I've had those lines for all .o files 
before and was able to get rid of them by adding flags like below. 

Does anybody know how I can avoid those lines for the X86ASM output as well?
(don't know much about building for Apple)

I'm including the current configure command below.

Thanks
sw


export MACOSX_DEPLOYMENT_TARGET=13.0

./configure --pkg-config-flags="--static" --extra-libs="-lm" \
         --extra-cflags="-mmacosx-version-min=13.0" \
         --extra-ldflags="-mmacosx-version-min=13.0 -Wl,-platform_version,macos,13.0,13.0" \
         --enable-gpl \
         --enable-nonfree \
         --enable-videotoolbox \
         --samples=fate-suite --disable-stripping \
         --disable-doc --disable-optimizations --disable-avx512 --enable-debug=3 

_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-27 22:23 [FFmpeg-devel] Building for Mac x86 with GCC & NASM softworkz .
@ 2025-05-28  5:54 ` Martin Storsjö
  2025-05-28  7:39   ` Christopher Snowhill
  2025-05-28  8:11   ` softworkz .
  0 siblings, 2 replies; 21+ messages in thread
From: Martin Storsjö @ 2025-05-28  5:54 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Tue, 27 May 2025, softworkz . wrote:

> Hi,
>
> I have an issue with the CI builds for Mac in a way that it prints
> tons of lines like this:
>
> ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1008](sao_10bit.o)', assuming: macOS
> ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1009](hpeldsp.o)', assuming: macOS
> ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1011](huffyuvdsp.o)', assuming: macOS
> ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1013](huffyuvencdsp.o)', assuming: macOS
>
>
> These are all about X86AM output. I've had those lines for all .o files
> before and was able to get rid of them by adding flags like below.
>
> Does anybody know how I can avoid those lines for the X86ASM output as well?
> (don't know much about building for Apple)

These warnings appeared since the new linker in Xcode 15.0, 1.5 years ago. 
I'm not aware of a flag for silencing these warnings; the only way I'm 
aware of is to force using the old linker by passing -Wl,-ld_classic.

These warnings would go away of nasm could produce the right platform load 
commands; this is https://github.com/netwide-assembler/nasm/pull/13, but 
there hasn't been much progress on it. (And since the macOS ecossytem 
mostly is moving away from x86, I guess there's progressively less effort 
on it as well.)

// 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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  5:54 ` Martin Storsjö
@ 2025-05-28  7:39   ` Christopher Snowhill
  2025-05-28  8:12     ` softworkz .
  2025-05-28  8:11   ` softworkz .
  1 sibling, 1 reply; 21+ messages in thread
From: Christopher Snowhill @ 2025-05-28  7:39 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Tue May 27, 2025 at 10:54 PM PDT, Martin Storsjö wrote:
> On Tue, 27 May 2025, softworkz . wrote:
>
>> Hi,
>>
>> I have an issue with the CI builds for Mac in a way that it prints
>> tons of lines like this:
>>
>> ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1008](sao_10bit.o)', assuming: macOS
>> ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1009](hpeldsp.o)', assuming: macOS
>> ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1011](huffyuvdsp.o)', assuming: macOS
>> ld: warning: no platform load command found in 'libavcodec/libavcodec.a[1013](huffyuvencdsp.o)', assuming: macOS
>>
>>
>> These are all about X86AM output. I've had those lines for all .o files
>> before and was able to get rid of them by adding flags like below.
>>
>> Does anybody know how I can avoid those lines for the X86ASM output as well?
>> (don't know much about building for Apple)
>
> These warnings appeared since the new linker in Xcode 15.0, 1.5 years ago. 
> I'm not aware of a flag for silencing these warnings; the only way I'm 
> aware of is to force using the old linker by passing -Wl,-ld_classic.
>
> These warnings would go away of nasm could produce the right platform load 
> commands; this is https://github.com/netwide-assembler/nasm/pull/13, but 
> there hasn't been much progress on it. (And since the macOS ecossytem 
> mostly is moving away from x86, I guess there's progressively less effort 
> on it as well.)
>
> // Martin

I do wonder how this is going, since I have never noticed such messages
while building for x86 from an ARM machine. I continue to support x86
machines all the way down to the minimum spec of current Xcode, which is
10.13.

I guess I can look forward to dropping x86 support whenever Apple
decides to drop it entirely from whatever is required to build and
submit to the App Store. I also look forward to both Wine and Steam
ceasing to be a thing on the Mac, along with all the x86 games that will
never be ported to ARM. But this is getting into an off-topic rant,
sorry about that.

>
> _______________________________________________
> 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".

_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  5:54 ` Martin Storsjö
  2025-05-28  7:39   ` Christopher Snowhill
@ 2025-05-28  8:11   ` softworkz .
  2025-05-28  8:27     ` Martin Storsjö
  1 sibling, 1 reply; 21+ messages in thread
From: softworkz . @ 2025-05-28  8:11 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Martin Storsjö
> Sent: Mittwoch, 28. Mai 2025 07:55
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> 
> On Tue, 27 May 2025, softworkz . wrote:
> 
> > Hi,
> >
> > I have an issue with the CI builds for Mac in a way that it prints
> > tons of lines like this:
> >
> > ld: warning: no platform load command found in
> 'libavcodec/libavcodec.a[1008](sao_10bit.o)', assuming: macOS
> > ld: warning: no platform load command found in
> 'libavcodec/libavcodec.a[1009](hpeldsp.o)', assuming: macOS
> > ld: warning: no platform load command found in
> 'libavcodec/libavcodec.a[1011](huffyuvdsp.o)', assuming: macOS
> > ld: warning: no platform load command found in
> 'libavcodec/libavcodec.a[1013](huffyuvencdsp.o)', assuming: macOS
> >
> >
> > These are all about X86AM output. I've had those lines for all .o
> files
> > before and was able to get rid of them by adding flags like below.
> >
> > Does anybody know how I can avoid those lines for the X86ASM output
> as well?
> > (don't know much about building for Apple)

Hi Martin,

thanks a lot for the reply.


> These warnings appeared since the new linker in Xcode 15.0, 1.5 years
> ago.
> I'm not aware of a flag for silencing these warnings; the only way I'm
> aware of is to force using the old linker by passing -Wl,-ld_classic.

Thanks for the tip. It works to the extent that it prevents those 
messages from appearing and make completes successfully. But almost 
all (4724) fate tests are failing, haven't tried to trace it down.


> These warnings would go away of nasm could produce the right platform
> load
> commands; this is https://github.com/netwide-assembler/nasm/pull/13,
> but
> there hasn't been much progress on it. (And since the macOS ecossytem
> mostly is moving away from x86, I guess there's progressively less
> effort on it as well.)

I commented there, it seems there are many PRs pending and from the 
changelog, it seems there's little progress at all (mostly cosmetic
changes).
This led me to a reference indicating that YASM already does it right.
I tried to build with YASM instead. After disabling HEVC and VVC decoders
it ran almost to the end, but then it failed on tx_float:

Warning: libavcodec/x86/vp9lpf.o
skipping strip -x 
Warning: libavcodec/x86/vp9lpf.o
libavutil/x86/tx_float.asm:1936: error: 
Warning: (PFA_15_FN:21) expression syntax 
Warning: error
libavutil/x86/tx_float.asm:1937: error: (PFA_15_FN:21) 
Warning: expression syntax error
make: *** [libavutil/x86/tx_float.o] Error

I don't know whether it can be disabled in some way as it appears to be 
a prerequisite for many codecs and filters? 
Besides that, I suppose that YASM isn't a good idea at all, right?`


From a different angle - what do you think would be the most useful 
Mac build for Patchwork CI in general?
The available runners are macos 13, 14 and 15 - all x86, there's no 
arm yet.
And would it be better to use Clang like in case of your FATE machines?

Thanks
sw

_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  7:39   ` Christopher Snowhill
@ 2025-05-28  8:12     ` softworkz .
  2025-05-28  8:28       ` Martin Storsjö
  2025-05-28  8:38       ` Christopher Snowhill
  0 siblings, 2 replies; 21+ messages in thread
From: softworkz . @ 2025-05-28  8:12 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Christopher Snowhill
> Sent: Mittwoch, 28. Mai 2025 09:40
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> 
> On Tue May 27, 2025 at 10:54 PM PDT, Martin Storsjö wrote:
> > On Tue, 27 May 2025, softworkz . wrote:
> >
> >> Hi,
> >>
> >> I have an issue with the CI builds for Mac in a way that it prints
> >> tons of lines like this:
> >>
> >> ld: warning: no platform load command found in
> 'libavcodec/libavcodec.a[1008](sao_10bit.o)', assuming: macOS
> >> ld: warning: no platform load command found in
> 'libavcodec/libavcodec.a[1009](hpeldsp.o)', assuming: macOS
> >> ld: warning: no platform load command found in
> 'libavcodec/libavcodec.a[1011](huffyuvdsp.o)', assuming: macOS
> >> ld: warning: no platform load command found in
> 'libavcodec/libavcodec.a[1013](huffyuvencdsp.o)', assuming: macOS
> >>
> >>
> >> These are all about X86AM output. I've had those lines for all .o
> files
> >> before and was able to get rid of them by adding flags like below.
> >>
> >> Does anybody know how I can avoid those lines for the X86ASM output
> as well?
> >> (don't know much about building for Apple)
> >
> > These warnings appeared since the new linker in Xcode 15.0, 1.5
> years ago.
> > I'm not aware of a flag for silencing these warnings; the only way
> I'm
> > aware of is to force using the old linker by passing -Wl,-
> ld_classic.
> >
> > These warnings would go away of nasm could produce the right
> platform load
> > commands; this is https://github.com/netwide-assembler/nasm/pull/13,
> but
> > there hasn't been much progress on it. (And since the macOS
> ecossytem
> > mostly is moving away from x86, I guess there's progressively less
> effort
> > on it as well.)
> >
> > // Martin
> 
> I do wonder how this is going, since I have never noticed such
> messages
> while building for x86 from an ARM machine. I continue to support x86
> machines all the way down to the minimum spec of current Xcode, which
> is
> 10.13.

I don't think you can cross-compile x86 assembler on an arm machine.

Best regards
sw

_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:11   ` softworkz .
@ 2025-05-28  8:27     ` Martin Storsjö
  2025-05-28  8:49       ` softworkz .
  2025-05-28  8:58       ` softworkz .
  0 siblings, 2 replies; 21+ messages in thread
From: Martin Storsjö @ 2025-05-28  8:27 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed, 28 May 2025, softworkz . wrote:

>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> Martin Storsjö
>> Sent: Mittwoch, 28. Mai 2025 07:55
>> To: FFmpeg development discussions and patches <ffmpeg-
>> devel@ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
>>
>> These warnings appeared since the new linker in Xcode 15.0, 1.5 years
>> ago.
>> I'm not aware of a flag for silencing these warnings; the only way I'm
>> aware of is to force using the old linker by passing -Wl,-ld_classic.
>
> Thanks for the tip. It works to the extent that it prevents those
> messages from appearing and make completes successfully. But almost
> all (4724) fate tests are failing, haven't tried to trace it down.

That sounds odd; it works fine for me (on an arm64 mac).

However this flag isn't a great solution either, since Xcode 16, the 
linker warns "ld: warning: -ld_classic is deprecated and will be removed 
in a future release".

> This led me to a reference indicating that YASM already does it right.
> I tried to build with YASM instead. After disabling HEVC and VVC decoders
> it ran almost to the end, but then it failed on tx_float:
>
> Warning: libavcodec/x86/vp9lpf.o
> skipping strip -x
> Warning: libavcodec/x86/vp9lpf.o
> libavutil/x86/tx_float.asm:1936: error:
> Warning: (PFA_15_FN:21) expression syntax
> Warning: error
> libavutil/x86/tx_float.asm:1937: error: (PFA_15_FN:21)
> Warning: expression syntax error
> make: *** [libavutil/x86/tx_float.o] Error
>
> I don't know whether it can be disabled in some way as it appears to be
> a prerequisite for many codecs and filters?
> Besides that, I suppose that YASM isn't a good idea at all, right?`

I'm not really familiar with the situation about x86 assemblers, but afaik 
yasm is much further behind on many other aspects.

> From a different angle - what do you think would be the most useful
> Mac build for Patchwork CI in general?
> The available runners are macos 13, 14 and 15 - all x86, there's no
> arm yet.
> And would it be better to use Clang like in case of your FATE machines?

I would recommend you to use the Apple provided Clang rather than GCC.

// 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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:12     ` softworkz .
@ 2025-05-28  8:28       ` Martin Storsjö
  2025-05-28  8:34         ` softworkz .
  2025-05-28  8:38       ` Christopher Snowhill
  1 sibling, 1 reply; 21+ messages in thread
From: Martin Storsjö @ 2025-05-28  8:28 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed, 28 May 2025, softworkz . wrote:

>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> Christopher Snowhill
>> Sent: Mittwoch, 28. Mai 2025 09:40
>> To: FFmpeg development discussions and patches <ffmpeg-
>> devel@ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
>>
>> On Tue May 27, 2025 at 10:54 PM PDT, Martin Storsjö wrote:
>>> On Tue, 27 May 2025, softworkz . wrote:
>>>
>>>> Hi,
>>>>
>>>> I have an issue with the CI builds for Mac in a way that it prints
>>>> tons of lines like this:
>>>>
>>>> ld: warning: no platform load command found in
>> 'libavcodec/libavcodec.a[1008](sao_10bit.o)', assuming: macOS
>>>> ld: warning: no platform load command found in
>> 'libavcodec/libavcodec.a[1009](hpeldsp.o)', assuming: macOS
>>>> ld: warning: no platform load command found in
>> 'libavcodec/libavcodec.a[1011](huffyuvdsp.o)', assuming: macOS
>>>> ld: warning: no platform load command found in
>> 'libavcodec/libavcodec.a[1013](huffyuvencdsp.o)', assuming: macOS
>>>>
>>>>
>>>> These are all about X86AM output. I've had those lines for all .o
>> files
>>>> before and was able to get rid of them by adding flags like below.
>>>>
>>>> Does anybody know how I can avoid those lines for the X86ASM output
>> as well?
>>>> (don't know much about building for Apple)
>>>
>>> These warnings appeared since the new linker in Xcode 15.0, 1.5
>> years ago.
>>> I'm not aware of a flag for silencing these warnings; the only way
>> I'm
>>> aware of is to force using the old linker by passing -Wl,-
>> ld_classic.
>>>
>>> These warnings would go away of nasm could produce the right
>> platform load
>>> commands; this is https://github.com/netwide-assembler/nasm/pull/13,
>> but
>>> there hasn't been much progress on it. (And since the macOS
>> ecossytem
>>> mostly is moving away from x86, I guess there's progressively less
>> effort
>>> on it as well.)
>>>
>>> // Martin
>>
>> I do wonder how this is going, since I have never noticed such
>> messages
>> while building for x86 from an ARM machine. I continue to support x86
>> machines all the way down to the minimum spec of current Xcode, which
>> is
>> 10.13.
>
> I don't think you can cross-compile x86 assembler on an arm machine.

Why wouldn't you be able to do that? The assembler is an executable like 
any other, taking in source code and outputting object files. You can run 
that on any machine.

// 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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:28       ` Martin Storsjö
@ 2025-05-28  8:34         ` softworkz .
  2025-05-28  8:39           ` Martin Storsjö
  2025-05-28  8:43           ` Christopher Snowhill
  0 siblings, 2 replies; 21+ messages in thread
From: softworkz . @ 2025-05-28  8:34 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Martin Storsjö
> Sent: Mittwoch, 28. Mai 2025 10:29
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> 
> On Wed, 28 May 2025, softworkz . wrote:
> 
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >> Christopher Snowhill
> >> Sent: Mittwoch, 28. Mai 2025 09:40
> >> To: FFmpeg development discussions and patches <ffmpeg-
> >> devel@ffmpeg.org>
> >> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> >>
> >> On Tue May 27, 2025 at 10:54 PM PDT, Martin Storsjö wrote:
> >>> On Tue, 27 May 2025, softworkz . wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I have an issue with the CI builds for Mac in a way that it
> prints
> >>>> tons of lines like this:
> >>>>
> >>>> ld: warning: no platform load command found in
> >> 'libavcodec/libavcodec.a[1008](sao_10bit.o)', assuming: macOS
> >>>> ld: warning: no platform load command found in
> >> 'libavcodec/libavcodec.a[1009](hpeldsp.o)', assuming: macOS
> >>>> ld: warning: no platform load command found in
> >> 'libavcodec/libavcodec.a[1011](huffyuvdsp.o)', assuming: macOS
> >>>> ld: warning: no platform load command found in
> >> 'libavcodec/libavcodec.a[1013](huffyuvencdsp.o)', assuming: macOS
> >>>>
> >>>>
> >>>> These are all about X86AM output. I've had those lines for all .o
> >> files
> >>>> before and was able to get rid of them by adding flags like
> below.
> >>>>
> >>>> Does anybody know how I can avoid those lines for the X86ASM
> output
> >> as well?
> >>>> (don't know much about building for Apple)
> >>>
> >>> These warnings appeared since the new linker in Xcode 15.0, 1.5
> >> years ago.
> >>> I'm not aware of a flag for silencing these warnings; the only way
> >> I'm
> >>> aware of is to force using the old linker by passing -Wl,-
> >> ld_classic.
> >>>
> >>> These warnings would go away of nasm could produce the right
> >> platform load
> >>> commands; this is https://github.com/netwide-
> assembler/nasm/pull/13,
> >> but
> >>> there hasn't been much progress on it. (And since the macOS
> >> ecossytem
> >>> mostly is moving away from x86, I guess there's progressively less
> >> effort
> >>> on it as well.)
> >>>
> >>> // Martin
> >>
> >> I do wonder how this is going, since I have never noticed such
> >> messages
> >> while building for x86 from an ARM machine. I continue to support
> x86
> >> machines all the way down to the minimum spec of current Xcode,
> which
> >> is
> >> 10.13.
> >
> > I don't think you can cross-compile x86 assembler on an arm machine.
> 
> Why wouldn't you be able to do that? The assembler is an executable
> like
> any other, taking in source code and outputting object files. You can
> run
> that on any machine.

I haven't seen any arm binary in nasm's MacOS package. 
Is there a nasm package for arm? Then I'm wrong of course!

Thanks
sw



_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:12     ` softworkz .
  2025-05-28  8:28       ` Martin Storsjö
@ 2025-05-28  8:38       ` Christopher Snowhill
  1 sibling, 0 replies; 21+ messages in thread
From: Christopher Snowhill @ 2025-05-28  8:38 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed May 28, 2025 at 1:12 AM PDT, softworkz . wrote:
>
>
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> Christopher Snowhill
>> Sent: Mittwoch, 28. Mai 2025 09:40
>> To: FFmpeg development discussions and patches <ffmpeg-
>> devel@ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
>> 
>> On Tue May 27, 2025 at 10:54 PM PDT, Martin Storsjö wrote:
>> > On Tue, 27 May 2025, softworkz . wrote:
>> >
>> >> Hi,
>> >>
>> >> I have an issue with the CI builds for Mac in a way that it prints
>> >> tons of lines like this:
>> >>
>> >> ld: warning: no platform load command found in
>> 'libavcodec/libavcodec.a[1008](sao_10bit.o)', assuming: macOS
>> >> ld: warning: no platform load command found in
>> 'libavcodec/libavcodec.a[1009](hpeldsp.o)', assuming: macOS
>> >> ld: warning: no platform load command found in
>> 'libavcodec/libavcodec.a[1011](huffyuvdsp.o)', assuming: macOS
>> >> ld: warning: no platform load command found in
>> 'libavcodec/libavcodec.a[1013](huffyuvencdsp.o)', assuming: macOS
>> >>
>> >>
>> >> These are all about X86AM output. I've had those lines for all .o
>> files
>> >> before and was able to get rid of them by adding flags like below.
>> >>
>> >> Does anybody know how I can avoid those lines for the X86ASM output
>> as well?
>> >> (don't know much about building for Apple)
>> >
>> > These warnings appeared since the new linker in Xcode 15.0, 1.5
>> years ago.
>> > I'm not aware of a flag for silencing these warnings; the only way
>> I'm
>> > aware of is to force using the old linker by passing -Wl,-
>> ld_classic.
>> >
>> > These warnings would go away of nasm could produce the right
>> platform load
>> > commands; this is https://github.com/netwide-assembler/nasm/pull/13,
>> but
>> > there hasn't been much progress on it. (And since the macOS
>> ecossytem
>> > mostly is moving away from x86, I guess there's progressively less
>> effort
>> > on it as well.)
>> >
>> > // Martin
>> 
>> I do wonder how this is going, since I have never noticed such
>> messages
>> while building for x86 from an ARM machine. I continue to support x86
>> machines all the way down to the minimum spec of current Xcode, which
>> is
>> 10.13.
>
> I don't think you can cross-compile x86 assembler on an arm machine.

Oh, but you can! And thanks to Rosetta 2, I can even test it! But that's
another rugpull waiting to happen soon enough.

>
> Best regards
> sw
>
> _______________________________________________
> 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".

_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:34         ` softworkz .
@ 2025-05-28  8:39           ` Martin Storsjö
  2025-05-28  8:43             ` softworkz .
  2025-05-28  8:43           ` Christopher Snowhill
  1 sibling, 1 reply; 21+ messages in thread
From: Martin Storsjö @ 2025-05-28  8:39 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed, 28 May 2025, softworkz . wrote:

>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> Martin Storsjö
>> Sent: Mittwoch, 28. Mai 2025 10:29
>> To: FFmpeg development discussions and patches <ffmpeg-
>> devel@ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
>>
>> On Wed, 28 May 2025, softworkz . wrote:
>>
>>>> -----Original Message-----
>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>>>> Christopher Snowhill
>>>> Sent: Mittwoch, 28. Mai 2025 09:40
>>>> To: FFmpeg development discussions and patches <ffmpeg-
>>>> devel@ffmpeg.org>
>>>> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
>>>>
>>>> On Tue May 27, 2025 at 10:54 PM PDT, Martin Storsjö wrote:
>>>>> On Tue, 27 May 2025, softworkz . wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have an issue with the CI builds for Mac in a way that it
>> prints
>>>>>> tons of lines like this:
>>>>>>
>>>>>> ld: warning: no platform load command found in
>>>> 'libavcodec/libavcodec.a[1008](sao_10bit.o)', assuming: macOS
>>>>>> ld: warning: no platform load command found in
>>>> 'libavcodec/libavcodec.a[1009](hpeldsp.o)', assuming: macOS
>>>>>> ld: warning: no platform load command found in
>>>> 'libavcodec/libavcodec.a[1011](huffyuvdsp.o)', assuming: macOS
>>>>>> ld: warning: no platform load command found in
>>>> 'libavcodec/libavcodec.a[1013](huffyuvencdsp.o)', assuming: macOS
>>>>>>
>>>>>>
>>>>>> These are all about X86AM output. I've had those lines for all .o
>>>> files
>>>>>> before and was able to get rid of them by adding flags like
>> below.
>>>>>>
>>>>>> Does anybody know how I can avoid those lines for the X86ASM
>> output
>>>> as well?
>>>>>> (don't know much about building for Apple)
>>>>>
>>>>> These warnings appeared since the new linker in Xcode 15.0, 1.5
>>>> years ago.
>>>>> I'm not aware of a flag for silencing these warnings; the only way
>>>> I'm
>>>>> aware of is to force using the old linker by passing -Wl,-
>>>> ld_classic.
>>>>>
>>>>> These warnings would go away of nasm could produce the right
>>>> platform load
>>>>> commands; this is https://github.com/netwide-
>> assembler/nasm/pull/13,
>>>> but
>>>>> there hasn't been much progress on it. (And since the macOS
>>>> ecossytem
>>>>> mostly is moving away from x86, I guess there's progressively less
>>>> effort
>>>>> on it as well.)
>>>>>
>>>>> // Martin
>>>>
>>>> I do wonder how this is going, since I have never noticed such
>>>> messages
>>>> while building for x86 from an ARM machine. I continue to support
>> x86
>>>> machines all the way down to the minimum spec of current Xcode,
>> which
>>>> is
>>>> 10.13.
>>>
>>> I don't think you can cross-compile x86 assembler on an arm machine.
>>
>> Why wouldn't you be able to do that? The assembler is an executable
>> like
>> any other, taking in source code and outputting object files. You can
>> run
>> that on any machine.
>
> I haven't seen any arm binary in nasm's MacOS package.
> Is there a nasm package for arm? Then I'm wrong of course!

It's not very hard to compile it yourself. And macOS on arm can run x86_64 
binaries just fine if you want to use a prebuilt binary. Plus other 
package managers like homebrew probably provides arm versionis of it as 
well.

// 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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:39           ` Martin Storsjö
@ 2025-05-28  8:43             ` softworkz .
  0 siblings, 0 replies; 21+ messages in thread
From: softworkz . @ 2025-05-28  8:43 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Martin Storsjö
> Sent: Mittwoch, 28. Mai 2025 10:40
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> 
> On Wed, 28 May 2025, softworkz . wrote:
> 
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >> Martin Storsjö
> >> Sent: Mittwoch, 28. Mai 2025 10:29
> >> To: FFmpeg development discussions and patches <ffmpeg-
> >> devel@ffmpeg.org>
> >> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> >>
> >> On Wed, 28 May 2025, softworkz . wrote:
> >>
> >>>> -----Original Message-----
> >>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >>>> Christopher Snowhill
> >>>> Sent: Mittwoch, 28. Mai 2025 09:40
> >>>> To: FFmpeg development discussions and patches <ffmpeg-
> >>>> devel@ffmpeg.org>
> >>>> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> >>>>
> >>>> On Tue May 27, 2025 at 10:54 PM PDT, Martin Storsjö wrote:
> >>>>> On Tue, 27 May 2025, softworkz . wrote:
> >>>>>
> >>>>>> Hi,
> >>>>>>
> >>>>>> I have an issue with the CI builds for Mac in a way that it
> >> prints
> >>>>>> tons of lines like this:
> >>>>>>
> >>>>>> ld: warning: no platform load command found in
> >>>> 'libavcodec/libavcodec.a[1008](sao_10bit.o)', assuming: macOS
> >>>>>> ld: warning: no platform load command found in
> >>>> 'libavcodec/libavcodec.a[1009](hpeldsp.o)', assuming: macOS
> >>>>>> ld: warning: no platform load command found in
> >>>> 'libavcodec/libavcodec.a[1011](huffyuvdsp.o)', assuming: macOS
> >>>>>> ld: warning: no platform load command found in
> >>>> 'libavcodec/libavcodec.a[1013](huffyuvencdsp.o)', assuming: macOS
> >>>>>>
> >>>>>>
> >>>>>> These are all about X86AM output. I've had those lines for all
> .o
> >>>> files
> >>>>>> before and was able to get rid of them by adding flags like
> >> below.
> >>>>>>
> >>>>>> Does anybody know how I can avoid those lines for the X86ASM
> >> output
> >>>> as well?
> >>>>>> (don't know much about building for Apple)
> >>>>>
> >>>>> These warnings appeared since the new linker in Xcode 15.0, 1.5
> >>>> years ago.
> >>>>> I'm not aware of a flag for silencing these warnings; the only
> way
> >>>> I'm
> >>>>> aware of is to force using the old linker by passing -Wl,-
> >>>> ld_classic.
> >>>>>
> >>>>> These warnings would go away of nasm could produce the right
> >>>> platform load
> >>>>> commands; this is https://github.com/netwide-
> >> assembler/nasm/pull/13,
> >>>> but
> >>>>> there hasn't been much progress on it. (And since the macOS
> >>>> ecossytem
> >>>>> mostly is moving away from x86, I guess there's progressively
> less
> >>>> effort
> >>>>> on it as well.)
> >>>>>
> >>>>> // Martin
> >>>>
> >>>> I do wonder how this is going, since I have never noticed such
> >>>> messages
> >>>> while building for x86 from an ARM machine. I continue to support
> >> x86
> >>>> machines all the way down to the minimum spec of current Xcode,
> >> which
> >>>> is
> >>>> 10.13.
> >>>
> >>> I don't think you can cross-compile x86 assembler on an arm
> machine.
> >>
> >> Why wouldn't you be able to do that? The assembler is an executable
> >> like
> >> any other, taking in source code and outputting object files. You
> can
> >> run
> >> that on any machine.
> >
> > I haven't seen any arm binary in nasm's MacOS package.
> > Is there a nasm package for arm? Then I'm wrong of course!
> 
> It's not very hard to compile it yourself. And macOS on arm can run
> x86_64
> binaries just fine

Of course - forgot about that 😊 

Thanks
sw
_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:34         ` softworkz .
  2025-05-28  8:39           ` Martin Storsjö
@ 2025-05-28  8:43           ` Christopher Snowhill
  1 sibling, 0 replies; 21+ messages in thread
From: Christopher Snowhill @ 2025-05-28  8:43 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed May 28, 2025 at 1:34 AM PDT, softworkz . wrote:
>
>
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> Martin Storsjö
>> Sent: Mittwoch, 28. Mai 2025 10:29
>> To: FFmpeg development discussions and patches <ffmpeg-
>> devel@ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
>> 
>> On Wed, 28 May 2025, softworkz . wrote:
>> 
>> >> -----Original Message-----
>> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> >> Christopher Snowhill
>> >> Sent: Mittwoch, 28. Mai 2025 09:40
>> >> To: FFmpeg development discussions and patches <ffmpeg-
>> >> devel@ffmpeg.org>
>> >> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
>> >>
>> >> On Tue May 27, 2025 at 10:54 PM PDT, Martin Storsjö wrote:
>> >>> On Tue, 27 May 2025, softworkz . wrote:
>> >>>
>> >>>> Hi,
>> >>>>
>> >>>> I have an issue with the CI builds for Mac in a way that it
>> prints
>> >>>> tons of lines like this:
>> >>>>
>> >>>> ld: warning: no platform load command found in
>> >> 'libavcodec/libavcodec.a[1008](sao_10bit.o)', assuming: macOS
>> >>>> ld: warning: no platform load command found in
>> >> 'libavcodec/libavcodec.a[1009](hpeldsp.o)', assuming: macOS
>> >>>> ld: warning: no platform load command found in
>> >> 'libavcodec/libavcodec.a[1011](huffyuvdsp.o)', assuming: macOS
>> >>>> ld: warning: no platform load command found in
>> >> 'libavcodec/libavcodec.a[1013](huffyuvencdsp.o)', assuming: macOS
>> >>>>
>> >>>>
>> >>>> These are all about X86AM output. I've had those lines for all .o
>> >> files
>> >>>> before and was able to get rid of them by adding flags like
>> below.
>> >>>>
>> >>>> Does anybody know how I can avoid those lines for the X86ASM
>> output
>> >> as well?
>> >>>> (don't know much about building for Apple)
>> >>>
>> >>> These warnings appeared since the new linker in Xcode 15.0, 1.5
>> >> years ago.
>> >>> I'm not aware of a flag for silencing these warnings; the only way
>> >> I'm
>> >>> aware of is to force using the old linker by passing -Wl,-
>> >> ld_classic.
>> >>>
>> >>> These warnings would go away of nasm could produce the right
>> >> platform load
>> >>> commands; this is https://github.com/netwide-
>> assembler/nasm/pull/13,
>> >> but
>> >>> there hasn't been much progress on it. (And since the macOS
>> >> ecossytem
>> >>> mostly is moving away from x86, I guess there's progressively less
>> >> effort
>> >>> on it as well.)
>> >>>
>> >>> // Martin
>> >>
>> >> I do wonder how this is going, since I have never noticed such
>> >> messages
>> >> while building for x86 from an ARM machine. I continue to support
>> x86
>> >> machines all the way down to the minimum spec of current Xcode,
>> which
>> >> is
>> >> 10.13.
>> >
>> > I don't think you can cross-compile x86 assembler on an arm machine.
>> 
>> Why wouldn't you be able to do that? The assembler is an executable
>> like
>> any other, taking in source code and outputting object files. You can
>> run
>> that on any machine.
>
> I haven't seen any arm binary in nasm's MacOS package. 
> Is there a nasm package for arm? Then I'm wrong of course!

I install dependencies with Homebrew, both for x86 and arm. Though I
don't think I'm using any of them as static or dynamic links. Mostly
just nasm and company. I build the x86 and arm versions separately, with
x86 min speccing 10.13 and arm targeting 11.0. Then I use lipo to merge
them. I also only pick a selection of audio codecs and containers, and
no video support. Mainly because my project is an audio player. GPL3
licensed, so it shouldn't be terribly bad that I provide both binaries
and the scripts I use to do the building, as well as some unmerged
patches I apply.  I may some day bother to provide the source code as
well, if the license mandates I should have to do that, but I only take
unmodified source code, then apply a handful of patches I still need to
upstream. Just hadn't gotten around to dealing with filing those mails,
as well as designing the test metrics to go into FATE for all the
patches that may require new tests.

>
> Thanks
> sw
>
>
>
> _______________________________________________
> 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".

_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:27     ` Martin Storsjö
@ 2025-05-28  8:49       ` softworkz .
  2025-05-28  8:56         ` Marvin Scholz
  2025-05-28  8:58       ` softworkz .
  1 sibling, 1 reply; 21+ messages in thread
From: softworkz . @ 2025-05-28  8:49 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Martin Storsjö
> Sent: Mittwoch, 28. Mai 2025 10:27
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> 
> On Wed, 28 May 2025, softworkz . wrote:
> 
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >> Martin Storsjö
> >> Sent: Mittwoch, 28. Mai 2025 07:55
> >> To: FFmpeg development discussions and patches <ffmpeg-
> >> devel@ffmpeg.org>
> >> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> >>
> >> These warnings appeared since the new linker in Xcode 15.0, 1.5
> years
> >> ago.
> >> I'm not aware of a flag for silencing these warnings; the only way
> I'm
> >> aware of is to force using the old linker by passing -Wl,-
> ld_classic.
> >
> > Thanks for the tip. It works to the extent that it prevents those
> > messages from appearing and make completes successfully. But almost
> > all (4724) fate tests are failing, haven't tried to trace it down.
> 
> That sounds odd; it works fine for me (on an arm64 mac).

Can you spot any difference to my configure that could be the culprit?

./configure --pkg-config-flags="--static" --extra-libs="-lm" \
         --extra-cflags="-mmacosx-version-min=14.0" \
         --extra-ldflags="-mmacosx-version-min=14.0 -Wl,-ld_classic -Wl,-platform_version,macos,14.0,14.0" \
         --enable-gpl \
         --enable-nonfree \
         --enable-videotoolbox \
         --samples=fate-suite --disable-stripping \
         --disable-doc --disable-optimizations --disable-avx512 --enable-debug=3



> However this flag isn't a great solution either, since Xcode 16, the
> linker warns "ld: warning: -ld_classic is deprecated and will be
> removed
> in a future release".

I'm on a macos-14 machine for now, not sure about the Xcode version,
does it align to the OS version?


> > This led me to a reference indicating that YASM already does it
> right.
> > I tried to build with YASM instead. After disabling HEVC and VVC
> decoders
> > it ran almost to the end, but then it failed on tx_float:
> >
> > Warning: libavcodec/x86/vp9lpf.o
> > skipping strip -x
> > Warning: libavcodec/x86/vp9lpf.o
> > libavutil/x86/tx_float.asm:1936: error:
> > Warning: (PFA_15_FN:21) expression syntax
> > Warning: error
> > libavutil/x86/tx_float.asm:1937: error: (PFA_15_FN:21)
> > Warning: expression syntax error
> > make: *** [libavutil/x86/tx_float.o] Error
> >
> > I don't know whether it can be disabled in some way as it appears to
> be
> > a prerequisite for many codecs and filters?
> > Besides that, I suppose that YASM isn't a good idea at all, right?`
> 
> I'm not really familiar with the situation about x86 assemblers, but
> afaik
> yasm is much further behind on many other aspects.
> 
> > From a different angle - what do you think would be the most useful
> > Mac build for Patchwork CI in general?
> > The available runners are macos 13, 14 and 15 - all x86, there's no
> > arm yet.
> > And would it be better to use Clang like in case of your FATE
> machines?
> 
> I would recommend you to use the Apple provided Clang rather than GCC.


Okay good, I'll switch to that.


Thanks again
sw



_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:49       ` softworkz .
@ 2025-05-28  8:56         ` Marvin Scholz
  2025-05-28  9:08           ` softworkz .
  0 siblings, 1 reply; 21+ messages in thread
From: Marvin Scholz @ 2025-05-28  8:56 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



On 28 May 2025, at 10:49, softworkz . wrote:

>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> Martin Storsjö
>> Sent: Mittwoch, 28. Mai 2025 10:27
>> To: FFmpeg development discussions and patches <ffmpeg-
>> devel@ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
>>
>> On Wed, 28 May 2025, softworkz . wrote:
>>
>>>> -----Original Message-----
>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>>>> Martin Storsjö
>>>> Sent: Mittwoch, 28. Mai 2025 07:55
>>>> To: FFmpeg development discussions and patches <ffmpeg-
>>>> devel@ffmpeg.org>
>>>> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
>>>>
>>>> These warnings appeared since the new linker in Xcode 15.0, 1.5
>> years
>>>> ago.
>>>> I'm not aware of a flag for silencing these warnings; the only way
>> I'm
>>>> aware of is to force using the old linker by passing -Wl,-
>> ld_classic.
>>>
>>> Thanks for the tip. It works to the extent that it prevents those
>>> messages from appearing and make completes successfully. But almost
>>> all (4724) fate tests are failing, haven't tried to trace it down.
>>
>> That sounds odd; it works fine for me (on an arm64 mac).
>
> Can you spot any difference to my configure that could be the culprit?
>
> ./configure --pkg-config-flags="--static" --extra-libs="-lm" \

The extra libs here should not be needed.

>          --extra-cflags="-mmacosx-version-min=14.0" \
>          --extra-ldflags="-mmacosx-version-min=14.0 -Wl,-ld_classic -Wl,-platform_version,macos,14.0,14.0" \

Why are you using platform_version? That should not be necessary.

Also while using the old linker would help with these warnings, I dont think its a good thing to
do in CI as we would miss issues that only happen with the new linker…

>          --enable-gpl \
>          --enable-nonfree \
>          --enable-videotoolbox \
>          --samples=fate-suite --disable-stripping \
>          --disable-doc --disable-optimizations --disable-avx512 --enable-debug=3
>
>
>
>> However this flag isn't a great solution either, since Xcode 16, the
>> linker warns "ld: warning: -ld_classic is deprecated and will be
>> removed
>> in a future release".
>
> I'm on a macos-14 machine for now, not sure about the Xcode version,
> does it align to the OS version?
>
>
>>> This led me to a reference indicating that YASM already does it
>> right.
>>> I tried to build with YASM instead. After disabling HEVC and VVC
>> decoders
>>> it ran almost to the end, but then it failed on tx_float:
>>>
>>> Warning: libavcodec/x86/vp9lpf.o
>>> skipping strip -x
>>> Warning: libavcodec/x86/vp9lpf.o
>>> libavutil/x86/tx_float.asm:1936: error:
>>> Warning: (PFA_15_FN:21) expression syntax
>>> Warning: error
>>> libavutil/x86/tx_float.asm:1937: error: (PFA_15_FN:21)
>>> Warning: expression syntax error
>>> make: *** [libavutil/x86/tx_float.o] Error
>>>
>>> I don't know whether it can be disabled in some way as it appears to
>> be
>>> a prerequisite for many codecs and filters?
>>> Besides that, I suppose that YASM isn't a good idea at all, right?`
>>
>> I'm not really familiar with the situation about x86 assemblers, but
>> afaik
>> yasm is much further behind on many other aspects.
>>
>>> From a different angle - what do you think would be the most useful
>>> Mac build for Patchwork CI in general?
>>> The available runners are macos 13, 14 and 15 - all x86, there's no
>>> arm yet.
>>> And would it be better to use Clang like in case of your FATE
>> machines?
>>
>> I would recommend you to use the Apple provided Clang rather than GCC.
>
>
> Okay good, I'll switch to that.
>
>
> Thanks again
> sw
>
>
>
> _______________________________________________
> 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".
_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:27     ` Martin Storsjö
  2025-05-28  8:49       ` softworkz .
@ 2025-05-28  8:58       ` softworkz .
  2025-05-28  9:02         ` Martin Storsjö
  1 sibling, 1 reply; 21+ messages in thread
From: softworkz . @ 2025-05-28  8:58 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Martin Storsjö
> Sent: Mittwoch, 28. Mai 2025 10:27
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM

As we are talking about Mac builds - have you ever looked into that
fate test that is failing every once in a while:

fate-ffmpeg-fix_sub_duration_heartbeat

I've seen it at least once on fate.ffmpeg.org at a Mac runner report 
and it's happening on the CI builds as well sometimes.


Thanks
sw

_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:58       ` softworkz .
@ 2025-05-28  9:02         ` Martin Storsjö
  2025-05-28  9:05           ` softworkz .
  0 siblings, 1 reply; 21+ messages in thread
From: Martin Storsjö @ 2025-05-28  9:02 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed, 28 May 2025, softworkz . wrote:

>
>
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> Martin Storsjö
>> Sent: Mittwoch, 28. Mai 2025 10:27
>> To: FFmpeg development discussions and patches <ffmpeg-
>> devel@ffmpeg.org>
>> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
>
> As we are talking about Mac builds - have you ever looked into that
> fate test that is failing every once in a while:
>
> fate-ffmpeg-fix_sub_duration_heartbeat
>
> I've seen it at least once on fate.ffmpeg.org at a Mac runner report
> and it's happening on the CI builds as well sometimes.

I haven't looked into in detail it myself, but it is a known issue since 
some of the ffmepg multithreading work a couple years ago. It does happen 
occasionally in all build configurations, more or less often.

// 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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  9:02         ` Martin Storsjö
@ 2025-05-28  9:05           ` softworkz .
  0 siblings, 0 replies; 21+ messages in thread
From: softworkz . @ 2025-05-28  9:05 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Martin Storsjö
> Sent: Mittwoch, 28. Mai 2025 11:02
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> 
> On Wed, 28 May 2025, softworkz . wrote:
> 
> >
> >
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >> Martin Storsjö
> >> Sent: Mittwoch, 28. Mai 2025 10:27
> >> To: FFmpeg development discussions and patches <ffmpeg-
> >> devel@ffmpeg.org>
> >> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> >
> > As we are talking about Mac builds - have you ever looked into that
> > fate test that is failing every once in a while:
> >
> > fate-ffmpeg-fix_sub_duration_heartbeat
> >
> > I've seen it at least once on fate.ffmpeg.org at a Mac runner report
> > and it's happening on the CI builds as well sometimes.
> 
> I haven't looked into in detail it myself, but it is a known issue
> since
> some of the ffmepg multithreading work a couple years ago. It does
> happen
> occasionally in all build configurations, more or less often.

Yup. I thought about patching it in the build, but that's ugly. 
Probably it's better to just disable that test for Mac in the 
code..

Thanks
sw





_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  8:56         ` Marvin Scholz
@ 2025-05-28  9:08           ` softworkz .
  2025-05-28 10:05             ` softworkz .
  0 siblings, 1 reply; 21+ messages in thread
From: softworkz . @ 2025-05-28  9:08 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Marvin Scholz
> Sent: Mittwoch, 28. Mai 2025 10:57
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> 
> 
> 
> On 28 May 2025, at 10:49, softworkz . wrote:
> 
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >> Martin Storsjö
> >> Sent: Mittwoch, 28. Mai 2025 10:27
> >> To: FFmpeg development discussions and patches <ffmpeg-
> >> devel@ffmpeg.org>
> >> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> >>
> >> On Wed, 28 May 2025, softworkz . wrote:
> >>
> >>>> -----Original Message-----
> >>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >>>> Martin Storsjö
> >>>> Sent: Mittwoch, 28. Mai 2025 07:55
> >>>> To: FFmpeg development discussions and patches <ffmpeg-
> >>>> devel@ffmpeg.org>
> >>>> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> >>>>
> >>>> These warnings appeared since the new linker in Xcode 15.0, 1.5
> >> years
> >>>> ago.
> >>>> I'm not aware of a flag for silencing these warnings; the only
> way
> >> I'm
> >>>> aware of is to force using the old linker by passing -Wl,-
> >> ld_classic.
> >>>
> >>> Thanks for the tip. It works to the extent that it prevents those
> >>> messages from appearing and make completes successfully. But
> almost
> >>> all (4724) fate tests are failing, haven't tried to trace it down.
> >>
> >> That sounds odd; it works fine for me (on an arm64 mac).
> >
> > Can you spot any difference to my configure that could be the
> culprit?
> >
> > ./configure --pkg-config-flags="--static" --extra-libs="-lm" \
> 
> The extra libs here should not be needed.

Okay, thanks.


> >          --extra-cflags="-mmacosx-version-min=14.0" \
> >          --extra-ldflags="-mmacosx-version-min=14.0 -Wl,-ld_classic
> -Wl,-platform_version,macos,14.0,14.0" \
> 
> Why are you using platform_version? That should not be necessary.

Those were all attempts for getting rid of those log messages. It helped
for the non-asm objs, then I wasn't sure anymore which one did it and
kept it.


> Also while using the old linker would help with these warnings, I dont
> think its a good thing to
> do in CI as we would miss issues that only happen with the new linker…

That's a valid point for sure. Another option would be to just disable
nasm. When it's the exact same tool on all platforms, it might not be
needed to run that compilation on Mac? I'm not sure..


Thanks
sw

_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28  9:08           ` softworkz .
@ 2025-05-28 10:05             ` softworkz .
  2025-05-28 10:17               ` Martin Storsjö
  0 siblings, 1 reply; 21+ messages in thread
From: softworkz . @ 2025-05-28 10:05 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> softworkz .
> Sent: Mittwoch, 28. Mai 2025 11:09
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM

[..]
> > > Can you spot any difference to my configure that could be the
> > culprit?
> > >
> > > ./configure --pkg-config-flags="--static" --extra-libs="-lm" \
> >
> > The extra libs here should not be needed.
> 
> Okay, thanks.
> 
> 
> > Also while using the old linker would help with these warnings, I
> dont
> > think its a good thing to
> > do in CI as we would miss issues that only happen with the new
> linker…
> 
> That's a valid point for sure. Another option would be to just disable
> nasm. When it's the exact same tool on all platforms, it might not be
> needed to run that compilation on Mac? I'm not sure..

So, now I've 

- Switched to Clang
- Kept nasm
- Removed ld_classic

All seems well (besides the annoying "platform-load" warnings):

https://dev.azure.com/githubsync/ffmpeg/_build/results?buildId=90983&view=logs


> > I haven't looked into in detail it myself, but it is a known issue
> > since
> > some of the ffmepg multithreading work a couple years ago. It does
> > happen
> > occasionally in all build configurations, more or less often.
> 
> Yup. I thought about patching it in the build, but that's ugly.
> Probably it's better to just disable that test for Mac in the
> code..

PS: If somebody knows a trick to exclude a single fate test, please tell..


Thanks, Martin & Marvin,
consider those builders as FFmpeg assets, when you want to have anything  
changed, just let me know.

sw

_______________________________________________
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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28 10:05             ` softworkz .
@ 2025-05-28 10:17               ` Martin Storsjö
  2025-05-28 23:19                 ` softworkz .
  0 siblings, 1 reply; 21+ messages in thread
From: Martin Storsjö @ 2025-05-28 10:17 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed, 28 May 2025, softworkz . wrote:

>>> I haven't looked into in detail it myself, but it is a known issue
>>> since
>>> some of the ffmepg multithreading work a couple years ago. It does
>>> happen
>>> occasionally in all build configurations, more or less often.
>>
>> Yup. I thought about patching it in the build, but that's ugly.
>> Probably it's better to just disable that test for Mac in the
>> code..
>
> PS: If somebody knows a trick to exclude a single fate test, please tell..

You can add --ignore-tests="ffmpeg-fix_sub_duration_heartbeat" to your 
configure line.

// 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] 21+ messages in thread

* Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
  2025-05-28 10:17               ` Martin Storsjö
@ 2025-05-28 23:19                 ` softworkz .
  0 siblings, 0 replies; 21+ messages in thread
From: softworkz . @ 2025-05-28 23:19 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Martin Storsjö
> Sent: Mittwoch, 28. Mai 2025 12:17
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] Building for Mac x86 with GCC & NASM
> 
> On Wed, 28 May 2025, softworkz . wrote:
> 
> >>> I haven't looked into in detail it myself, but it is a known issue
> >>> since
> >>> some of the ffmepg multithreading work a couple years ago. It does
> >>> happen
> >>> occasionally in all build configurations, more or less often.
> >>
> >> Yup. I thought about patching it in the build, but that's ugly.
> >> Probably it's better to just disable that test for Mac in the
> >> code..
> >
> > PS: If somebody knows a trick to exclude a single fate test, please
> tell..
> 
> You can add --ignore-tests="ffmpeg-fix_sub_duration_heartbeat" to your
> configure line.
> 
> // Martin
> 
> _______________________________________________

Ahh...!

It works on a local Linux, but strangely not on the MacOS builder: It 
shows the test but no IGNORED line, even though the configure output
is listing it (and commands are the same on Linux).

Since the test hasn't failed yet, I don't know whether just the IGNORED
line is missing or the test isn't actually ignored.

Time will tell, though.

Thanks a lot,
sw
_______________________________________________
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] 21+ messages in thread

end of thread, other threads:[~2025-05-28 23:20 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-27 22:23 [FFmpeg-devel] Building for Mac x86 with GCC & NASM softworkz .
2025-05-28  5:54 ` Martin Storsjö
2025-05-28  7:39   ` Christopher Snowhill
2025-05-28  8:12     ` softworkz .
2025-05-28  8:28       ` Martin Storsjö
2025-05-28  8:34         ` softworkz .
2025-05-28  8:39           ` Martin Storsjö
2025-05-28  8:43             ` softworkz .
2025-05-28  8:43           ` Christopher Snowhill
2025-05-28  8:38       ` Christopher Snowhill
2025-05-28  8:11   ` softworkz .
2025-05-28  8:27     ` Martin Storsjö
2025-05-28  8:49       ` softworkz .
2025-05-28  8:56         ` Marvin Scholz
2025-05-28  9:08           ` softworkz .
2025-05-28 10:05             ` softworkz .
2025-05-28 10:17               ` Martin Storsjö
2025-05-28 23:19                 ` softworkz .
2025-05-28  8:58       ` softworkz .
2025-05-28  9:02         ` Martin Storsjö
2025-05-28  9:05           ` softworkz .

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