From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 671D544DA6 for ; Fri, 23 Dec 2022 20:21:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1F11568BB94; Fri, 23 Dec 2022 22:21:45 +0200 (EET) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 66ED3680195 for ; Fri, 23 Dec 2022 22:21:39 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 5F923E0003 for ; Fri, 23 Dec 2022 20:21:37 +0000 (UTC) Date: Fri, 23 Dec 2022 21:21:36 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20221223202136.GH3806951@pb2> References: <1653614161.1115544.1671790568974@mail1.libero.it> <1658097660.1149740.1671807871813@mail1.libero.it> MIME-Version: 1.0 In-Reply-To: <1658097660.1149740.1671807871813@mail1.libero.it> Subject: Re: [FFmpeg-devel] [PATCH] ffmpeg-3.4.12 does not build (i686-w64-mingw32) X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============7512565893452963964==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7512565893452963964== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uVUWjn10SGL+MBGw" Content-Disposition: inline --uVUWjn10SGL+MBGw Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 23, 2022 at 04:04:31PM +0100, Carlo Bramini wrote: > Hello, >=20 > 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: >=20 > > $ make V=3D1 > > i686-w64-mingw32-windres -I. -Isrc/ --preprocessor "i686-w64-mingw32-gc= c -E -xc-header -DRC_INVOKED -MMD -MF libavdevice/avdeviceres.d -MT libavde= vice/avdeviceres.o" -o libavdevice/avdeviceres.o /home/carlo/packages/ffmpe= g/mingw64-i686-ffmpeg-3.4.12-1.noarch/src/ffmpeg-3.4.12/libavdevice/avdevic= eres.rc > > /bin/sh: i686-w64-mingw32-gcc -E -xc-header -DRC_INVOKED -MMD -MF libav= device/avdeviceres.d -MT libavdevice/avdeviceres.o: No such file or directo= ry > > make: *** [/home/carlo/packages/ffmpeg/mingw64-i686-ffmpeg-3.4.12-1.noa= rch/src/ffmpeg-3.4.12/ffbuild/common.mak:86: libavdevice/avdeviceres.o] Err= or 1 >=20 > I found a solution by comparing ffbuild/common.mak between this version a= nd 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 fix= ing 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. >=20 > Sincerely, >=20 > Carlo Bramini. > --- origsrc/ffmpeg-3.4.12/ffbuild/common.mak 2022-10-27 22:21:00.00000000= 0 +0200 > +++ src/ffmpeg-3.4.12/ffbuild/common.mak 2022-12-23 10:46:32.733625900 +0= 100 > @@ -83,7 +83,7 @@ COMPILE_NVCC =3D $(call COMPILE,NVCC) > -$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@) > =20 > %.o: %.rc > - $(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES) -E -xc-header -DRC_I= NVOKED $(CC_DEPFLAGS)" -o $@ $< > + $(WINDRES) $(IFLAGS) $(foreach ARG,$(CC_DEPFLAGS),--preprocessor-arg "$= (ARG)") -o $@ $< > =20 > %.i: %.c > $(CC) $(CCFLAGS) $(CC_E) $< This is the patch, you seem talking about. commit f9626d1065c43f1d51afe66bdf988b9f33729440 Author: Martin Storsj=F6 Date: Sat May 15 00:42:38 2021 +0300 ffbuild: Avoid using the --preprocessor argument to windres =20 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). =20 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. =20 Based on a patch by Kyle Schwartz. =20 [1] https://sourceware.org/bugzilla/show_bug.cgi?id=3D27594 =20 Signed-off-by: Martin Storsj=F6 [...] --=20 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 --uVUWjn10SGL+MBGw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY6YNyQAKCRBhHseHBAsP q8cSAJ9rQS5mQIc4ukVHZ579JwoWEkx4TgCeOuQGPDEahZy93bON6mh2B++AUGA= =Izpm -----END PGP SIGNATURE----- --uVUWjn10SGL+MBGw-- --===============7512565893452963964== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============7512565893452963964==--