[Cin] Few patches for thirdparty (mostly for termux compilation)

Andrew Randrianasulu randrianasulu at gmail.com
Sat May 8 15:54:56 CEST 2021


I still can't link properly main cin executable, but coming closer with
just pthread stuff missing and two ac3 symbols:

===
cinelerra/cinelerra-5.1/cinelerra' make[2]: warning: -j14 forced in
submake: resetting jobserver mode. clang++ -o
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/cinelerra/../bin/cin
`cat armv8l/objs` /data/data/com.termux/files/usr/bin/ld:
/data/data/com.termux/files/usr/bin/ld: DWARF error: could not find
variable specification at offset 1e1 armv8l/file.o: in function
`File::get_options(FormatTools*, int,
int)':/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/cinelerra/file.C:176:
undefined reference to `FileAC3::get_parameters(BC_WindowBase*, Asset*,
BC_WindowBase*&, int, int, EDL*)' /data/data/com.termux/files/usr/bin/ld:
armv8l/file.o: in function `File::open_file(Preferences*, Asset*, int,
int)':
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/cinelerra/file.C:546:
undefined reference to `FileAC3::FileAC3(Asset*, File*)'
/data/data/com.termux/files/usr/bin/ld:
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/cinelerra/../guicast/armv8l/libguicast.a(thread.o):
in function `Thread::entrypoint(void*)':
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/guicast/thread.C:54:
undefined reference to `pthread_setcanceltype(int, int*)'
/data/data/com.termux/files/usr/bin/ld:
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/guicast/thread.C:56:
undefined reference to `pthread_setcancelstate(int, int*)'
/data/data/com.termux/files/usr/bin/ld:
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/cinelerra/../guicast/armv8l/libguicast.a(thread.o):
in function `Thread::cancel()':
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/guicast/thread.C:123:
undefined reference to `pthread_cancel(long)'
/data/data/com.termux/files/usr/bin/ld:
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/cinelerra/../guicast/armv8l/libguicast.a(thread.o):
in function `Thread::enable_cancel()':
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/guicast/thread.C:165:
undefined reference to `pthread_setcancelstate(int, int*)'
/data/data/com.termux/files/usr/bin/ld:
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/cinelerra/../guicast/armv8l/libguicast.a(thread.o):
in function `Thread::disable_cancel()':
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/guicast/thread.C:173:
undefined reference to `pthread_setcancelstate(int, int*)' clang-12: error:
linker command failed with exit code 1 (use -v to see invocation) make[2]:
*** [Makefile:520:
/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/cinelerra/../bin/cin]
Error 1 make[2]: Leaving directory
'/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1/cinelerra'
make[1]: *** [Makefile:544: all-recursive] Error 1 make[1]: Leaving
directory '/data/data/com.termux/files/home/cingg/cinelerra/cinelerra-5.1'
make: *** [Makefile:500: all] Error 2


==

Even if I manually combined *. o files from libcancelthread.a and
libguicast.a

But along the way I made few patches...

They affect android-specific parts of buildsystem in libaom (upgraded to
3.1.0 release) and libwebp-1.1.0.. Also opus build fails in test_api, I
disabled it..

Ffmpeg-4.4 should be ready to drop in, on termux there were cryptic errors
in aac encoder and hevc and opus (due to B0 being already defined
somewhere) but I hacked those files (renamed B0 to B0_) and whole ffmpeg
was build..

For ffmpeg testing just put official 4.4 tarball in thirdparty/src change
ffmpeg-4.3.0 to ffmpeg-4.4.0 in configure.ac, /autogen.sh and configure & &
make as usual (my configure.ac hack contain other changes)

If you want to test new libaom you can repack it from gz snapshot:

https://aomedia.googlesource.com/aom/+archive/c0f14141bd71414b004dccd66d48b27570299fa3.tar.gz

Be aware it unpacks in current directory, So create some empty
libaom-v3.1.0 and unpack this archive from there....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0001.htm>
-------------- next part --------------
diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile
index 27f13c65..2dd2867e 100644
--- a/cinelerra-5.1/thirdparty/Makefile
+++ b/cinelerra-5.1/thirdparty/Makefile
@@ -199,7 +199,7 @@ lame.cfg_vars?= CFLAGS+=" -O"
 lame.cfg_params?=--enable-shared=no
 lame.mak_params?= ; cd $(call bld_path,lame,include); ln -sf . lame
 libaom.cfg_vars?= mkdir aom.build && cd aom.build && $(call cmake_config,..)
-libaom.cfg_params?= -DENABLE_SHARED=no -DCMAKE_INSTALL_LIBDIR=lib \
+libaom.cfg_params?= -DENABLE_DOCS=no -DENABLE_SHARED=no -DCMAKE_INSTALL_LIBDIR=lib \
  -DCMAKE_INSTALL_PREFIX=$(call bld_path,libaom)/usr/local
 libaom.mak_params?= ; $(MAKE) -C libaom*/aom.build install
 dav1d.cfg_vars?=echo "echo dav1d custom make" >> configure; chmod +x ./configure;
@@ -242,6 +242,7 @@ opencv.cfg_vars?=$(call cmake_config,.)
 opencv.cfg_params?= -DBUILD_SHARED_LIBS:BOOL=OFF
 openexr.cfg_vars?=true; \#
 openexr.mak_vars?=true; \#
+opus.cfg_vars?= --disable-extra-programs
 speech_tools.mak_params?=-j1
 tiff.cfg_vars+=LIBS+=" -lpthread"
 tiff.cfg_params+= --enable-shared=no --disable-zstd $(call if_pkg,libwebp,\
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libwebp-1.1.0.patch1
Type: application/octet-stream
Size: 920 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0012.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libwebp-1.1.0.patch2
Type: application/octet-stream
Size: 714 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0013.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-4.4.patch0
Type: application/octet-stream
Size: 404 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0014.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-4.4.patch1
Type: application/octet-stream
Size: 373 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0015.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-4.4.patch3
Type: application/octet-stream
Size: 3245 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0016.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-4.4.patch5
Type: application/octet-stream
Size: 1530 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0017.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-4.4.patch7
Type: application/octet-stream
Size: 521 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0018.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-4.4.patch9
Type: application/octet-stream
Size: 1499 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0019.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-4.4.patchA
Type: application/octet-stream
Size: 995 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0020.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-4.4.patch6
Type: application/octet-stream
Size: 534 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0021.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-4.4.patch8
Type: application/octet-stream
Size: 803 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0022.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libaom-v3.1.0.patch1
Type: application/octet-stream
Size: 608 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210508/b7d98796/attachment-0023.obj>


More information about the Cin mailing list