[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Mlt-devel] 6.18.0 fails to build on some architectures



On Mon, Dec 30, 2019 at 1:16 AM John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
Hi!

On 12/30/19 9:55 AM, Patrick Matthäi wrote:
> Ok the attached patch works fine :)
>
> Can you please push this patch to your repo?:
>
>
> diff -Naur mlt-6.18.0.orig/src/modules/avformat/Makefile mlt-6.18.0/src/modules/avformat/Makefile
> --- mlt-6.18.0.orig/src/modules/avformat/Makefile       2019-11-12 02:44:42.000000000 +0100
> +++ mlt-6.18.0/src/modules/avformat/Makefile    2019-12-19 09:51:18.816133573 +0100
> @@ -1,5 +1,5 @@
>  CFLAGS += -I../..
> -LDFLAGS += -L../../framework -lmlt -lpthread -lm
> +LDFLAGS += -L../../framework -lmlt -lpthread -lm -latomic

You should probably prepend "-latomic" with "--as-needed".

We have that already in an included makefile.
 

>  include ../../../config.mak
>  include config.mak
> diff -Naur mlt-6.18.0.orig/src/modules/avformat/producer_avformat.c mlt-6.18.0/src/modules/avformat/producer_avformat.c
> --- mlt-6.18.0.orig/src/modules/avformat/producer_avformat.c    2019-11-12 02:44:42.000000000 +0100
> +++ mlt-6.18.0/src/modules/avformat/producer_avformat.c 2019-12-19 09:50:07.476605820 +0100
> @@ -68,6 +68,12 @@
>  #define IMAGE_ALIGN (1)
>  #define VFR_THRESHOLD (3) // The minimum number of video frames with differing durations to be considered VFR.
>
> +#ifndef HAVE_ATOMIC_INT_FAST64
> +#  if !#defined(__arm__) && !#defined(__mips__) && !defined(__sh__)
> +#    define HAVE_ATOMIC_INT_FAST64 1
> +#  endif
> +#endif

Why the architecture-specific "#ifdefs" here?


That was an earlier attempt to work around the build problem not knowing what to do. It is not committed and not planning to do now. 
 
Note that the atomic issue is quite common as it is a result of a gcc
bug, see [1]. We have fixed lots of Debian packages in the past with
the exact same problem and normally it's a matter to manually link
against libatomic with an additional --as-needed.

Depending on your build system, you can test during the configure step
whether libatomic is needed or not and then add dynamically, see for
example [2].

Adrian

> [1] https://twitter.com/lporiginalg/status/1211407263451111424
> [2] https://salsa.debian.org/mariadb-team/mariadb-10.3/blob/master/debian/patches/c11_atomics.patch

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Thank you a lot for your help.


Reply to: