salsaman / LiVES

LiVES is a feature rich application which combines elements of VJ and video editing software. The current version runs on Linux / BSD. Check_out_the_new_discussion_area https://github.com/salsaman/LiVES/discussions
http://lives-video.com
GNU General Public License v3.0
89 stars 11 forks source link

Weed plugin compile error? #37

Closed RKelln closed 2 years ago

RKelln commented 2 years ago

Not sure if I did install steps correctly, but getting a compile error with weed plugins?

On Ubuntu 20.04:

$ sudo apt install autotools-dev autoconf autopoint libtool gettext gettext libgtk-3-dev libpng-dev libx11-dev libxrender-dev libjack-jackd2-dev libpulse-dev libgl-dev libsdl2-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libfftw3-dev libunicap2-dev libprojectm-dev projectm-data liborc-0.4-dev libopencv-core-dev frei0r-plugins-dev ladspa-sdk
$ autogen.sh
$ ./configure
$ make

...
make[3]: Entering directory '.../LiVES/lives-plugins/plugins/decoders'
/bin/bash ../../../libtool  --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"LiVES\" -DPACKAGE_TARNAME=\"lives\" -DPACKAGE_VERSION=\"3.2.1-pre\" -DPACKAGE_STRING=\"LiVES\ 3.2.1-pre\" -DPACKAGE_BUGREPORT=\"https://github.com/salsaman/LiVES/issues\" -DPACKAGE_URL=\"http://lives-video.com\" -DPACKAGE=\"lives\" -DVERSION=\"3.2.1-pre\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_PTHREAD=1 -DGETTEXT_PACKAGE=\"lives\" -DLOCALEDIR=\"\$\{datarootdir\}/locale\" -DPREFIX=\"NONE\" -DLiVES_VERSION=\"3.2.1-pre\" -DHAVE_VISIBILITY=1 -DHAVE_STDINT_H_WITH_UINTMAX=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DINTDIV0_RAISES_SIGFPE=1 -DHAVE_INTTYPES_H_WITH_UINTMAX=1 -DHAVE_UNSIGNED_LONG_LONG_INT=1 -DHAVE_UINTMAX_T=1 -DHAVE_INTTYPES_H=1 -DUSE_POSIX_THREADS=1 -DUSE_POSIX_THREADS_WEAK=1 -DHAVE_PTHREAD_RWLOCK=1 -DHAVE_PTHREAD_MUTEX_RECURSIVE=1 -DHAVE_BUILTIN_EXPECT=1 -DHAVE_ARGZ_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_GETCWD=1 -DHAVE_GETEGID=1 -DHAVE_GETEUID=1 -DHAVE_GETGID=1 -DHAVE_GETUID=1 -DHAVE_MEMPCPY=1 -DHAVE_MUNMAP=1 -DHAVE_STPCPY=1 -DHAVE_STRCASECMP=1 -DHAVE_STRDUP=1 -DHAVE_STRTOUL=1 -DHAVE_TSEARCH=1 -DHAVE_ARGZ_COUNT=1 -DHAVE_ARGZ_STRINGIFY=1 -DHAVE_ARGZ_NEXT=1 -DHAVE___FSETLOCKING=1 -DHAVE_DECL_FEOF_UNLOCKED=1 -DHAVE_DECL_FGETS_UNLOCKED=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_NL_LOCALE_NAME=1 -DHAVE_LONG_LONG_INT=1 -DHAVE_WCHAR_T=1 -DHAVE_WINT_T=1 -DHAVE_INTMAX_T=1 -DHAVE_POSIX_PRINTF=1 -DHAVE_STDINT_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_ASPRINTF=1 -DHAVE_FWPRINTF=1 -DHAVE_PUTENV=1 -DHAVE_SETENV=1 -DHAVE_SETLOCALE=1 -DHAVE_SNPRINTF=1 -DHAVE_WCSLEN=1 -DHAVE_DECL__SNPRINTF=0 -DHAVE_DECL__SNWPRINTF=0 -DHAVE_DECL_GETC_UNLOCKED=1 -DHAVE_LANGINFO_CODESET=1 -DHAVE_LC_MESSAGES=1 -DENABLE_NLS=1 -DHAVE_GETTEXT=1 -DHAVE_DCGETTEXT=1 -DHAVE_LIBDL=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_POSIX_FADVISE=1 -DHAVE_POSIX_FALLOCATE=1 -DHAVE_GETENTROPY=1 -DHAVE_SYS_PRCTL_H=1 -DHAVE_LINUX_JOYSTICK_H=1 -DHAVE_JACK_TRANSPORT_H=1 -DHAVE_LADSPA_H=1 -DHAVE_LINUX_VIDEODEV2_H=1 -DHAVE_FREI0R_H=1 -I.    -DHAVE_LIBAV_LIBS=1 -Wno-unused-function -DHAVE_AVCODEC_OPEN2=1 -DHAVE_AVCODEC_ALLOC_CONTEXT3=1 -DHAVE_AVCODEC_GET_NAME=1 -DHAVE_AVCODEC_SEND_PACKET=1 -DHAVE_AV_CODEC_SET_PKT_TIMEBASE=1 -DHAVE_AVFORMAT_NEW_STREAM=1 -DHAVE_AVPACKET_UNREF=1 -DHAVE_AVFRAME_UNREF=1 -DHAVE_AVFORMAT_FIND_STREAM_INFO=1 -DHAVE_AVFORMAT_CLOSE_INPUT=1   -DHAVE_AVPRIV_SET_PTS_INFO=1 -fPIC -DPIC  -DNEED_LOCAL_WEED=1 -DNEED_LOCAL_WEED_COMPAT=1 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -Wno-deprecated-declarations -g -O2 -Wall -MT flv_decoder_la-flv_decoder.lo -MD -MP -MF .deps/flv_decoder_la-flv_decoder.Tpo -c -o flv_decoder_la-flv_decoder.lo `test -f 'flv_decoder.c' || echo './'`flv_decoder.c
libtool: compile:  gcc -DPACKAGE_NAME=\"LiVES\" -DPACKAGE_TARNAME=\"lives\" -DPACKAGE_VERSION=\"3.2.1-pre\" "-DPACKAGE_STRING=\"LiVES 3.2.1-pre\"" -DPACKAGE_BUGREPORT=\"https://github.com/salsaman/LiVES/issues\" -DPACKAGE_URL=\"http://lives-video.com\" -DPACKAGE=\"lives\" -DVERSION=\"3.2.1-pre\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_PTHREAD=1 -DGETTEXT_PACKAGE=\"lives\" "-DLOCALEDIR=\"\${datarootdir}/locale\"" -DPREFIX=\"NONE\" -DLiVES_VERSION=\"3.2.1-pre\" -DHAVE_VISIBILITY=1 -DHAVE_STDINT_H_WITH_UINTMAX=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DINTDIV0_RAISES_SIGFPE=1 -DHAVE_INTTYPES_H_WITH_UINTMAX=1 -DHAVE_UNSIGNED_LONG_LONG_INT=1 -DHAVE_UINTMAX_T=1 -DHAVE_INTTYPES_H=1 -DUSE_POSIX_THREADS=1 -DUSE_POSIX_THREADS_WEAK=1 -DHAVE_PT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X_FALLOCATE=1 -DHAVE_GETENTROPY=1 -DHAVE_SYS_PRCTL_H=1 -DHAVE_LINUX_JOYSTICK_H=1 -DHAVE_JACK_TRANSPORT_H=1 -DHAVE_LADSPA_H=1 -DHAVE_LINUX_VIDEODEV2_H=1 -DHAVE_FREI0R_H=1 -I. -DHAVE_LIBAV_LIBS=1 -Wno-unused-function -DHAVE_AVCODEC_OPEN2=1 -DHAVE_AVCODEC_ALLOC_CONTEXT3=1 -DHAVE_AVCODEC_GET_NAME=1 -DHAVE_AVCODEC_SEND_PACKET=1 -DHAVE_AV_CODEC_SET_PKT_TIMEBASE=1 -DHAVE_AVFORMAT_NEW_STREAM=1 -DHAVE_AVPACKET_UNREF=1 -DHAVE_AVFRAME_UNREF=1 -DHAVE_AVFORMAT_FIND_STREAM_INFO=1 -DHAVE_AVFORMAT_CLOSE_INPUT=1 -DHAVE_AVPRIV_SET_PTS_INFO=1 -fPIC -DPIC -DNEED_LOCAL_WEED=1 -DNEED_LOCAL_WEED_COMPAT=1 -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -Wno-deprecated-declarations -g -O2 -Wall -MT flv_decoder_la-flv_decoder.lo -MD -MP -MF .deps/flv_decoder_la-flv_decoder.Tpo -c flv_decoder.c  -fPIC -DPIC -o .libs/flv_decoder_la-flv_decoder.o
In file included from decplugin.h:70,
                 from flv_decoder.c:73:
../../weed-plugins/weed-plugin-utils.c:53:10: fatal error: weed/weed-plugin-utils.h: No such file or directory
   53 | #include <weed/weed-plugin-utils.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:839: flv_decoder_la-flv_decoder.lo] Error 1
make[3]: Leaving directory '/.../LiVES/lives-plugins/plugins/decoders'
make[2]: *** [Makefile:524: all-recursive] Error 1
make[2]: Leaving directory '/.../LiVES/lives-plugins/plugins'
make[1]: *** [Makefile:523: all-recursive] Error 1
make[1]: Leaving directory '/.../LiVES/lives-plugins'
make: *** [Makefile:652: all-recursive] Error 1

Related configure output:

checking for WEED... no
...will try to build from included sources
checking for WEED_UTILS... no
...will use weed-utils.h from included sources
checking for WEED_COMPAT... no
...will use version from included sources
checking for WEED_PLUGIN... no
...plugins will be compiled with included sources
salsaman commented 2 years ago

Thanks for reporting this. Seems like a symbol is not being passed onwards

Adding the following code at line 17 of lives/lives-plugins/plugins/decoders/Makefile.am should be sufficient to fix this.

if NEED_LOCAL_WEED_PLUGIN

weed_cflags += -DNEED_LOCAL_WEED_PLUGIN=1

endif

You will need to run either autogen.sh or automake, followed by ./configure before trying the make command again.

RKelln commented 2 years ago

Great, got a lot further with that fix then hit this:

gdk_fast_resize.c:25:10: fatal error: ../../libweed/weed-plugin.h: No such file or directory
   25 | #include "../../libweed/weed-plugin.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:704: gdk_fast_resize.lo] Error 1
make[3]: Leaving directory '/.../LiVES/lives-plugins/weed-plugins/gdk'
make[2]: *** [Makefile:1783: all-recursive] Error 1
make[2]: Leaving directory '/.../LiVES/lives-plugins/weed-plugins'
make[1]: *** [Makefile:523: all-recursive] Error 1
make[1]: Leaving directory '/.../LiVES/lives-plugins'
make: *** [Makefile:652: all-recursive] Error 1

And similarly for all the .c and .cpp files in the gdk directory. I manually patched that (just added the extra ../ to the libweed paths) and that compiled.

Was able to install and run after that thanks!

salsaman commented 2 years ago

Great ! Glad to learn it worked in the end. I'll add these small patches into github.