I have prepared a new package for dev-perl/Bio-BigFile which needs ucsc-genome-browser: <quote> >>> Emerging (3 of 14) dev-perl/Bio-BigFile-1.06 from science * Bio-BigFile-1.06.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking Bio-BigFile-1.06.tar.gz to /var/tmp/portage/dev-perl/Bio-BigFile-1.06/work >>> Source unpacked in /var/tmp/portage/dev-perl/Bio-BigFile-1.06/work >>> Preparing source in /var/tmp/portage/dev-perl/Bio-BigFile-1.06/work/Bio-BigFile-1.06 ... * Applying Build.PL.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/dev-perl/Bio-BigFile-1.06/work/Bio-BigFile-1.06 ... * Using Module::Build * perl Build.PL --installdirs=vendor --libdoc= --destdir=/var/tmp/portage/dev-perl/Bio-BigFile-1.06/image/ --create_packlist=0 This module requires the compiled jkweb.a library from Jim Kent's source tree. If you haven't already done so, please download the source from http://hgdownload.cse.ucsc.edu/admin/jksrc.zip, unpack it, and build the contents of the "kent/src/lib" subdirectory as directed in the README. Then enter the location of the "kent/src" subdirectory at the prompt below. To prevent this message from appearing in the future, set the environment variable KENT_SRC to point to the "kent/src" subdirectory. </quote> I have ucsc-genome-browser installed but first of all, the jkweb.a is not installed on my system. Inspecting the ucsc-genome-browser ebuild I see "dolib.a" call conditioned by the +static-libs. OK, so I set +static-libs in the ebuild and reinstalled ucsc-genome-browser. It installed jkweb.a on my system as well. BTW, whenever I saw a reference to a Jim Kent's source it was always about the bigWig.h and jkweb.a needed by downstream tools. Anyway, with -static-libs I do not have jkweb.so installed, only the header file. I think this is wrong. Just force the +static-libs. Then, moving back to Bio-BigFile I can proceed with compilation, but: >>> Compiling source in /var/tmp/portage/dev-perl/Bio-BigFile-1.06/work/Bio-BigFile-1.06 ... Building Bio-BigFile x86_64-pc-linux-gnu-gcc -I/usr/include/ucsc-genome-browser -I/usr/lib64/perl5/5.12.4/x86_64-linux/CORE -DXS_VERSION="1.06" -DVERSION="1.06" -fPIC -Wno-format -Wformat=0 -DMACHTYPE_ -c -O2 -pipe -march=native -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -march=native -o lib/Bio/DB/BigFile.o lib/Bio/DB/BigFile.c ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/Bio/DB/BigFile/BigFile.bs') x86_64-pc-linux-gnu-gcc -shared -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed -o blib/arch/auto/Bio/DB/BigFile/BigFile.so lib/Bio/DB/BigFile.o /usr/lib/jkweb.a -lz -lssl /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/jkweb.a(bbiRead.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC /usr/lib/jkweb.a: could not read symbols: Bad value collect2: ld returned 1 exit status error building blib/arch/auto/Bio/DB/BigFile/BigFile.so from lib/Bio/DB/BigFile.o at /usr/lib64/perl5/vendor_perl/5.12.4/ExtUtils/CBuilder/Base.pm line 310. * ERROR: dev-perl/Bio-BigFile-1.06 failed (compile phase): * Compilation failed * * Call stack: * ebuild.sh, line 85: Called src_compile * environment, line 2484: Called perl-module_src_compile So, in the end what works for me is: CFLAGS="-fPIC $CFLAGS" emerge ucsc-genome-browser emerge Bio-BigFile # emerge --info Portage 2.1.10.45 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r2, 3.2.2-default x86_64) ================================================================= System uname: Linux-3.2.2-default-x86_64-Intel-R-_Core-TM-_i7-2640M_CPU_@_2.80GHz-with-gentoo-2.1 Timestamp of tree: Wed, 08 Feb 2012 21:30:02 +0000 app-shells/bash: 4.2_p20 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.2-r3, 3.1.4-r3, 3.2.2 dev-util/cmake: 2.8.7-r2 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1 sys-apps/openrc: 0.9.8.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.11.3 sys-devel/binutils: 2.22.52.0.1 sys-devel/gcc: 4.2.4-r1, 4.3.6-r1, 4.5.3-r2 sys-devel/gcc-config: 1.5-r2 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.2 (virtual/os-headers) sys-libs/glibc: 2.14.1-r2 Repositories: gentoo science x-portage x-layman ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE skype-eula Nero-EULA-US" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa" 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.4/ext-active/ /etc/php/cgi-php5.4/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="-O2 -pipe -march=native" DISTDIR="/mnt/external/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news nostrip parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en cs cz" MAKEOPTS="-j5" 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="/mnt/external/usr/portage" PORTDIR_OVERLAY="/home/mmokrejs/proj/sci /usr/local/portage /var/lib/layman" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl alsa amd64 amr apache apache2 berkdb bzip2 cairo cgi cli consolekit cracklib crypt cups cxx dbus device-mapper dhcp dri emboss encode fax ffmpeg flac fontconfig fortran gd gdbm gimp gnome gpm gtk hal hpijs iconv id3tag innodb ipv6 java jce jpeg jpg ladspa laptop lcms libnotify mad mmx modules mpi mpich2 multilib mysql ncurses nfs nls nptl nptlonly nsplugin ocr ogg opengl openmp openssl pam parport pcre pdf perl php png policykit ppds pppd python qt3support qt4 readline scanner server session sndfile sqlite sse sse2 sse3 ssl suexec svg sysfs syslog tcpd threads tiff tk truetype udev unicode usb wavpack xml xorg 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en cs cz" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa intel vmware fbdev" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS