All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/ffmpeg: add -latomic to libavformat.pc
@ 2021-08-06 14:36 Fabrice Fontaine
  2021-08-07  9:50 ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Fontaine @ 2021-08-06 14:36 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 libavformat.pc

Fixes:
 - http://autobuild.buildroot.org/results/62ec618e40081a250b8129ec6f5a178eb06fba1d

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-add-extralibs-to-extralibs_avformat.patch | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch

diff --git a/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch b/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch
new file mode 100644
index 0000000000..f4a2f75e59
--- /dev/null
+++ b/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch
@@ -0,0 +1,30 @@
+From 2aee898241246d293bed9b609926b4a8014dfcb9 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_avformat
+
+Add extralibs to 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 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index 0bb3a7cf2b..cb366c3ba6 100755
+--- a/configure
++++ b/configure
+@@ -7604,7 +7604,7 @@ LIBPREF=${LIBPREF}
+ LIBSUF=${LIBSUF}
+ extralibs_avutil="$avutil_extralibs"
+ extralibs_avcodec="$avcodec_extralibs"
+-extralibs_avformat="$avformat_extralibs"
++extralibs_avformat="$avformat_extralibs $extralibs"
+ extralibs_avdevice="$avdevice_extralibs"
+ extralibs_avfilter="$avfilter_extralibs"
+ extralibs_avresample="$avresample_extralibs"
+-- 
+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] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/ffmpeg: add -latomic to libavformat.pc
  2021-08-06 14:36 [Buildroot] [PATCH 1/1] package/ffmpeg: add -latomic to libavformat.pc Fabrice Fontaine
@ 2021-08-07  9:50 ` Yann E. MORIN
  2021-08-07 15:01   ` Fabrice Fontaine
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2021-08-07  9:50 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Bernd Kuhls, Mahyar Koshkouei, buildroot

Fabrice, All,

On 2021-08-06 16:36 +0200, Fabrice Fontaine spake thusly:
> -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 libavformat.pc
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/62ec618e40081a250b8129ec6f5a178eb06fba1d
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...-add-extralibs-to-extralibs_avformat.patch | 30 +++++++++++++++++++
>  1 file changed, 30 insertions(+)
>  create mode 100644 package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch
> 
> diff --git a/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch b/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch
> new file mode 100644
> index 0000000000..f4a2f75e59
> --- /dev/null
> +++ b/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch
> @@ -0,0 +1,30 @@
> +From 2aee898241246d293bed9b609926b4a8014dfcb9 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_avformat
> +
> +Add extralibs to 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 | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/configure b/configure
> +index 0bb3a7cf2b..cb366c3ba6 100755
> +--- a/configure
> ++++ b/configure
> +@@ -7604,7 +7604,7 @@ LIBPREF=${LIBPREF}
> + LIBSUF=${LIBSUF}
> + extralibs_avutil="$avutil_extralibs"
> + extralibs_avcodec="$avcodec_extralibs"
> +-extralibs_avformat="$avformat_extralibs"
> ++extralibs_avformat="$avformat_extralibs $extralibs"
> + extralibs_avdevice="$avdevice_extralibs"
> + extralibs_avfilter="$avfilter_extralibs"
> + extralibs_avresample="$avresample_extralibs"

Shouldn't we also add $extralibs to all, instead of just avformat?

Regards,
Yann E. MORIN.

> +-- 
> +2.30.2
> +
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/ffmpeg: add -latomic to libavformat.pc
  2021-08-07  9:50 ` Yann E. MORIN
@ 2021-08-07 15:01   ` Fabrice Fontaine
  2021-08-07 17:07     ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Fontaine @ 2021-08-07 15:01 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bernd Kuhls, Mahyar Koshkouei, Buildroot Mailing List

Yann,

Le sam. 7 août 2021 à 11:50, Yann E. MORIN <yann.morin.1998@free.fr> a écrit :
>
> Fabrice, All,
>
> On 2021-08-06 16:36 +0200, Fabrice Fontaine spake thusly:
> > -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 libavformat.pc
> >
> > Fixes:
> >  - http://autobuild.buildroot.org/results/62ec618e40081a250b8129ec6f5a178eb06fba1d
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  ...-add-extralibs-to-extralibs_avformat.patch | 30 +++++++++++++++++++
> >  1 file changed, 30 insertions(+)
> >  create mode 100644 package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch
> >
> > diff --git a/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch b/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch
> > new file mode 100644
> > index 0000000000..f4a2f75e59
> > --- /dev/null
> > +++ b/package/ffmpeg/0004-configure-add-extralibs-to-extralibs_avformat.patch
> > @@ -0,0 +1,30 @@
> > +From 2aee898241246d293bed9b609926b4a8014dfcb9 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_avformat
> > +
> > +Add extralibs to 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 | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/configure b/configure
> > +index 0bb3a7cf2b..cb366c3ba6 100755
> > +--- a/configure
> > ++++ b/configure
> > +@@ -7604,7 +7604,7 @@ LIBPREF=${LIBPREF}
> > + LIBSUF=${LIBSUF}
> > + extralibs_avutil="$avutil_extralibs"
> > + extralibs_avcodec="$avcodec_extralibs"
> > +-extralibs_avformat="$avformat_extralibs"
> > ++extralibs_avformat="$avformat_extralibs $extralibs"
> > + extralibs_avdevice="$avdevice_extralibs"
> > + extralibs_avfilter="$avfilter_extralibs"
> > + extralibs_avresample="$avresample_extralibs"
>
> Shouldn't we also add $extralibs to all, instead of just avformat?
I don't know if all ffmpeg libraries depend on libatomic so I only
updated avformat as it is enough to fix the build failure but I can
update all of them if you think it's better.
>
> Regards,
> Yann E. MORIN.
>
> > +--
> > +2.30.2
> > +
> > --
> > 2.30.2
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/ffmpeg: add -latomic to libavformat.pc
  2021-08-07 15:01   ` Fabrice Fontaine
@ 2021-08-07 17:07     ` Yann E. MORIN
  0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2021-08-07 17:07 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Bernd Kuhls, Mahyar Koshkouei, Buildroot Mailing List

Fabrice, All,

On 2021-08-07 17:01 +0200, Fabrice Fontaine spake thusly:
> Le sam. 7 août 2021 à 11:50, Yann E. MORIN <yann.morin.1998@free.fr> a écrit :
> > On 2021-08-06 16:36 +0200, Fabrice Fontaine spake thusly:
> > > -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
[--SNIP--]
> > > So add a patch to add extralibs (and so -latomic) to libavformat.pc
[--SNIP--]
> > > +diff --git a/configure b/configure
> > > +index 0bb3a7cf2b..cb366c3ba6 100755
> > > +--- a/configure
> > > ++++ b/configure
> > > +@@ -7604,7 +7604,7 @@ LIBPREF=${LIBPREF}
> > > + LIBSUF=${LIBSUF}
> > > + extralibs_avutil="$avutil_extralibs"
> > > + extralibs_avcodec="$avcodec_extralibs"
> > > +-extralibs_avformat="$avformat_extralibs"
> > > ++extralibs_avformat="$avformat_extralibs $extralibs"
> > > + extralibs_avdevice="$avdevice_extralibs"
> > > + extralibs_avfilter="$avfilter_extralibs"
> > > + extralibs_avresample="$avresample_extralibs"
> >
> > Shouldn't we also add $extralibs to all, instead of just avformat?
> I don't know if all ffmpeg libraries depend on libatomic so I only
> updated avformat as it is enough to fix the build failure but I can
> update all of them if you think it's better.

Thing is, $extralibs is used in the link of all ffmpeg libraries, so it
would make sense it is also added to all the per-library extralibs.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-07 17:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 14:36 [Buildroot] [PATCH 1/1] package/ffmpeg: add -latomic to libavformat.pc Fabrice Fontaine
2021-08-07  9:50 ` Yann E. MORIN
2021-08-07 15:01   ` Fabrice Fontaine
2021-08-07 17:07     ` Yann E. MORIN

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.