Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308821 - app-text/poppler-0.12.4: emerge failure; requires media-libs/freetype to be built with -fPIC
Summary: app-text/poppler-0.12.4: emerge failure; requires media-libs/freetype to be b...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High major
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-10 12:22 UTC by Matt Enright
Modified: 2010-03-11 11:19 UTC (History)
0 users

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


Attachments
build.log (build.log,15.57 KB, text/plain)
2010-03-10 17:53 UTC, Matt Enright
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Enright 2010-03-10 12:22:01 UTC
Poppler build fails at the linking stage due to freetype being compiled without -fPIC.

Documentation was unclear and contradictory in the various places I was able to find some; I could add -fPIC to my CFLAGS but don't think I want it globally enabled (misunderstanding? is that a necessity on amd64?).

I think rather that the freetype ebuild should handle this requirement. (Please correct me if this is a mistaken assumption!)

Reproducible: Always

Steps to Reproduce:
1. emerge -v1 poppler

Actual Results:  
Poppler and its dependencies (including freetype-2.3.12) are built and installed. Freetype is built without -fPIC and poppler fails when attempting to link libpoppler.so:

Linking CXX shared library libpoppler.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/../../../../lib64/libfreetype.a(ftinit.o): relocation R_X86_64_32 against `tt_driver_class' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/../../../../lib64/libfreetype.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libpoppler.so.5.0.0] Error 1
make[1]: *** [CMakeFiles/poppler.dir/all] Error 2
make: *** [all] Error 2

Expected Results:  
Poppler should compile; or rather freetype should be compiled with -fPIC on amd64 arches.

emerge --info

Portage 2.1.8.2 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11-r1, 2.6.31-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-x86_64-AMD_Turion-tm-_64_Mobile_Technology_MT-37-with-gentoo-2.0.1
Timestamp of tree: Tue, 09 Mar 2010 10:00:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p2
dev-lang/python:     2.6.4-r1, 3.1.1-r1
dev-python/pycrypto: 2.1.0
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.0-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA skype-eula"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=k8 -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /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="-O2 -pipe -march=k8 -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ "
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en de fr ru"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/dotnet /var/lib/layman/gnome /var/lib/layman/mozilla /var/lib/layman/haskell /var/lib/layman/x11 /home/enrightm/gentoo"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 avahi bash-completion berkdb bluetooth branding bzip2 cairo cjk cli consolekit cracklib crypt cscope cups dbus dri dvd eds encode fontconfig fortran galago gdbm gif gnome gnome-keyring gpm gstreamer gtk hal i8x0 iconv imlib ipv6 jpeg kpathsea laptop libffi libnotify mad map mmap mmx modules mono mp3 mpeg mudflap multilib nautilus ncurses networkmanager nls nptl nptlonly offensive ogg opengl openmp pam pango pcre perl png policykit pppd pulseaudio python quicktime readline reflection ruby sdl session spl sse sse2 ssl svg sysfs tcpd theora threads tiff truetype udev unicode v4l v4l2 vim-syntax vorbis webkit wifi xmp xorg zlib zsh-completion" ALSA_CARDS="intel8x0" 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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de fr ru" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="sis fbdev vga vesa" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rafał Mużyło 2010-03-10 15:49:31 UTC
Attach full build log.
Any ideas why does it link with *static* freetype ?

And, no, you really don't want -fPIC in your CFLAGS.
Comment 2 Matt Enright 2010-03-10 17:53:46 UTC
Created attachment 223027 [details]
build.log

Whoops, knew I forgot something.

And no, I have no idea why its trying the static link.
Comment 3 Rafał Mużyło 2010-03-10 21:03:58 UTC
Huh ?
-- Found Freetype: /lib64/libfreetype.a

What is that doing there ?
Comment 4 Matt Enright 2010-03-11 11:18:56 UTC
(In reply to comment #3)
> Huh ?
> -- Found Freetype: /lib64/libfreetype.a
> 
> What is that doing there ?
> 

Eeeeeew. You're right of course, removing that and it properly linked to /usr/lib64/libfreetype.so and poppler built fine, and I discovered, among other things, about 300 *other* orphaned files from a 4-year old aborted ROOT setup, including a handful of other statically built system libraries.

Marked as FIXED, thanks for the second set of eyes!