Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 320237 - sci-libs/gdal needs improved LDFLAGS filtering
Summary: sci-libs/gdal needs improved LDFLAGS filtering
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Steve Arnold
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-17 17:49 UTC by corec
Modified: 2010-07-18 20:09 UTC (History)
3 users (show)

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


Attachments
build.log of the failed emerge (build.log,410.35 KB, text/plain)
2010-05-17 17:52 UTC, corec
Details
Patch to do the sed correctly (gdal-ldflags.patch,450 bytes, patch)
2010-06-19 13:11 UTC, corec
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description corec 2010-05-17 17:49:30 UTC
Since google earth has now added sci-libs/gdal as depended package, my system now tries to emerge it. sys-libs/gdal however fails with ldflag --as-needed which I have enabled in my system.

If this however is a problem caused by my invalid make.conf, please accept my apology and close this bug. ;)

Reproducible: Always

Steps to Reproduce:
1. Try to emerge sci-libs/gdal
2. Watch emerge fail
3. Look the build logs last command and see that the ",--as-needed" is on it's own without any other LDFLAGS.




Portage 2.1.8.3 (default/linux/x86/10.0/desktop/gnome, gcc-4.3.4, glibc-2.11.1-r0, 2.6.33-gentoo-r2 i686)
=================================================================
System uname: Linux-2.6.33-gentoo-r2-i686-Intel-R-_Pentium-R-_4_CPU_3.20GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 17 May 2010 14:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p5
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.1-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
ALSA_CARDS="emu10k1"
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"
ANT_HOME="/usr/share/ant"
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"
ARCH="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CCACHE_SIZE="2G"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CLEAN_DELAY="5"
COLLISION_IGNORE="/lib/modules"
COLORTERM="gnome-terminal"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CVS_RSH="ssh"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-HA7oHEEfdP,guid=f415f1f6dce19733ba178ec90000001f"
DESKTOP_SESSION="gnome"
DISPLAY=":0.0"
DISTDIR="/usr/portage/distfiles"
EDITOR="/bin/nano"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--ask --verbose"
EMERGE_WARNING_DELAY="10"
EPREFIX=""
EROOT="/"
FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
GCC_SPECS=""
GDK_USE_XFT="1"
GDMSESSION="gnome"
GDM_LANG="C"
GDM_XSERVER_LOCATION="local"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ http://ftp.df.lth.se/pub/gentoo/ "
GNOME_DESKTOP_SESSION_ID="this-is-deprecated"
GNOME_KEYRING_PID="1325"
GNOME_KEYRING_SOCKET="/tmp/keyring-9KMEKB/socket"
GTK_RC_FILES="/etc/gtk/gtkrc:/home/corec/.gtkrc-1.2-gnome2"
HG="/usr/bin/hg"
HOME="/root"
INFOPATH="/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.20.1/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.4/info"
INPUT_DEVICES="evdev wacom"
JAVAC="/etc/java-config-2/current-system-vm/bin/javac"
JAVACC_HOME="/usr/share/javacc/"
JAVA_HOME="/etc/java-config-2/current-system-vm"
JDK_HOME="/etc/java-config-2/current-system-vm"
KERNEL="linux"
LANG="C"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LC_COLLATE="fi_FI.UTF-8"
LC_CTYPE="fi_FI.UTF-8"
LC_MONETARY="fi_FI.UTF-8"
LC_NUMERIC="fi_FI.UTF-8"
LC_PAPER="fi_FI.UTF-8"
LC_TIME="fi_FI.UTF-8"
LDFLAGS="-Wl,-O1,--as-needed"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe.sh %s"
LINGUAS="en fi"
LOGNAME="root"
MAKEOPTS="-j3"
MANPATH="/etc/java-config-2/current-system-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.20.1/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.4/man:/etc/java-config/system-vm/man/"
NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
OPENGL_PROFILE="xorg-x11"
ORBIT_SOCKETDIR="/tmp/orbit-corec"
PAGER="/usr/bin/less"
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
PKGDIR="/usr/portage/packages"
PORTAGE_ARCHLIST="ppc x86-openbsd ppc-openbsd ppc64 x86-winnt x86-fbsd ppc-aix alpha arm x86-freebsd s390 amd64 arm-linux x86-macos x64-openbsd ia64-hpux hppa x86-netbsd amd64-linux ia64-linux x86 sparc-solaris x64-freebsd sparc64-solaris x86-linux x64-macos sparc m68k-mint ia64 mips ppc-macos x86-interix hppa-hpux amd64-fbsd x64-solaris mips-irix m68k sh x86-solaris sparc-fbsd"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_BIN_PATH="/usr/lib/portage/bin"
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error qa"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save_summary echo"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="250"
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_PYM_PATH="/usr/lib/portage/pym"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_RSYNC_RETRIES="3"
PORTAGE_SYNC_STALE="30"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_VERBOSE="1"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /usr/local/portage"
PROFILE_ONLY_VARIABLES="ARCH ELIBC KERNEL USERLAND"
PYTHONDONTWRITEBYTECODE="1"
RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
ROOT="/"
ROOTPATH="/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.3.4"
RPMDIR="/usr/portage/rpm"
RUBY_TARGETS="ruby18"
SESSION_MANAGER="local/blue:@/tmp/.ICE-unix/1334,unix/blue:/tmp/.ICE-unix/1334"
SHELL="/bin/bash"
SHLVL="3"
SSH_AGENT_PID="1363"
SSH_AUTH_SOCK="/tmp/keyring-9KMEKB/socket.ssh"
SYNC="rsync://trumpetti.atm.tut.fi/gentoo-portage "
TERM="xterm"
USE="X a52 aac acl acpi alsa avahi bash-completion berkdb bluetooth branding bzip2 cairo cddb cdparanoia cdr cli consolekit cracklib crypt css cups curl cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fortran gdbm gdu gif gnome gnome-keyring gnutls gphoto2 gpm gstreamer gtk hal iconv ipv6 jabber java jingle jpeg lcms ldap libnotify mad matroska mikmod mmx mng modules mp3 mp4 mpeg msn mudflap musicbrainz nautilus ncurses nls nptl nptlonly ogg opengl openmp oss pam pango pcre pdf perl png policykit ppds pppd python qt3support quicktime readline reflection samba sdl session smp spell spl sse sse2 ssl startup-notification svg sysfs taglib tcpd theora threads tiff truetype unicode usb vorbis win32codecs x264 x86 xcb xcomposite xml xorg xulrunner xv xvid zeroconf zlib" ALSA_CARDS="emu10k1" 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 wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fi" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" 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 CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS RUBY_TARGETS SANE_BACKENDS USERLAND VIDEO_CARDS XTABLES_ADDONS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d"
VIDEO_CARDS="radeon"
WINDOWID="33635329"
WINDOWPATH="7"
XAUTHORITY="/root/.xauth8kM6lN"
XDG_CONFIG_DIRS="/etc/xdg"
XDG_DATA_DIRS="/usr/local/share:/usr/share:/usr/share/gdm"
XDG_MENU_PREFIX="gnome-"
XDG_SESSION_COOKIE="b117bbab55023dad6b589fea49c5fde1-1274106454.893624-1435578692"
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"
_="/usr/bin/emerge"
bash4="4.1.5(2)-release"
Comment 1 corec 2010-05-17 17:52:38 UTC
Created attachment 231839 [details]
build.log of the failed emerge
Comment 2 Rafał Mużyło 2010-05-17 19:27:04 UTC
While I can't be 100% sure, it seems that a part of
src_configure is bitting you - look near the end.

Comment 3 Bartosz Brachaczek 2010-05-31 00:01:45 UTC
The problem isn't with --as-needed itself, the package builds fine with LDFLAGS="-Wl,-O1 -Wl,--as-needed". Moreover, it builds fine with LDFLAGS="-Wl,--as-needed,-O1".

It seems that something deletes string "-Wl,-O1" from LDFLAGS and writes them to GDALmake.opt (this is the file where the corrupted LDFLAGS variable exists). I can't reproduce it manually (i.e., without Portage) or find a reason why it happens.
Comment 4 Rafał Mużyło 2010-06-06 17:22:06 UTC
@comment 3: well, duh.
I already said, that's done in src_configure.
Comment 5 corec 2010-06-19 13:11:52 UTC
Created attachment 235937 [details, diff]
Patch to do the sed correctly

Finally got time to fix this. I've attached a patch which fixes the filtering of -Wl and -O1 correctly. Works for me at least.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2010-07-01 14:45:45 UTC
Feel free to fix it properly, but for now:

+  01 Jul 2010; Samuli Suominen <ssuominen@gentoo.org> gdal-1.7.1-r1.ebuild:
+  Remove broken sed that's trying to drop -Wl,-O1 wrt #320237.
Comment 7 Steve Arnold archtester gentoo-dev 2010-07-18 20:09:23 UTC
It was *supposed* to remove cruft from the MYSQL_LIB variable (which it does correctly now, along with the included/suggested patch line for LDFLAGS).  It still builds fine, with no more argument warnings.  Re-open the bug (or start a new one if warranted) if you still have problems.