Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 391703 - app-text/dvisvgm-1.0.9-r1 fails to merge: undefined reference to symbol 'FT_Init_FreeType'
Summary: app-text/dvisvgm-1.0.9-r1 fails to merge: undefined reference to symbol 'FT_I...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: TeX project
: 426762 (view as bug list)
Depends on:
Reported: 2011-11-23 14:37 UTC by Pim Vullers
Modified: 2012-07-18 16:03 UTC (History)
8 users (show)

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

full build log (app-text:dvisvgm-1.0.9-r1:20111123-143046.log,21.28 KB, text/plain)
2011-11-23 14:38 UTC, Pim Vullers
ebuild for dvisvgm-1.0.9 (dvisvgm-1.0.9-r1.ebuild,1.17 KB, text/plain)
2011-12-05 22:46 UTC, Dominique Michel

Note You need to log in before you can comment on or make changes to this bug.
Description Pim Vullers 2011-11-23 14:37:05 UTC
When trying to emerge dvisvgm I get a build failure regarding an undefined reference to symbol 'FT_Init_FreeType'.

Reproducible: Always

Steps to Reproduce:
1. emerge -1 dvisvgm

Actual Results:  
x86_64-pc-linux-gnu-g++ -Wall -Wnon-virtual-dtor -march=native -mtune=native -mfpmath=sse -mmmx -msse -msse2 -mssse3 -msse4.1 -O2 -pipe -I/usr/include/freetype2    -Wl,-O1 -Wl,--as-needed -lfreetype   -o dvisvgm dvisvgm.o gzstream.o libdvisvgm.a  -lz -lgs -lpotrace -lm -lkpathsea 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: libdvisvgm.a(FontEngine.o): undefined reference to symbol 'FT_Init_FreeType'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'FT_Init_FreeType' is defined in DSO /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/ so try adding it to the linker command line
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/ could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [dvisvgm] Error 1

Expected Results:  
build finishes successfully

I already rebuild freetype using 'emerge -1 freetype:1 freetype:2'.
Comment 1 Pim Vullers 2011-11-23 14:38:33 UTC
Created attachment 293517 [details]
full build log
Comment 2 Pim Vullers 2011-11-23 14:54:06 UTC
blizzard ~ # emerge --info
Portage 2.2.0_alpha77 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r0, 3.1.0-gentoo-r1 x86_64)
System uname: Linux-3.1.0-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9600_@_2.80GHz-with-gentoo-2.1
Timestamp of tree: Wed, 23 Nov 2011 12:45:01 +0000
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1-r1
sys-devel/binutils:       2.22
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.14.1
Repositories: gentoo gnome vullers
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=native -mtune=native -mfpmath=sse -mmmx -msse -msse2 -mssse3 -msse4.1 -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /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="-march=native -mtune=native -mfpmath=sse -mmmx -msse -msse2 -mssse3 -msse4.1 -O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg collision-protect distlocks ebuild-locks fixlafiles metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/gnome /usr/local/portage"
USE="64bit X a52 aac acl acpi addressbook alsa amd64 apache2 apng bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdparanoia cdr cleartype cli consolekit cracklib crypt cups curl cursors cvs cxx dbus detex device-mapper diff dri dts dvd dvdr eds exif expat extra extras fakevim fam fat ffmpeg fontconfig fortran fts3 fuse gallium gd gdbm gdu gedit gif git gles gmp gnome gnome-keyring gpm graphics gstreamer gtk gtk3 gtkspell gtkstyle gudev hardened html hwdb icons iconv icu id3tag imagemagick indicate introspection ipv6 irc jabber java javascript jce jpeg keymap kpathsea laptop latex lcms libnotify lightning llvm lzma map matroska minizip mmx mmxext modules mp3 mp4 mpeg msn mudflap multilib mysql nautilus ncurses nls nptl nptlonly nsplugin nss ntfs ntp ogg opengl openmp openssl optimized-qmake pam pch pcre pcsc-lite pdf perl pgo phonon php png policykit pppd private-headers pstricks python qml qt3support qt4 qtscript readline samba science secure-delete sendto session sip smp sound spell sqlite sqlite3 sse sse2 sse3 sse4 sse4a ssh ssl ssse3 startup-notification subversion svg synctex sysfs system-sqlite tcpd telepathy theora threads threadsafe truetype udev unicode usb v4l v4l2 vaapi vdpau vim-syntax vorbis vpx webkit webm webp x264 xcb xinerama xml xmlrpc xorg xosd xrandr xscreensaver xulrunner xv xvfb xvid 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="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 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau" XFCE_PLUGINS="brightness logout menu trash" 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 3 dyle 2011-11-23 20:34:40 UTC
Same here.

x86_64-pc-linux-gnu-g++ -Wall -Wnon-virtual-dtor -march=native -g -O2 -pipe -fomit-frame-pointer -ggdb -I/usr/include/freetype2    -Wl,-O1 -Wl,--as-needed -lfreetype   -o dvisvgm dvisvgm.o gzstream.o libdvisvgm.a  -lz -lgs -lpotrace -lm -lkpathsea 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: libdvisvgm.a(FontEngine.o): undefined reference to symbol 'FT_Init_FreeType'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'FT_Init_FreeType' is defined in DSO /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/ so try adding it to the linker command line
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/ could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [dvisvgm] Error 1
make[2]: Leaving directory `/var/tmp/portage/app-text/dvisvgm-1.0.9-r1/work/dvisvgm-1.0.9/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-text/dvisvgm-1.0.9-r1/work/dvisvgm-1.0.9'
make: *** [all] Error 2
 * ERROR: app-text/dvisvgm-1.0.9-r1 failed (compile phase):
 *   emake failed
 * If you need support, post the output of 'emerge --info =app-text/dvisvgm-1.0.9-r1',
 * the complete build log and the output of 'emerge -pqv =app-text/dvisvgm-1.0.9-r1'.
 * The complete build log is located at '/var/tmp/portage/app-text/dvisvgm-1.0.9-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-text/dvisvgm-1.0.9-r1/temp/environment'.
 * S: '/var/tmp/portage/app-text/dvisvgm-1.0.9-r1/work/dvisvgm-1.0.9'
Comment 4 Rafał Mużyło 2011-11-24 00:45:20 UTC
Given the command line, it's pretty obvious what's broken - '-lfreetype' is incorrectly passed in LDFLAGS (see
It should just use FREETYPE_{CFLAGS,LIBS}, as set by PKG_CHECK_MODULES (or pass it through EXTRA_LIBS).

On unrelated note, it also needlessly uses AC_CANONICAL_TARGET, instead of AC_CANONICAL_BUILD.
Comment 5 Dominique Michel 2011-12-05 22:46:54 UTC
Created attachment 294901 [details]
ebuild for dvisvgm-1.0.9

Same problem here on ~amd64. This ebuild work for me.
Comment 6 Juergen Rose 2011-12-11 11:06:08 UTC
The modified ebuild works for me as well.
Comment 7 Rafał Mużyło 2011-12-18 11:53:59 UTC
(In reply to comment #5)
> Created attachment 294901 [details]
> ebuild for dvisvgm-1.0.9
> Same problem here on ~amd64. This ebuild work for me.

1. it's not as simple as 'sed -i -e 's:^AC_CANONICAL_TARGET:AC_CANONICAL_BUILD:'' and this part addressed a different issue anyway
2. both such seds and eautoreconf should be done in src_prepare.
Comment 8 Alexis Ballier gentoo-dev 2011-12-22 13:01:43 UTC
1.0.10 *should* fix the problem, please reopen if not
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2012-07-18 16:03:43 UTC
*** Bug 426762 has been marked as a duplicate of this bug. ***