Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650258 - media-libs/mlt-6.6.0 - mlt_wrap.cxx:(.text+0xaf9): undefined reference to `mlt_global_properties'
Summary: media-libs/mlt-6.6.0 - mlt_wrap.cxx:(.text+0xaf9): undefined reference to `ml...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: media-video herd
Depends on: 663562
Blocks: lto
  Show dependency tree
Reported: 2018-03-12 07:28 UTC by Fabio Coatti
Modified: 2018-08-27 12:22 UTC (History)
6 users (show)

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

build.log (build.log,215.11 KB, text/plain)
2018-03-12 07:29 UTC, Fabio Coatti
emerge info for x86_64/6core unit (emerg.inf,5.51 KB, text/plain)
2018-03-20 03:25 UTC, Geoff Madden
build.log for same machone (build.log,190.97 KB, text/x-log)
2018-03-20 03:26 UTC, Geoff Madden
Possible patch (rubybind.patch,596 bytes, patch)
2018-07-23 01:49 UTC, Jouni Kosonen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Coatti 2018-03-12 07:28:24 UTC
emerging media-libs/mlt, I get the following errors:
mlt_wrap.cxx:(.text+0x1d56): undefined reference to `mlt_environment_set'
mlt_wrap.o: In function `_wrap_mlt_factory_init(int, unsigned long*, unsigned long)':
mlt_wrap.cxx:(.text+0x1e92): undefined reference to `mlt_factory_init'
mlt_wrap.o: In function `_wrap_Service_disconnect_all_producers(int, unsigned long*, unsigned long)':
mlt_wrap.cxx:(.text+0xaf54): undefined reference to `Mlt::Service::disconnect_all_producers()'
mlt_wrap.o: In function `_wrap_mlt_factory_producer(int, unsigned long*, unsigned long)':
mlt_wrap.cxx:(.text+0x17954): undefined reference to `mlt_factory_producer'
mlt_wrap.o: In function `_wrap_mlt_factory_filter(int, unsigned long*, unsigned long)':
mlt_wrap.cxx:(.text+0x17b14): undefined reference to `mlt_factory_filter'
mlt_wrap.o: In function `_wrap_mlt_factory_transition(int, unsigned long*, unsigned long)':
mlt_wrap.cxx:(.text+0x17cd4): undefined reference to `mlt_factory_transition'
mlt_wrap.o: In function `_wrap_mlt_factory_consumer(int, unsigned long*, unsigned long)':
mlt_wrap.cxx:(.text+0x17e94): undefined reference to `mlt_factory_consumer'
mlt_wrap.o: In function `_wrap_mlt_factory_register_for_clean_up(int, unsigned long*, unsigned long)':
mlt_wrap.cxx:(.text+0x18013): undefined reference to `mlt_factory_register_for_clean_up'
mlt_wrap.o: In function `_wrap_mlt_environment(int, unsigned long*, unsigned long)':
mlt_wrap.cxx:(.text+0x2e302): undefined reference to `mlt_environment'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:256:] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/mlt-6.6.0/work/mlt-6.6.0/src/swig/ruby'
make[1]: *** [Makefile:5: all] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-libs/mlt-6.6.0/work/mlt-6.6.0/src/swig'
make: *** [Makefile:9: all] Error 1

Reproducible: Always

Portage 2.3.24 (python 3.4.6-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-7.3.0, glibc-2.26-r6, 4.15.8-cova x86_64)
System uname: Linux-4.15.8-cova-x86_64-Intel-R-_Core-TM-_i7-6820HQ_CPU_@_2.70GHz-with-gentoo-2.4.1
KiB Mem:    65293264 total,  57988992 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Mon, 12 Mar 2018 07:00:02 +0000
Head commit of repository gentoo: 3639f0b466d1f0f149d86c9d47b1a5cf3db99ef0
sh bash 4.4_p19
ld GNU ld (Gentoo 2.29.1 p2) 2.29.1
app-shells/bash:          4.4_p19::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r2::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.6-r1::gentoo, 3.5.4-r1::gentoo, 3.6.4::gentoo
dev-util/cmake:           3.10.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r1::gentoo, 1.16-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo, 2.30::gentoo
sys-devel/gcc:            7.2.0-r1::gentoo, 7.3.0::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r2::gentoo
sys-kernel/linux-headers: 4.15::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r6::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000
    sync-rsync-verify-metamanifest: yes

    location: /var/lib/layman/kde
    sync-type: laymansync
    masters: gentoo
    priority: 50

    location: /var/lib/layman/pypi
    sync-type: laymansync
    sync-uri: gs-pypi pypi
    masters: gentoo
    priority: 50

    location: /var/lib/layman/torbrowser
    sync-type: laymansync
    masters: gentoo
    priority: 50

    location: /usr/overlay
    masters: gentoo
    priority: 51

ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -fpie -fpic -pipe -march=native -fstack-protector-strong -flto=4 -fuse-linker-plugin"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/sddm/scripts/Xsetup"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -fpie -fpic -pipe -march=native -fstack-protector-strong -flto=4 -fuse-linker-plugin"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -O2 -fpie -fpic -pipe -march=native -fstack-protector-strong -flto=4 -fuse-linker-plugin"
LINGUAS="en it de"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
USE="3dnow 3dnowext 3dnowprefetch X \ a52 aac aalib acl acpi activities aim alsa amd64 apng appstream ares asf ati audio audiofile avahi bash-completion berkdb bidi bl bluetooth branding bri bzip2 cairo caps cdda cdr cjk cli crypt cups curl cxx dba dbus declarative device-mapper dga divx divx4linux dri dts dv dvb dvd dvdr dvdread eap-sim edl egl emboss encode ethereal evdev exif expat faad fam fame fbcon ffmpeg fftw flac force-cgi-redirect fortran ftp gallium garmin gd gdbm gif gimp glamor gmedia gmp gnutls gphoto2 gpm gps gsm gtk h264 h323 iconv icq icu idn ifp ilbc imagemagick imap innodb ipod iproute2 ipv6 ithreads jabber java javascript joystick jpeg kde kipi kontact kvm kwallet lastfm lcms ldap libnotify libvirtd live lm_sensors lua lvm lxc lzma lzo mad maildir matroska mbox mdnsresponder-compat mhash mime mjpeg mmap mmx mmxext mng modules mozdevelop mozilla mp3 mp4 mpeg msn mtp multilib mysql ncurses network networkmanager new-hpcups nfsv4 njb nls nptl nptlonly nsplugin offensive ofx ogg oggvorbis ogm openal openexr opengl openmp oscar pam pango parted pcap pcre pdf phonon php plasma plotutils png policykit ppds pulseaudio qemu qml qt3support qt5 readline real rtc ruby samba sasl sdl seccomp semantic-desktop semantic-destkop sha512 sip slang slp smartcard sndfile snmp sox speex spell srt sse sse2 ssh ssl ssse3 startup-notification svg symlink systemd tcltk tcpd telepathy theora threads tiff tk touchpad tremor truetype udev udisks unicode upower usb utempter v4l v4l2 vaapi vcd vde vdpaum vhosts video videos vim-syntax virt-network virtualbox vorbis vulkan wav wayland webkit widgets wifi wmf wmp wps wxwidgets wxwindows x264 xanim xattr xcb xcomposite xface xft xine xinerama xml xosd xpm xscreensaver xsl xv xvid zeroconf zlib zpm" ABI_X86="64 32" 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" 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 author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en it de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby22 ruby23 ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="i965 intel nvidia 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"
Comment 1 Fabio Coatti 2018-03-12 07:29:47 UTC
Created attachment 523552 [details]
Comment 2 Michael Palimaka (kensington) gentoo-dev 2018-03-13 10:45:26 UTC
Probably LTO-related
Comment 3 Fabio Coatti 2018-03-14 08:32:29 UTC
(In reply to Michael Palimaka (kensington) from comment #2)
> Probably LTO-related

I would not be sure of that, or at least it is something than the usual behaviour of non-lto friendly packages. Looking at build logs, you may see that I disabled LTO for this package:

[...]-flto=4 -fuse-linker-plugin -fno-lto [...]

Indeed, if I compile it with LTO enabled the linker will spit out many more messages and fail in a different way.
Comment 4 Geoff Madden 2018-03-20 03:25:25 UTC
Created attachment 524480 [details]
emerge info for x86_64/6core unit
Comment 5 Geoff Madden 2018-03-20 03:26:26 UTC
Created attachment 524482 [details]
build.log for same machone
Comment 6 Fabio Coatti 2018-04-07 20:05:55 UTC
The package is emerged correctly if I turn off ruby use flag.
The first error when is not built is the following:

Building lua...OK
Building ruby...OK
make[2]: Entering directory '/var/tmp/portage/media-libs/mlt-6.6.0/work/mlt-6.6.0/src/swig/ruby'
linking shared-object
mlt_wrap.o: In function `_wrap_mlt_global_properties(int, unsigned long*, unsigned long)':
mlt_wrap.cxx:(.text+0xaf9): undefined reference to `mlt_global_properties'
mlt_wrap.o: In function `_wrap_mlt_factory_close(int, unsigned long*, unsigned long)':

Without ruby, the compilation completes even with lto enabled.
Comment 7 Guy 2018-05-26 12:18:01 UTC
I ran into the same problem during an @world update.

>>> Failed to emerge media-libs/mlt-6.6.0, Log file:
>>>  '/var/tmp/portage/media-libs/mlt-6.6.0/temp/build.log'
>>> Jobs: 404 of 643 complete, 1 failed             Load avg: 2.98, 3.00, 3.46
*** Resuming merge...
Calculating dependencies... done!
 * emerge --keep-going: kde-apps/kde-apps-meta-18.04.1 dropped because it
 * requires >=kde-apps/kdemultimedia-meta-18.04.1
 * emerge --keep-going: kde-apps/kdenlive-18.04.1 dropped because it requires
 * >=media-libs/mlt-6.6.0[ffmpeg,kdenlive,melt,qt5,sdl,xml], >=media-
 * libs/mlt-6.6.0[ffmpeg,kdenlive,melt,qt5,sdl,xml]
 * emerge --keep-going: kde-apps/kdemultimedia-meta-18.04.1 dropped because it
 * requires >=kde-apps/kdenlive-18.04.1
 * emerge --keep-going: kde-apps/kde-meta-18.04.1 dropped because it requires
 * >=kde-apps/kde-apps-meta-18.04.1

When I look at all the in-tree packages which depend on media-libs/mlt:

# equery d -a media-libs/mlt
 * These packages depend on media-libs/mlt:
kde-apps/kdenlive-17.12.3 (>=media-libs/mlt-6.4.0[ffmpeg,kdenlive,melt,qt5,sdl,xml])
kde-apps/kdenlive-18.04.1 (>=media-libs/mlt-6.6.0[ffmpeg,kdenlive,melt,qt5,sdl,xml])
media-video/shotcut-18.03 (>=media-libs/mlt-6.6.0[ffmpeg,frei0r,qt5,sdl2,xml])

it appears that none of the depending packages need for mlt to be built with support for ruby.

The only depending package of interest for me was the kdenlive upgrade.
Comment 8 Jouni Kosonen 2018-07-23 01:49:41 UTC
Created attachment 540554 [details, diff]
Possible patch

Those symbols aren't in the c++ side, they are in the c-side.
I've been locally using a userpatch that adds that linkage to the swig build script since March, but I can't seem to find an issue or a PR about it.
Comment 9 urcindalo 2018-08-01 10:09:39 UTC
I was also affected by this issue after a world update.

As mentioned, adding "=media-libs/mlt-6.6.0-r1 -ruby" to package.use allows for mlt to be emerged.
Comment 10 Larry the Git Cow gentoo-dev 2018-08-09 22:20:00 UTC
The bug has been referenced in the following commit(s):

commit 27f16b16970c8fd338fda948ed5c13e6bcdc6f0b
Author:     Jouni Kosonen <>
AuthorDate: 2018-07-28 19:02:56 +0000
Commit:     Andreas Sturmlechner <>
CommitDate: 2018-08-09 22:19:35 +0000

    media-libs/mlt: version bump 6.10.0

 media-libs/mlt/Manifest                            |   1 +
 .../mlt/files/mlt-6.10.0-swig-underlinking.patch   |  12 ++
 media-libs/mlt/mlt-6.10.0.ebuild                   | 220 +++++++++++++++++++++
 3 files changed, 233 insertions(+)