dyne / frei0r

A large collection of free and portable video plugins
https://frei0r.dyne.org/
GNU General Public License v2.0
427 stars 89 forks source link

Missing sin cos symbol for emboss #14

Closed ydesgagn closed 5 years ago

ydesgagn commented 7 years ago

Hi,

I'm building the latest from master. When using with melt and kdenlive, when we use emboss, gdb report sin and cos symbols are missing. But I do see -lm in the makefile for emboss. Any idea on what can be wrong?

Thanks

jaromil commented 7 years ago

Does only gdb reports that or there is an error also out of the debugging environment? If the error is reported only when in gdb then it may be due to the fact the libm binary has no debugging symbols.

ydesgagn commented 7 years ago

No, melt or kdenlive will seg fault if using the effect. That's why we had a look in gdb.

jaromil commented 7 years ago

libm is added here to all plugins https://github.com/dyne/frei0r/blob/master/src/CMakeLists.txt#L2 on my gnu/linux system emboss.so is linked to it after a cmake build

ldd emboss.so
    linux-vdso.so.1
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
    /lib64/ld-linux-x86-64.so.2
ydesgagn commented 7 years ago

Sorry for the delay but it took us while to understand. When building:

export CFLAGS= all other build commands... In such case emboss crash.

If we use the same commands but unset CFLAGS first, emboss will work fine.

Any clue?

jaromil commented 6 years ago

Hi! was this problem solved at last? Noone else reported so I wonder if this was due to a particular build setup.

ydesgagn commented 6 years ago

I'm still using the workaround to make it work. We build this once a month. Without the unset CFLAGS we still have the crash.

jaromil commented 6 years ago

OK! Are you using configure/make or cmake/make to build frei0r this way? I assume you are using the first (autoconf) since there is a libm flag in cmake. Can you try if this patch fixes your problem? I cannot reproduce it, sorry. We may also decide to ignore it and close the issue if its too much for for you, but it would still be useful to know if this problem occurs to you on all target platforms or a specific one (osx, win or linux). Thanks

diff --git a/src/Makefile.am b/src/Makefile.am
index 381b1c5..a6ca398 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -220,6 +220,7 @@ distort0r_la_SOURCES = filter/distort0r/distort0r.c
 dither_la_SOURCES = filter/dither/dither.c
 edgeglow_la_SOURCES = filter/edgeglow/edgeglow.cpp
 emboss_la_SOURCES = filter/emboss/emboss.c
+emboss_la_LIBADD = -lm
 equaliz0r_la_SOURCES = filter/equaliz0r/equaliz0r.cpp
 flippo_la_SOURCES = filter/flippo/flippo.c
 G_la_SOURCES = filter/RGB/G.c
jaromil commented 5 years ago

I think this fixes it, thanks for hanging out here 7011cd4d8a2b1c4627585cde6c8d7a2f5b6315eb