Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431780 - app-text/dvisvgm-1.0.8 - ld: libdvisvgm.a(FontEngine.o): undefined reference to symbol 'FT_Init_FreeType'
Summary: app-text/dvisvgm-1.0.8 - ld: libdvisvgm.a(FontEngine.o): undefined reference ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: TeX project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-08-17 21:17 UTC by Arttu Valo
Modified: 2016-05-21 12:14 UTC (History)
2 users (show)

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


Attachments
append to LIBS, not LDFLAGS (dvisvgm-1.0.8-freetypelibs.patch,895 bytes, patch)
2012-08-17 21:17 UTC, Arttu Valo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arttu Valo 2012-08-17 21:17:13 UTC
Created attachment 321596 [details, diff]
append to LIBS, not LDFLAGS

app-text/dvisvgm-1.0.8 fails at linking due to misplaced freetype library on the linker invocation line.

mv -f .deps/dvisvgm.Tpo .deps/dvisvgm.Po
x86_64-pc-linux-gnu-g++ -Wall -Wnon-virtual-dtor -O2 -march=native -floop-block -floop-interchange -floop-strip-mine -pipe -I/usr/include/freetype2    -Wl,-O1 -Wl,--as-needed -lfreetype   -o dvisvgm dvisvgm.o gzstream.o libdvisvgm.a  ../potracelib/libpotrace.a  -lz -lgs -lkpathsea
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../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.4/../../../../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.4/../../../../lib64/libfreetype.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../lib64/libfreetype.so: 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.8/work/dvisvgm-1.0.8/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-text/dvisvgm-1.0.8/work/dvisvgm-1.0.8'
make: *** [all] Error 2
emake failed
 * ERROR: app-text/dvisvgm-1.0.8 failed (compile phase):
 *   emake failed

Freetype's lib gets appended to LDFLAGS instead of LIBS in configure, see the attached one-line patch which sorted it out at least for me.

(Also, the ebuild complains about QA issue, it should probably run eautoreconf after applying patches as the complaint says.)
Comment 1 John (EBo) David 2012-08-23 18:27:40 UTC
I have the exact same issue with dvisvgm-1.0.9-r1.  Testing a little I found that 1.0.11 built and installed correctly, but did not try 1.0.10.

Could 1.0.9 either be fixed, marked as unstable, or mark 1.0.11 as stable?
Comment 2 Nicolas Bigaouette 2012-08-27 20:44:22 UTC
I had the same issue with 1.0.8. Version 1.0.10 compiled fine.
Comment 3 Coacher 2012-09-06 09:01:25 UTC
Same error as above with 1.0.8
Comment 4 speredenn 2012-09-16 19:40:57 UTC
Hello,

I have the same issue with version 1.0.8.

from my build log:
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld: libdvisvgm.a(FontEngine.o): undefined reference to symbol 'FT_Init_FreeType'
"
I have read this post, which could be quite useful, but I don't know how to use the --as-needed option: http://forums.gentoo.org/viewtopic-t-912512-start-0.html

Some of my outputs that you might need:

------------------------------------------------------------
readelf -s /usr/lib64/libfreetype.so | grep FT_Init_FreeType

Symbol table '.dynsym' contains 384 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
   46: 000000000000e360   106 FUNC    GLOBAL DEFAULT   11 FT_Init_FreeType

--------------------------------
ls -l /usr/lib64/libfreetype.so*
lrwxrwxrwx 1 root root     20 Sep 16 23:17 /usr/lib64/libfreetype.so -> libfreetype.so.6.8.1
lrwxrwxrwx 1 root root     20 Sep 16 23:17 /usr/lib64/libfreetype.so.6 -> libfreetype.so.6.8.1
-rwxr-xr-x 1 root root 728528 Sep 16 23:17 /usr/lib64/libfreetype.so.6.8.1

------------------------------
emerge --info for this ebuild:

QEMU_SOFTMMU_TARGETS="i386 x86_64"
QEMU_USER_TARGETS="i386 x86_64"
RESUMECOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
RESUMECOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}""
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.4"
RPMDIR="/usr/portage/rpm"
RUBYOPT="-rauto_gem"
RUBY_TARGETS="ruby18 ruby19"
SBCL_HOME="/usr/lib64/sbcl"
SBCL_SOURCE_ROOT="/usr/lib64/sbcl/src"
SHELL="/bin/bash"
SHLVL="4"
SYMLINK_LIB="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
TERM="xterm"
UNINSTALL_IGNORE="/lib/modules/*"
USE="X acl amd64 berkdb bzip2 cli cracklib crypt cups cxx dri emacs fortran gdbm gnutls gpm iconv ipv6 mmx modules mudflap multilib ncurses nls nptl openmp pam pcre pppd readline session sse sse2 ssl syslog tcpd unicode zlib" ALSA_CARDS="hda-intel" 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 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="keyboard evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel" 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"
USER="root"
USERLAND="GNU"
USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CROSSCOMPILE_OPTS CURL_SSL DRACUT_MODULES DVB_CARDS ELIBC FCDSL_CARDS FFTOOLS FOO2ZJS_DEVICES FRITZCAPI_CARDS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL LCD_DEVICES LIBREOFFICE_EXTENSIONS LINGUAS LIRC_DEVICES MISDN_CARDS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL OFED_DRIVERS OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS RUBY_TARGETS SANE_BACKENDS USERLAND VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES_ADDONS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm-linux hppa hppa-hpux ia64 ia64-hpux ia64-linux m68k m68k-mint mips ppc ppc64 ppc64-linux ppc-aix ppc-macos ppc-openbsd s390 sh sparc sparc64-freebsd sparc64-solaris sparc-fbsd sparc-solaris x64-freebsd x64-macos x64-openbsd x64-solaris x86 x86-cygwin x86-fbsd x86-freebsd x86-interix x86-linux x86-macos x86-netbsd x86-openbsd x86-solaris x86-winnt"
USE_EXPAND_VALUES_ELIBC="AIX Cygwin Darwin FreeBSD glibc HPUX Interix mintlib NetBSD OpenBSD SunOS uclibc Winnt"
USE_EXPAND_VALUES_KERNEL="AIX Cygwin Darwin FreeBSD freemint HPUX Interix linux NetBSD OpenBSD SunOS Winnt"
USE_EXPAND_VALUES_USERLAND="BSD GNU"
USE_ORDER="env:pkg:conf:defaults:pkginternal:repo:env.d"
VIDEO_CARDS="intel"
WANT_MP="true"
WINDOWID="14680077"
WINDOWPATH="7"
XAUTHORITY="/root/.xauthkPV1ZY"
XDG_CONFIG_DIRS="/etc/xdg"
XDG_DATA_DIRS="/usr/local/share:/usr/share"
XSESSION="awesome"
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"
XTERM_LOCALE="C"
XTERM_SHELL="/bin/zsh"
XTERM_VERSION="XTerm(279)"
_="/usr/bin/emerge"
Comment 5 speredenn 2012-09-16 19:53:28 UTC
I also solved by masking all versions before 1.0.11, unmasking 1.0.11, and keywording 1.0.11.
Comment 6 Tim Harder gentoo-dev 2012-10-08 18:45:57 UTC
Fixed in CVS.
Comment 7 Coacher 2012-10-09 01:32:44 UTC
app-text/dvisvgm-1.0.8 now builds just fine. Thanks.