Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem emerging netcdf-4.1.3
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message

Joined: 15 Dec 2010
Posts: 10

PostPosted: Thu Feb 07, 2013 12:07 pm    Post subject: Problem emerging netcdf-4.1.3 Reply with quote


I am getting this error while trying to emerge netcdf-4.1.3 (as part of installing paraview-3.14.1-r4):


libtool: link: mpif90 -shared  -fPIC  .libs/fort-attio.o .libs/fort-control.o .libs/fort-dim.o .libs/fort-genatt.o .libs/fort-geninq.o .libs/fort-genvar.o .libs/fort-lib.o .libs/fort-misc.o .libs/fort-v2compat.o .libs/fort-vario.o .libs/fort-var1io.o .libs/fort-varaio.o .libs/fort-varmio.o .libs/fort-varsio.o .libs/fort-nc4.o  -Wl,--whole-archive ../f90/.libs/libnetcdff90.a -Wl,--no-whole-archive  -Wl,-rpath -Wl,/var/tmp/portage/sci-libs/netcdf-4.1.3/work/netcdf-4.1.3_build/liblib/.libs -Wl,--as-needed ../liblib/.libs/ -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3 -lsz -lhdf5_hl -lhdf5 -lz -lcurl -L/usr/lib64 -l -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../.. /usr/lib64/ /usr/lib64/ /usr/lib64/ -lrt -lnsl -lutil -lhwloc -ldl /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/ /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/ -lm -lpthread -lc -lgcc_s  -O2 -Wl,-O1   -pthread -Wl,-soname -Wl, -o .libs/
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -l-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3
collect2: ld returned 1 exit status
make[3]: *** [] Error 1
make[3]: Leaving directory `/var/tmp/portage/sci-libs/netcdf-4.1.3/work/netcdf-4.1.3_build/fortran'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/sci-libs/netcdf-4.1.3/work/netcdf-4.1.3_build/fortran'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sci-libs/netcdf-4.1.3/work/netcdf-4.1.3_build'
make: *** [all] Error 2

Here is the output of emerge --info =sci-libs/netcdf-4.1.3

Portage 2.2.0_alpha161 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.16.0, 2.6.38-gentoo-r6-yyyymmdd x86_64)
                        System Settings
System uname: Linux-2.6.38-gentoo-r6-yyyymmdd-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16449916 total,    834748 free
KiB Swap:   16777212 total,  16776696 free
Timestamp of tree: Thu, 07 Feb 2013 07:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p42
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.12.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo science kde-sunset moonrise gilgamesh
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -march=native -pipe"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
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/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
PORTDIR_OVERLAY="/var/lib/layman/science /var/lib/layman/kde-sunset /var/lib/layman/moonrise /usr/local/portage"
USE="X acl alsa amd64 bash-completion berkdb blas boost bzip2 cairo cdr cli cracklib crypt cups curl cvs cxx dbus dga dri dvd dvdr enscript fftw firefox fltk fortran gdbm gif gimp gnuplot gnustep gphoto2 gpm gsl gtk hdf5 iconv ieee1394 imagemagick ios ipod ipv6 jpeg jpeg2k kpathsea lapack latex mmx mng modules motif mpeg mpi mplayer mudflap multilib ncurses netcdf nls nptl objc opengl openmp pam pcre pdf perl plotutils png python qt3support qt4 raw readline romio samba session spell sse sse2 ssl subversion svg syslog tcl tcpd threads tiff tk truetype udev unicode usb vcd vim-syntax wmf xinerama zlib" ABI_X86="64" 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="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" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" 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"

Any help appreciated. Thanks

Back to top
View user's profile Send private message

Joined: 23 Jan 2004
Posts: 1428

PostPosted: Tue Feb 12, 2013 9:28 pm    Post subject: Reply with quote

Gentoo GCC Upgrade Guide wrote:

libtool and

Earlier installments of GCC on Gentoo required you to run a specific command called Some time ago, the execution of this command has been integrated in the package deployments itself (through the toolchain eclass) so there is no need for users to call this themselves anymore.

The reason we need to rebuild libtool after the upgrade of gcc versions is because of its main purpose: libtool is a toolset that aggregates platform-specific code in a generic interface, allowing applications to build against shared libraries without needing to deal with the platform specific aspects of shared libraries. To fulfill its function properly, the libtool script uses various library locations that have hardcoded GCC version information in them.

Run this command, IIRC the proper command in your case wd be: 4.6.3

After that, run:
lafilefixer --justfixit

then try emerge again.
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message

Joined: 15 Dec 2010
Posts: 10

PostPosted: Wed Feb 13, 2013 10:29 am    Post subject: Reply with quote

Tried that but got exactly the same error trying to emerge netcdf-4.1.3.
Back to top
View user's profile Send private message

Joined: 10 Nov 2004
Posts: 52
Location: France

PostPosted: Sun Feb 24, 2013 8:41 am    Post subject: Reply with quote

I've run into the same problem...

The issu is that -l-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3 is not correct as it implies that we look for lib-L/usr/lib/gcc/x86_64-pc-linux-gnu/ which indeed does not exist... The culprit is libtool which include several libless" -l " entries.

I've gotten mine to compile using:

sudo ebuild /usr/portage/sci-libs/netcdf/netcdf-4.1.3.ebuild fetch
sudo ebuild /usr/portage/sci-libs/netcdf/netcdf-4.1.3.ebuild unpack
sudo ebuild /usr/portage/sci-libs/netcdf/netcdf-4.1.3.ebuild compile # will fail
sudo sed "s/postdeps=/ s/ -l / /g" -i /var/tmp/portage/sci-libs/netcdf-4.1.3/work/netcdf-4.1.3_build/libtool
sudo ebuild /usr/portage/sci-libs/netcdf/netcdf-4.1.3.ebuild compile # now works
sudo ebuild /usr/portage/sci-libs/netcdf/netcdf-4.1.3.ebuild install
sudo ebuild /usr/portage/sci-libs/netcdf/netcdf-4.1.3.ebuild qmerge

libtool (and the postdeps line) is generated at some point by configure but I haven't figured out why it contains those invalid " -l "s

After some more searching seems there is an old bugreport with a proposed ebuild correction ( So just patch the current ebuild with:

> diff -U3 ../../../../portage/sci-libs/netcdf/netcdf-4.1.3.ebuild netcdf-4.1.3.ebuild
--- ../../../../portage/sci-libs/netcdf/netcdf-4.1.3.ebuild     2012-10-16 23:01:27.000000000 +0200
+++ netcdf-4.1.3.ebuild 2013-02-24 10:49:24.827271478 +0100
@@ -57,6 +57,7 @@
                sed -i -e '/$(NC_TEST4) /s/man4//' "${S}"/ || die
+       sed -i 's:test $p = "-R":test $p = "-R" || test $p = "-l":' configure
 src_configure() {
Back to top
View user's profile Send private message

Joined: 15 Dec 2010
Posts: 10

PostPosted: Tue Feb 26, 2013 11:48 am    Post subject: [SOLVED] Problem emerging netcdf-4.1.3 Reply with quote


That did it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum