Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 448706 - media-plugins/frei0r-plugins-1.3 - defish0r plugin makes kdenlive rendering fail
Summary: media-plugins/frei0r-plugins-1.3 - defish0r plugin makes kdenlive rendering fail
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-12-26 21:53 UTC by Bernhard Stiftner
Modified: 2019-03-19 23:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Quick and dirty patch (frei0r-plugins-1.3-link-against-libm.patch,381 bytes, patch)
2012-12-26 21:54 UTC, Bernhard Stiftner
Details | Diff
Patch for frei0r-plugins-1.4 to fix libm.so underlinking issues (frei0r-plugins-1.4-link-with-mathlib.patch,40.37 KB, patch)
2014-01-20 00:24 UTC, Bernhard Stiftner
Details | Diff
Proposal for frei0r-plugins-1.4.1-r1.ebuild (frei0r-plugins-1.4-r1.ebuild,1.45 KB, text/plain)
2014-01-20 00:31 UTC, Bernhard Stiftner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Stiftner 2012-12-26 21:53:07 UTC
Some frei0r plugins (most notably defish0r.so) cannot be used with kdenlive for rendering a video project. Although effect previews in kdenlive work fine, rendering the project does not - it silently fails, yielding an empty output file.

Kdenlive's rendering process uses melt. Invoking melt on the command line gives a clue about the actual error:
/usr/bin/melt /home/bernhard/kdenlive/scripts/Skript001.sh.mlt -profile dv_pal_wide -consumer avformat:/home/bernhard/kdenlive/Unbenannt.mp4 progress=1 f=mp4 acodec=libmp3lame ab=128k ar=44100 vcodec=mpeg4 minrate=0 vb=12000k
[mp3 @ 0x19ccbf0] max_analyze_duration 5000000 reached at 5015510
[mp3 @ 0x19d46f0] max_analyze_duration 5000000 reached at 5015510
[mp3 @ 0x7f2b68003060] max_analyze_duration 5000000 reached at 5015510
[mp3 @ 0x7f2b6801e4d0] max_analyze_duration 5000000 reached at 5015510
/usr/bin/melt: symbol lookup error: /usr/lib64/frei0r-1/defish0r.so: undefined symbol: hypotf

Seems like the rendering process breaks due to undefined symbols (at runtime!) in defish0r.so. The undefined symbol is hypotf - should be defined in libm.so, but defish0r.so doesn't link against it.

Reproducible: Always

Steps to Reproduce:
1. Start new kdenlive project
2. Import video track
3. Attach Deform -> Defish effect to the video track (previews in kdenlive may work fine)
4. Render the project
Actual Results:  
Kdenlive rendering starts, but stops almost immediately. It doesn't report any error, but the output file is empty.

Expected Results:  
Expected kdenlive to render the file, applying the defish effect from defish0r.so

Portage 2.1.11.31 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.4, glibc-2.15-r3, 3.7.1-gentoo x86_64)
=================================================================
System uname: Linux-3.7.1-gentoo-x86_64-Intel-R-_Core-TM-_i5-3210M_CPU_@_2.50GHz-with-gentoo-2.1
Timestamp of tree: Wed, 26 Dec 2012 14:15:02 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.inode.at/"
LANG="de_AT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync1.at.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi adplug aim akonadi alsa amd64 asf audacious audiofile autoipd bash-completion berkdb bidi bluetooth branding bzip2 cairo calendar cdda cddb cdparanoia cdr cli consolekit contactnotes cracklib crypt css cue cups cxx dbus declarative device-mapper dhcpcd dnotify dri dssi dts dvd dvdr emboss encode exif fam fbcon fbcondecor fbsplash ffmpeg fftw firefox flac fltk foomaticdb fortran frei0r ftp gdbm gif gpm gps gtk iconv icq idn imagemagick imap inotify intel ipv6 jabber java java6 javascript joystick jpeg kde kipi kolab kontact kpathsea ladspa lame laptop lastfm latex lcms libkms libnotify libsamplerate libvisual live lm_sensors mad matroska mdnsresponder-compat melt memlimit midi mikmod mime minizip mjpeg mmap mmx mng mod modplug modules mp3 mp4 mpeg mplayer msn mtp mudflap multilib multimedia music mysql ncurses networkmanager nls nptl nsplugin ntfs offensive ogg ogg123 okular opengl openmp oscar pam pango pcre pdf perl phonon plasma plotutils png policykit ppds pppd projectm python qt3support qt4 quicktime rar rdesktop readline rtc rtsp samba scanner sdl semantic-desktop session sid slang sna sndfile sounds sox spell sql sse sse2 sse3 sse4 ssl ssse3 startup-notification subversion svg tcpd texteffect theora tiff timidity truetype udev udisks unicode upower usb userlocales v4l vaapi vcd video videos vnc vorbis vst webkit wifi wma wxwidgets x264 xcb xcomposite xface xine xinerama xml xorg xosd xpm xrandr xrender xscreensaver xv xvid yahoo zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="dll epson epson2 net" USERLAND="GNU" VIDEO_CARDS="intel v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Bernhard Stiftner 2012-12-26 21:54:57 UTC
Created attachment 333398 [details, diff]
Quick and dirty patch

Quick and dirty workaround: 
* Force all frei0r plugins to be linked against libm.so
* Remove the --as-needed linker option (may also cause problems?)
Comment 2 vylaern 2013-02-01 10:32:02 UTC
I have similar problem with Vertigo effect in Kdenlive from frei0r plugins.

Actual Results:  
Kdenlive rendering starts, but stops almost immediately. It doesn't report any error, but the output file is empty.

I was checking with new mlt-0.8.8 which was released few days ago, but still the same. I will check it with a new Kdenlive o.9.4 which will be in portage soon.
Comment 3 vylaern 2013-05-08 21:10:36 UTC
There is a new version of frei0r - 1.4.0 (not yet in portage, but there is bump request)
http://files.dyne.org/frei0r/
hopefully it should solve our problems

***
1.4.0 - 24 February 2013

	This release fixes several major bugs in existing plugins,
	adds new filters and the optional dependency to cairo.
	New filters (18): IIRblur, Vignette, Keyspillm0pup, Timeout,
	  Posterize, Dither, Spillsupress, Emboss, Colgate, RGBNoise,
	  Colorize, Softglow, ColrHalftone, Sigmoidaltransfer,
	  Colortap, cairogradient, cairoimagegrid, medians
	New mixers: cairoblend, cairoaffineblend
Comment 4 Bernhard Stiftner 2014-01-20 00:24:32 UTC
Created attachment 368202 [details, diff]
Patch for frei0r-plugins-1.4 to fix libm.so underlinking issues

Just tried again with frei0r-plugins-1.4.0, but the problem still persists.
Other frei0r effects are affected as well, it's not defish0r and vertigo, but probably about half of the available frei0r effects.

The problem is still the same: A lot of frei0r plugins include <math.h>, but do not explicitly link against libm.so. When /usr/bin/melt tries to dlopen() those plugins, math symbols cannot be resolved and /usr/bin/melt dies. That's the reason why kdenlive rendering fails.

I've attached a patch for frei0r-plugins-1.4 which should fix those libm.so underlinking issues. Unlike my first quick&dirty patch from Comment #1, this one does not force every frei0r plugin to be linked against libm.so, but only adds libm.so where it's really necessary. It also doesn't remove the --as-needed linker option anymore.

Using the patched frei0r plugins, kdenlive rendering works again.
Comment 5 Bernhard Stiftner 2014-01-20 00:31:31 UTC
Created attachment 368204 [details]
Proposal for frei0r-plugins-1.4.1-r1.ebuild

Attached proposal for frei0r-plugins-1.4.1-r1.ebuild which applies the libm.so underlinking patch from Comment #4.
Comment 6 Rafal Lalik 2017-09-08 23:29:27 UTC
Problem still exists in 1.5.0. Please add these two lines to src_configure section and problem will be solved (I run it with 1.5.0, didn't test with ~amd64)

    filter-ldflags -Wl,--as-needed
    append-ldflags -lm

Rafał
Comment 7 Pacho Ramos gentoo-dev 2018-03-01 10:50:36 UTC
are you still hitting this with 1.6.1 ?