* [Buildroot] [PATCH v2, 1/1] package/ffmpeg: add -latomic to pkg-config files
@ 2021-08-07 19:40 Fabrice Fontaine
2021-08-08 21:22 ` Thomas Petazzoni
2021-09-04 20:01 ` Peter Korsgaard
0 siblings, 2 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2021-08-07 19:40 UTC (permalink / raw)
To: buildroot; +Cc: Bernd Kuhls, Mahyar Koshkouei, Fabrice Fontaine
-latomic was added to extralibs to fix static build of ffmpeg in commit
fc8798197b57488a852e2c14b4677b5eb0114a0b. However, extralibs is not
added to libavformat.pc resulting in the following static build failure
of motion:
/home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libavformat.a(fifo.o): in function `fifo_init':
/home/buildroot/autobuild/instance-1/output-1/build/ffmpeg-4.4/libavformat/fifo.c:519: undefined reference to `__atomic_store_8'
So add a patch to add extralibs (and so -latomic) to all pkg-config
files
Fixes:
- http://autobuild.buildroot.org/results/62ec618e40081a250b8129ec6f5a178eb06fba1d
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2 (after review of Yann E. Morin):
- Add extralibs to all pkg-config files and not only libavformat.pc
| 47 +++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 package/ffmpeg/0004-configure-add-extralibs-to-extralibs_xxx.patch
--git a/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_xxx.patch b/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_xxx.patch
new file mode 100644
index 0000000000..dbc19c1cec
--- /dev/null
+++ b/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_xxx.patch
@@ -0,0 +1,47 @@
+From 0c288853630b7b4e004774c39945d4a804afcfa8 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Fri, 6 Aug 2021 09:17:20 +0200
+Subject: [PATCH] configure: add extralibs to extralibs_xxx
+
+Add extralibs to extralibs_xxx (e.g. extralibs_avformat) to allow
+applications such as motion to retrieve ffmpeg dependencies such as
+-latomic through pkg-config
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: not upstreamable]
+---
+ configure | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/configure b/configure
+index 0bb3a7cf2b..3bda99e415 100755
+--- a/configure
++++ b/configure
+@@ -7602,15 +7602,15 @@ rpath=$(enabled rpath && echo "-Wl,-rpath,\${libdir}")
+ source_path=${source_path}
+ LIBPREF=${LIBPREF}
+ LIBSUF=${LIBSUF}
+-extralibs_avutil="$avutil_extralibs"
+-extralibs_avcodec="$avcodec_extralibs"
+-extralibs_avformat="$avformat_extralibs"
+-extralibs_avdevice="$avdevice_extralibs"
+-extralibs_avfilter="$avfilter_extralibs"
+-extralibs_avresample="$avresample_extralibs"
+-extralibs_postproc="$postproc_extralibs"
+-extralibs_swscale="$swscale_extralibs"
+-extralibs_swresample="$swresample_extralibs"
++extralibs_avutil="$avutil_extralibs $extralibs"
++extralibs_avcodec="$avcodec_extralibs $extralibs"
++extralibs_avformat="$avformat_extralibs $extralibs"
++extralibs_avdevice="$avdevice_extralibs $extralibs"
++extralibs_avfilter="$avfilter_extralibs $extralibs"
++extralibs_avresample="$avresample_extralibs $extralibs"
++extralibs_postproc="$postproc_extralibs $extralibs"
++extralibs_swscale="$swscale_extralibs $extralibs"
++extralibs_swresample="$swresample_extralibs $extralibs"
+ EOF
+
+ for lib in $LIBRARY_LIST; do
+--
+2.30.2
+
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH v2, 1/1] package/ffmpeg: add -latomic to pkg-config files
2021-08-07 19:40 [Buildroot] [PATCH v2, 1/1] package/ffmpeg: add -latomic to pkg-config files Fabrice Fontaine
@ 2021-08-08 21:22 ` Thomas Petazzoni
2021-08-08 21:30 ` Fabrice Fontaine
2021-09-04 20:01 ` Peter Korsgaard
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2021-08-08 21:22 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Bernd Kuhls, Mahyar Koshkouei, buildroot
On Sat, 7 Aug 2021 21:40:31 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> -latomic was added to extralibs to fix static build of ffmpeg in commit
> fc8798197b57488a852e2c14b4677b5eb0114a0b. However, extralibs is not
> added to libavformat.pc resulting in the following static build failure
> of motion:
>
> /home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libavformat.a(fifo.o): in function `fifo_init':
> /home/buildroot/autobuild/instance-1/output-1/build/ffmpeg-4.4/libavformat/fifo.c:519: undefined reference to `__atomic_store_8'
>
> So add a patch to add extralibs (and so -latomic) to all pkg-config
> files
>
> Fixes:
> - http://autobuild.buildroot.org/results/62ec618e40081a250b8129ec6f5a178eb06fba1d
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2 (after review of Yann E. Morin):
> - Add extralibs to all pkg-config files and not only libavformat.pc
Applied to master, thanks. Why do you consider the patch not acceptable
upstream?
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH v2, 1/1] package/ffmpeg: add -latomic to pkg-config files
2021-08-08 21:22 ` Thomas Petazzoni
@ 2021-08-08 21:30 ` Fabrice Fontaine
2021-08-09 7:31 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2021-08-08 21:30 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Bernd Kuhls, Mahyar Koshkouei, Buildroot Mailing List
Le dim. 8 août 2021 à 23:22, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a écrit :
>
> On Sat, 7 Aug 2021 21:40:31 +0200
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
> > -latomic was added to extralibs to fix static build of ffmpeg in commit
> > fc8798197b57488a852e2c14b4677b5eb0114a0b. However, extralibs is not
> > added to libavformat.pc resulting in the following static build failure
> > of motion:
> >
> > /home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/buildroot/autobuild/instance-1/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libavformat.a(fifo.o): in function `fifo_init':
> > /home/buildroot/autobuild/instance-1/output-1/build/ffmpeg-4.4/libavformat/fifo.c:519: undefined reference to `__atomic_store_8'
> >
> > So add a patch to add extralibs (and so -latomic) to all pkg-config
> > files
> >
> > Fixes:
> > - http://autobuild.buildroot.org/results/62ec618e40081a250b8129ec6f5a178eb06fba1d
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> > Changes v1 -> v2 (after review of Yann E. Morin):
> > - Add extralibs to all pkg-config files and not only libavformat.pc
>
> Applied to master, thanks. Why do you consider the patch not acceptable
> upstream?
Because I think it only makes sense because we're passing -latomic to
extralibs but I can try to get their feedback.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,
Fabrice
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH v2, 1/1] package/ffmpeg: add -latomic to pkg-config files
2021-08-08 21:30 ` Fabrice Fontaine
@ 2021-08-09 7:31 ` Thomas Petazzoni
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2021-08-09 7:31 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Bernd Kuhls, Mahyar Koshkouei, Buildroot Mailing List
On Sun, 8 Aug 2021 23:30:28 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> > Applied to master, thanks. Why do you consider the patch not acceptable
> > upstream?
> Because I think it only makes sense because we're passing -latomic to
> extralibs but I can try to get their feedback.
I think it does. If you pass extra libraries to link against, then the
.so files are linked against them. In a dynamic linking environment,
that's sufficient. But in a static linking environment, that requires
your .pc file having a Libs.private pointing to those extra libraries.
So I think there's an argument in favor of this, but only if those
extra libraries are added to Libs.private in the .pc file, not Libs.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH v2, 1/1] package/ffmpeg: add -latomic to pkg-config files
2021-08-07 19:40 [Buildroot] [PATCH v2, 1/1] package/ffmpeg: add -latomic to pkg-config files Fabrice Fontaine
2021-08-08 21:22 ` Thomas Petazzoni
@ 2021-09-04 20:01 ` Peter Korsgaard
1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2021-09-04 20:01 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Bernd Kuhls, Mahyar Koshkouei, buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> -latomic was added to extralibs to fix static build of ffmpeg in commit
> fc8798197b57488a852e2c14b4677b5eb0114a0b. However, extralibs is not
> added to libavformat.pc resulting in the following static build failure
> of motion:
> /home/buildroot/autobuild/instance-1/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/9.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
> /home/buildroot/autobuild/instance-1/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libavformat.a(fifo.o):
> in function `fifo_init':
> /home/buildroot/autobuild/instance-1/output-1/build/ffmpeg-4.4/libavformat/fifo.c:519:
> undefined reference to `__atomic_store_8'
> So add a patch to add extralibs (and so -latomic) to all pkg-config
> files
> Fixes:
> - http://autobuild.buildroot.org/results/62ec618e40081a250b8129ec6f5a178eb06fba1d
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2 (after review of Yann E. Morin):
> - Add extralibs to all pkg-config files and not only libavformat.pc
> ...igure-add-extralibs-to-extralibs_xxx.patch | 47 +++++++++++++++++++
> 1 file changed, 47 insertions(+)
> create mode 100644 package/ffmpeg/0004-configure-add-extralibs-to-extralibs_xxx.patch
Committed to 2021.05.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-09-04 20:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07 19:40 [Buildroot] [PATCH v2, 1/1] package/ffmpeg: add -latomic to pkg-config files Fabrice Fontaine
2021-08-08 21:22 ` Thomas Petazzoni
2021-08-08 21:30 ` Fabrice Fontaine
2021-08-09 7:31 ` Thomas Petazzoni
2021-09-04 20:01 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.