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] ffmpeg-3.4.12 does not build (i686-w64-mingw32)
       [not found] <1653614161.1115544.1671790568974@mail1.libero.it>
@ 2022-12-23 15:04 ` Carlo Bramini
  2022-12-23 20:21   ` Michael Niedermayer
  0 siblings, 1 reply; 3+ messages in thread
From: Carlo Bramini @ 2022-12-23 15:04 UTC (permalink / raw)
  To: ffmpeg-devel

[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]

Hello,

I tried to build ffmpeg-3.4.12, which is the last one supporting Windows XP, but it fails to compile the resource file for Windows.
Running verbose build, it prints this output on the console:

> $ make V=1
> i686-w64-mingw32-windres -I. -Isrc/ --preprocessor "i686-w64-mingw32-gcc -E -xc-header -DRC_INVOKED -MMD -MF libavdevice/avdeviceres.d -MT libavdevice/avdeviceres.o" -o libavdevice/avdeviceres.o /home/carlo/packages/ffmpeg/mingw64-i686-ffmpeg-3.4.12-1.noarch/src/ffmpeg-3.4.12/libavdevice/avdeviceres.rc
> /bin/sh: i686-w64-mingw32-gcc -E -xc-header -DRC_INVOKED -MMD -MF libavdevice/avdeviceres.d -MT libavdevice/avdeviceres.o: No such file or directory
> make: *** [/home/carlo/packages/ffmpeg/mingw64-i686-ffmpeg-3.4.12-1.noarch/src/ffmpeg-3.4.12/ffbuild/common.mak:86: libavdevice/avdeviceres.o] Error 1

I found a solution by comparing ffbuild/common.mak between this version and the latest 5.1.2, which has already fixed this bug.
So, I'm wondering if it could be possible to apply the same patch for fixing this tiny issue in the next maintenance release of 3.4.x branch, if it will happen in the future.
I attached that patch in this email for reference, if somebody can import that line from development sources.

Sincerely,

Carlo Bramini.

[-- Attachment #2: mingw64-i686-ffmpeg-3.4.12-1.src.patch.txt --]
[-- Type: text/plain, Size: 518 bytes --]

--- origsrc/ffmpeg-3.4.12/ffbuild/common.mak	2022-10-27 22:21:00.000000000 +0200
+++ src/ffmpeg-3.4.12/ffbuild/common.mak	2022-12-23 10:46:32.733625900 +0100
@@ -83,7 +83,7 @@ COMPILE_NVCC = $(call COMPILE,NVCC)
 	-$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)
 
 %.o: %.rc
-	$(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES) -E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)" -o $@ $<
+	$(WINDRES) $(IFLAGS) $(foreach ARG,$(CC_DEPFLAGS),--preprocessor-arg "$(ARG)") -o $@ $<
 
 %.i: %.c
 	$(CC) $(CCFLAGS) $(CC_E) $<

[-- Attachment #3: 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] 3+ messages in thread

* Re: [FFmpeg-devel] [PATCH] ffmpeg-3.4.12 does not build (i686-w64-mingw32)
  2022-12-23 15:04 ` [FFmpeg-devel] [PATCH] ffmpeg-3.4.12 does not build (i686-w64-mingw32) Carlo Bramini
@ 2022-12-23 20:21   ` Michael Niedermayer
  2022-12-24 12:25     ` Carlo Bramini
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Niedermayer @ 2022-12-23 20:21 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


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

On Fri, Dec 23, 2022 at 04:04:31PM +0100, Carlo Bramini wrote:
> Hello,
> 
> I tried to build ffmpeg-3.4.12, which is the last one supporting Windows XP, but it fails to compile the resource file for Windows.
> Running verbose build, it prints this output on the console:
> 
> > $ make V=1
> > i686-w64-mingw32-windres -I. -Isrc/ --preprocessor "i686-w64-mingw32-gcc -E -xc-header -DRC_INVOKED -MMD -MF libavdevice/avdeviceres.d -MT libavdevice/avdeviceres.o" -o libavdevice/avdeviceres.o /home/carlo/packages/ffmpeg/mingw64-i686-ffmpeg-3.4.12-1.noarch/src/ffmpeg-3.4.12/libavdevice/avdeviceres.rc
> > /bin/sh: i686-w64-mingw32-gcc -E -xc-header -DRC_INVOKED -MMD -MF libavdevice/avdeviceres.d -MT libavdevice/avdeviceres.o: No such file or directory
> > make: *** [/home/carlo/packages/ffmpeg/mingw64-i686-ffmpeg-3.4.12-1.noarch/src/ffmpeg-3.4.12/ffbuild/common.mak:86: libavdevice/avdeviceres.o] Error 1
> 
> I found a solution by comparing ffbuild/common.mak between this version and the latest 5.1.2, which has already fixed this bug.
> So, I'm wondering if it could be possible to apply the same patch for fixing this tiny issue in the next maintenance release of 3.4.x branch, if it will happen in the future.
> I attached that patch in this email for reference, if somebody can import that line from development sources.
> 
> Sincerely,
> 
> Carlo Bramini.

> --- origsrc/ffmpeg-3.4.12/ffbuild/common.mak	2022-10-27 22:21:00.000000000 +0200
> +++ src/ffmpeg-3.4.12/ffbuild/common.mak	2022-12-23 10:46:32.733625900 +0100
> @@ -83,7 +83,7 @@ COMPILE_NVCC = $(call COMPILE,NVCC)
>  	-$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)
>  
>  %.o: %.rc
> -	$(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES) -E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)" -o $@ $<
> +	$(WINDRES) $(IFLAGS) $(foreach ARG,$(CC_DEPFLAGS),--preprocessor-arg "$(ARG)") -o $@ $<
>  
>  %.i: %.c
>  	$(CC) $(CCFLAGS) $(CC_E) $<

This is the patch, you seem talking about.

commit f9626d1065c43f1d51afe66bdf988b9f33729440
Author: Martin Storsjö <martin@martin.st>
Date:   Sat May 15 00:42:38 2021 +0300

    ffbuild: Avoid using the --preprocessor argument to windres
    
    Instead use --preprocessor-arg; in binutils 2.36, the --preprocessor
    flag was changed so that it no longer accepts a string containing
    multiple arguments, but the whole --preprocessor argument is
    treated as the path to the preprocessor executable (where the path
    can contain spaces).
    
    It's currently unclear whether this behaviour will stay or if it
    is going to be reverted in the future, see discussion at [1]. Just
    to be safe, avoid using the --preprocessor argument. Don't redeclare
    the full preprocessing command, but just add the $(CC_DEPFLAGS) options.
    
    Based on a patch by Kyle Schwartz.
    
    [1] https://sourceware.org/bugzilla/show_bug.cgi?id=27594
    
    Signed-off-by: Martin Storsjö <martin@martin.st>


[...]


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"You are 36 times more likely to die in a bathtub than at the hands of a
terrorist. Also, you are 2.5 times more likely to become a president and
2 times more likely to become an astronaut, than to die in a terrorist
attack." -- Thoughty2


[-- 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] 3+ messages in thread

* Re: [FFmpeg-devel] [PATCH] ffmpeg-3.4.12 does not build (i686-w64-mingw32)
  2022-12-23 20:21   ` Michael Niedermayer
@ 2022-12-24 12:25     ` Carlo Bramini
  0 siblings, 0 replies; 3+ messages in thread
From: Carlo Bramini @ 2022-12-24 12:25 UTC (permalink / raw)
  To: FFmpeg development discussions and patches, Michael Niedermayer

Hello,

yes, that commit seems to be the one that include the needed fix.
Is it possible to import that change also into the next release of 3.4.x branch? Or do I need to open a new bug report?

Sincerely,

Carlo Bramini.

> Il 23/12/2022 21:21 Michael Niedermayer <michael@niedermayer.cc> ha scritto:
> 
>  
> On Fri, Dec 23, 2022 at 04:04:31PM +0100, Carlo Bramini wrote:
> > Hello,
> > 
> > I tried to build ffmpeg-3.4.12, which is the last one supporting Windows XP, but it fails to compile the resource file for Windows.
> > Running verbose build, it prints this output on the console:
> > 
> > > $ make V=1
> > > i686-w64-mingw32-windres -I. -Isrc/ --preprocessor "i686-w64-mingw32-gcc -E -xc-header -DRC_INVOKED -MMD -MF libavdevice/avdeviceres.d -MT libavdevice/avdeviceres.o" -o libavdevice/avdeviceres.o /home/carlo/packages/ffmpeg/mingw64-i686-ffmpeg-3.4.12-1.noarch/src/ffmpeg-3.4.12/libavdevice/avdeviceres.rc
> > > /bin/sh: i686-w64-mingw32-gcc -E -xc-header -DRC_INVOKED -MMD -MF libavdevice/avdeviceres.d -MT libavdevice/avdeviceres.o: No such file or directory
> > > make: *** [/home/carlo/packages/ffmpeg/mingw64-i686-ffmpeg-3.4.12-1.noarch/src/ffmpeg-3.4.12/ffbuild/common.mak:86: libavdevice/avdeviceres.o] Error 1
> > 
> > I found a solution by comparing ffbuild/common.mak between this version and the latest 5.1.2, which has already fixed this bug.
> > So, I'm wondering if it could be possible to apply the same patch for fixing this tiny issue in the next maintenance release of 3.4.x branch, if it will happen in the future.
> > I attached that patch in this email for reference, if somebody can import that line from development sources.
> > 
> > Sincerely,
> > 
> > Carlo Bramini.
> 
> > --- origsrc/ffmpeg-3.4.12/ffbuild/common.mak	2022-10-27 22:21:00.000000000 +0200
> > +++ src/ffmpeg-3.4.12/ffbuild/common.mak	2022-12-23 10:46:32.733625900 +0100
> > @@ -83,7 +83,7 @@ COMPILE_NVCC = $(call COMPILE,NVCC)
> >  	-$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)
> >  
> >  %.o: %.rc
> > -	$(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES) -E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)" -o $@ $<
> > +	$(WINDRES) $(IFLAGS) $(foreach ARG,$(CC_DEPFLAGS),--preprocessor-arg "$(ARG)") -o $@ $<
> >  
> >  %.i: %.c
> >  	$(CC) $(CCFLAGS) $(CC_E) $<
> 
> This is the patch, you seem talking about.
> 
> commit f9626d1065c43f1d51afe66bdf988b9f33729440
> Author: Martin Storsjö <martin@martin.st>
> Date:   Sat May 15 00:42:38 2021 +0300
> 
>     ffbuild: Avoid using the --preprocessor argument to windres
>     
>     Instead use --preprocessor-arg; in binutils 2.36, the --preprocessor
>     flag was changed so that it no longer accepts a string containing
>     multiple arguments, but the whole --preprocessor argument is
>     treated as the path to the preprocessor executable (where the path
>     can contain spaces).
>     
>     It's currently unclear whether this behaviour will stay or if it
>     is going to be reverted in the future, see discussion at [1]. Just
>     to be safe, avoid using the --preprocessor argument. Don't redeclare
>     the full preprocessing command, but just add the $(CC_DEPFLAGS) options.
>     
>     Based on a patch by Kyle Schwartz.
>     
>     [1] https://sourceware.org/bugzilla/show_bug.cgi?id=27594
>     
>     Signed-off-by: Martin Storsjö <martin@martin.st>
> 
> 
> [...]
> 
> 
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> "You are 36 times more likely to die in a bathtub than at the hands of a
> terrorist. Also, you are 2.5 times more likely to become a president and
> 2 times more likely to become an astronaut, than to die in a terrorist
> attack." -- Thoughty2
> 
> _______________________________________________
> 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] 3+ messages in thread

end of thread, other threads:[~2022-12-24 12:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1653614161.1115544.1671790568974@mail1.libero.it>
2022-12-23 15:04 ` [FFmpeg-devel] [PATCH] ffmpeg-3.4.12 does not build (i686-w64-mingw32) Carlo Bramini
2022-12-23 20:21   ` Michael Niedermayer
2022-12-24 12:25     ` Carlo Bramini

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