Closed VVD closed 3 years ago
This place (check red):
When compiling for yourself, you can also use configure --enable-turbo this will create non-portable binaries whihc are tuned for your processor / architecture.
When compiling for yourself, you can also use configure --enable-turbo this will create non-portable binaries whihc are tuned for your processor / architecture.
make[3]: stopped in /tmp/work/usr/ports/multimedia/lives/work/LiVES-0acf0bc3af8e12102606c3eb577bb0a5cdfe3d01/libweed
--- libweed_gslice_la-weed.lo ---
GETTEXT=1 -DHAVE_LIBDL=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_POSIX_FADVISE=1 -DHAVE_POSIX_FALLOCATE=1 -DHAVE_GETENTROPY=1 -DHAVE_LINUX_JOYSTICK_H=1 -DHAVE_BZLIB_H=1 -DHAVE_LADSPA_H=1 -DHAVE_LINUX_VIDEODEV_H=1 -DHAVE_LINUX_VIDEODEV2_H=1 -DHAVE_FREI0R_H=1 -I. -isystem /usr/local/include -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -fvisibility=hidden -fPIC -DPIC -O3 -Wno-unused-function -Wno-pointer-to-int-cast -DNEED_LOCAL_WEED -DNEED_LOCAL_WEED_PLUGIN -Ofast -O3 -march=native -mtune=native -ffast-math -fno-math-errno -ftree-vectorizer-verbose=y -pthread -D_BUILD_THREADSAFE_ -DUSE_GSLICE -O2 -pipe -march=core2 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wall -MT libweed_gslice_la-weed.lo -MD -MP -MF .deps/libweed_gslice_la-weed.Tpo -c weed.c -fPIC -DPIC -o .libs/libweed_gslice_la-weed.o
cc: error: unknown argument: '-ftree-vectorizer-verbose=y'
*** [libweed_gslice_la-weed.lo] Error code 1
More important build error:
In file included from machinestate.c:13:
/usr/include/malloc.h:3:2: error: "<malloc.h> has been replaced by <stdlib.h>"
#error "<malloc.h> has been replaced by <stdlib.h>"
machinestate.c have ifdef:
#ifdef IS_FREEBSD
#include <stdlib.h>
#else
#include <malloc.h>
#endif
But it doesn't work…
Don't see how IS_FREEBSD define come from configure to sources.
--- configure.ac.orig
+++ configure.ac
@@ -91,6 +91,7 @@
AM_CONDITIONAL(IS_LINUX_MUSL,$IS_LINUX_MUSL)
AM_CONDITIONAL(IS_SOLARIS,$IS_SOLARIS)
AM_CONDITIONAL(IS_MINGW,$IS_MINGW)
+AM_CONDITIONAL(IS_FREEBSD,$IS_FREEBSD)
if test "$IS_MINGW" = "false"; then
AC_CHECK_FILE(lives-plugins/Makefile.am,,[
--- src/Makefile.am.orig
+++ src/Makefile.am
@@ -29,6 +29,10 @@
solaris_CFLAGS = -DIS_SOLARIS=1
endif
+if IS_FREEBSD
+freebsd_CFLAGS = -DIS_FREEBSD=1
+endif
+
gtk_LIBFLAGS = @GTK_LIBS_NODYNAMIC@ -pthread
AM_CPPFLAGS = \
@@ -233,8 +237,9 @@
AM_CFLAGS = -fPIE -Wstrict-aliasing=0 -Wall $(yuv4mpeg_CFLAGS) $(ldvgrab_CFLAGS) $(dvgrab_CFLAGS) \
$(oil_CFLAGS) $(wayland_CFLAGS) $(transcode_CFLAGS) \
- $(darwin_CFLAGS) $(irix_CFLAGS) $(linux_CFLAGS) $(solaris_CFLAGS) $(osc_CFLAGS) $(alsa_CFLAGS) $(png_CFLAGS) $(swscale_CFLAGS) \
- $(jack_CFLAGS) $(pulse_CFLAGS) $(libexplain_CFLAGS) $(giw_CFLAGS) $(unicap_CFLAGS) $(libweed_CFLAGS) $(libweed_compat_CFLAGS) \
+ $(darwin_CFLAGS) $(irix_CFLAGS) $(linux_CFLAGS) $(solaris_CFLAGS) $(freebsd_CFLAGS) \
+ $(osc_CFLAGS) $(alsa_CFLAGS) $(png_CFLAGS) $(swscale_CFLAGS) $(jack_CFLAGS) $(pulse_CFLAGS) \
+ $(libexplain_CFLAGS) $(giw_CFLAGS) $(unicap_CFLAGS) $(libweed_CFLAGS) $(libweed_compat_CFLAGS) \
-DLIVES_LIBDIR=\""$(libdir)"\" $(gtk_def) @TURBO_CFLAGS@
if HAVE_AVFORMAT
There are several #ifdef __FreeBSD__
in code:
lives-plugins/plugins/decoders/asf_decoder.c
lives-plugins/plugins/decoders/decplugin.h
lives-plugins/plugins/decoders/mpegts_decoder.c
src/rpmalloc.c
Build error with and without --disable-system-weed, with and without installed lives (with embedded weed):
haar_analyser.cpp:439:31: error: no matching function for call to 'weed_get_out_params'
weed_plant_t **out_params = weed_get_out_params(inst);
^~~~~~~~~~~~~~~~~~~
./../weed-plugin-utils.c:563:30: note: candidate function not viable: requires 2 arguments, but 1 was provided
static inline weed_plant_t **weed_get_out_params(weed_plant_t *instance, int *nparams) {
^
haar_analyser.cpp:440:30: error: no matching function for call to 'weed_get_in_params'
weed_plant_t **in_params = weed_get_in_params(inst);
^~~~~~~~~~~~~~~~~~
./../weed-plugin-utils.c:560:30: note: candidate function not viable: requires 2 arguments, but 1 was provided
static inline weed_plant_t **weed_get_in_params(weed_plant_t *instance, int *nparams) {
^
haar_analyser.cpp:573:3: error: use of undeclared identifier 'weed_plugin_se_Tpackage_version'; did you mean 'weed_plugin_set_package_version'?
weed_plugin_se_Tpackage_version(plugin_info, package_version);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
weed_plugin_set_package_version
./../weed-plugin-utils.c:109:20: note: 'weed_plugin_set_package_version' declared here
static inline void weed_plugin_set_package_version(weed_plant_t *pi, int v)
^
4 warnings and 3 errors generated.
*** [haar_analyser.lo] Error code 1
https://stackoverflow.com/questions/17576227/equivalent-of-ftree-vectorizer-verbose-for-clang
Benchmarking code, I will remove it.
--- configure.ac.orig +++ configure.ac @@ -91,6 +91,7 @@ AM_CONDITIONAL(IS_LINUX_MUSL,$IS_LINUX_MUSL) AM_CONDITIONAL(IS_SOLARIS,$IS_SOLARIS) AM_CONDITIONAL(IS_MINGW,$IS_MINGW) +AM_CONDITIONAL(IS_FREEBSD,$IS_FREEBSD) if test "$IS_MINGW" = "false"; then AC_CHECK_FILE(lives-plugins/Makefile.am,,[
--- src/Makefile.am.orig +++ src/Makefile.am @@ -29,6 +29,10 @@ solaris_CFLAGS = -DIS_SOLARIS=1 endif +if IS_FREEBSD +freebsd_CFLAGS = -DIS_FREEBSD=1 +endif + gtk_LIBFLAGS = @GTK_LIBS_NODYNAMIC@ -pthread AM_CPPFLAGS = \ @@ -233,8 +237,9 @@ AM_CFLAGS = -fPIE -Wstrict-aliasing=0 -Wall $(yuv4mpeg_CFLAGS) $(ldvgrab_CFLAGS) $(dvgrab_CFLAGS) \ $(oil_CFLAGS) $(wayland_CFLAGS) $(transcode_CFLAGS) \ - $(darwin_CFLAGS) $(irix_CFLAGS) $(linux_CFLAGS) $(solaris_CFLAGS) $(osc_CFLAGS) $(alsa_CFLAGS) $(png_CFLAGS) $(swscale_CFLAGS) \ - $(jack_CFLAGS) $(pulse_CFLAGS) $(libexplain_CFLAGS) $(giw_CFLAGS) $(unicap_CFLAGS) $(libweed_CFLAGS) $(libweed_compat_CFLAGS) \ + $(darwin_CFLAGS) $(irix_CFLAGS) $(linux_CFLAGS) $(solaris_CFLAGS) $(freebsd_CFLAGS) \ + $(osc_CFLAGS) $(alsa_CFLAGS) $(png_CFLAGS) $(swscale_CFLAGS) $(jack_CFLAGS) $(pulse_CFLAGS) \ + $(libexplain_CFLAGS) $(giw_CFLAGS) $(unicap_CFLAGS) $(libweed_CFLAGS) $(libweed_compat_CFLAGS) \ -DLIVES_LIBDIR=\""$(libdir)"\" $(gtk_def) @TURBO_CFLAGS@ if HAVE_AVFORMAT
There are several
#ifdef __FreeBSD__
in code: lives-plugins/plugins/decoders/asf_decoder.c lives-plugins/plugins/decoders/decplugin.h lives-plugins/plugins/decoders/mpegts_decoder.c src/rpmalloc.c
mallopt.h no longer used, removing it. Other ifdefs are fine, no changes needed.
OK working on fixes.
WARNING: there is a very recent bug which can delete clips on exit ! I am working on a fix for this, please avoid testing until it is fixed.
OK working on fixes.
WARNING: there is a very recent bug which can delete clips on exit ! I am working on a fix for this, please avoid testing until it is fixed.
OK, fixed now. only 22125016a55e440dfd65a44bfc5abf22917fb372 from half an hour ago was affected.
All changes pushed now, .po files also updated to current.
--disable-frei0r or --enable-frei0r cause configure error:
checking that generated files are newer than configure... done
configure: error: conditional "HAVE_FREI0R" was never defined.
Usually this means the macro was only invoked conditionally.
===> Script "configure" failed unexpectedly.
Fixed.
Something like this?
+++ configure.ac
@@ -921,8 +921,8 @@
dnl check for frei0r
AC_CHECK_HEADERS(frei0r.h, HAVE_FREI0R=true, HAVE_FREI0R=false)
-AM_CONDITIONAL(HAVE_FREI0R,$HAVE_FREI0R)
fi
+AM_CONDITIONAL(HAVE_FREI0R,$HAVE_FREI0R)
HAVE_LDVGRAB=false
I got it! 1272 pixels! patch-po_ru.po.txt
Looks very nice !
With --enable-frei0r didn't build lib/lives/plugins/effects/realtime/weed/frei0r/frei0r.so. Without both --enable-frei0r and --disable-frei0r lib/lives/plugins/effects/realtime/weed/frei0r/frei0r.so builded.
There is no such option as --enable-frei0r, you cannot have both --disable-package and --enable-package defined at the same time, it doesn't make sense. If you type the option --enable-frei0r, then it is actually interpreted as --disable-frei0r, rather than being ignored as you might expect.
I have also been confused by this in the past, but unfortunately that is the way that autotools works.
Work as you described.
Is it same for: alsa doxygen jack nls projectM pulse ?
With --disable-nls:
main.c:4173:3: warning: implicit declaration of function 'setlocale' is invalid in C99 [-Wimplicit-function-declaration]
setlocale(LC_NUMERIC, "C");
^
main.c:4173:13: error: use of undeclared identifier 'LC_NUMERIC'
setlocale(LC_NUMERIC, "C");
^
setlocale
require #include <locale.h>
, but in src/support.h this include is in #ifdef ENABLE_NLS
block.
Work as you described.
Is it same for: alsa doxygen jack nls projectM pulse ?
Yes.
With --disable-nls:
main.c:4173:3: warning: implicit declaration of function 'setlocale' is invalid in C99 [-Wimplicit-function-declaration] setlocale(LC_NUMERIC, "C"); ^ main.c:4173:13: error: use of undeclared identifier 'LC_NUMERIC' setlocale(LC_NUMERIC, "C"); ^
setlocale
require#include <locale.h>
, but in src/support.h this include is in#ifdef ENABLE_NLS
block.
Don't use --disable-nls, it is not supported.
Last question: is it possible to turn off V4L via configure options? If v4l isn't installed - configure script find it, if not - lives builds without support of the v4l. But is it possible to turn off support if v4l installed?
P.S. I think it's last question before release. :-]
Why would you want to do that ? It's only a playback plugin. If you don't want just don't use it !
I'm prepare port: https://svnweb.freebsd.org/ports/head/multimedia/lives/?sortby=date And sorting out custom build options. Maybe better to make V4L as mandatory dependency.
You mean v4l2, right ? And you know it needs a kernel module of course.
V4L_BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l
If v4l2 installed - configure script find it and use. But if v4l2 isn't installed - configure script find this too and don't use it. Is it possible to mandatory disable search or even mandatory require?
Why is that a problem ?
You mean if v4l2 is present, it shouldn't build v4l1 ? Maybe a good idea then.
Done.
I ask about unambiguity during configure… If I want - it use v4l2, if I don't want - it don't use v4l2 even it installed. Build result must be the same with v4l2 installed and without it, if I don't want use it.
Don't build lib/lives/plugins/playback/video/vloopback.so
anymore.
Do you use IRC? Or Discord? Or Tox? A lot of simple questions resolved too long via comments on bugracker…
Do you use IRC? Or Discord? Or Tox? A lot of simple questions resolved too long via comments on bugracker…
whatsapp ?
whatsapp ?
No. It require phone number.
OK, I just reactivated my account on Discord, username "salsaman".
BSD World: https://discord.gg/CaZUny
Added the following configure options: --disable-prctl --disable-wayland --disable-xrender --disable-opencv --disable-fftw3f --disable-libexplain --disable-v4l --disable-libdv --disable-ogg --disable-theora --disable-vorbis --disable-dirac
BSD World: https://discord.gg/CaZUny
please send another invite. I left the server and now I cannot chat with you, and I cannot return to the server as the invite has now expired. Very strange app this Discord.
Thanks! Attached patch for port - waiting commit.
Closing as fixed !
Fixed bug with HAVE_OPENCV => $HAVE_OPENCV, added "--libs-only-other" for "pkg-config opencv" and added possibility to ignore pulseaudio and alsa.
FreeBSD's cp work different: If we have "dir1" with files "file1", "file2" and empty "dir2", then "cp -rf dir1/ dir2" copy files "file1" and "file2" to "dir2". Result: "dir2/file1", "dir2/file2". Linux's cp in same environment copy "dir1" with all files in "dir2". Result: "dir2/dir1/file1", "dir2/dir1/file2". This patch fixes this issue:
Last one (you can ignore it):
All patched for version 3.0.2.