Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 134160

Summary: samba fail to compile with LDFLAGS="-O4"
Product: Gentoo Linux Reporter: Fabio Bonfante <bfx81>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED WONTFIX    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Fabio Bonfante 2006-05-23 16:04:04 UTC
i use LDFLAGS="-O4" to optimize the linker... all other ebuilds like it only samba doesn't... commenting this flags all gone. 
In some way the flag is propagated at the setup.py that rightly doesn't know this entry.
All other version i tried (since gentoo 2005.0) of samba suffer of this problem, and i don't remember all the times i forgot to re-uncomment the flags :-(


LIBS="-O4 -Wl,-rpath,/usr/lib -lcrypt -lresolv -lnsl -ldl -lldap -llber    -lldap -llber " \
        python python/setup.py build
Unknown entry '-O4' in $LIBS variable passed to setup.py
make: *** [python_ext] Error 1

!!! ERROR: net-fs/samba-3.0.22 failed.
----------------------------------

Portage 2.0.54-r2 (default-linux/x86/2006.0, gcc-3.3.6, glibc-2.3.6-r3, 2.6.14-suspend2-r7 i686)
=================================================================
System uname: 2.6.14-suspend2-r7 i686 Intel(R) Pentium(R) M processor 1600MHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0-r1
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=pentium4 -mfpmath=sse -pipe -fomit-frame-pointer -mmmx -msse -msse2 -maccumulate-outgoing-args"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -mfpmath=sse -pipe -fomit-frame-pointer -mmmx -msse -msse2 -maccumulate-outgoing-args"
DISTDIR="/var/tmp/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.heanet.ie/pub/gentoo/ http://gentoo.ngi.it/ http://trillian.cc.gatech.edu/pub/mirrors/ftp.gentoo.com/ ftp://ftp.heanet.ie/pub/gentoo/"
LDFLAGS="-O4"
LINGUAS="it"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://gentoo-rsync.ngi.it/gentoo-portage/"
USE="x86 7zip X a52 aac acpi alsa apache2 arts asf audiofile avi bash-completion berkdb bitmap-fonts bzip2 cairo cddb cdparanoia cdr chm cli crypt cups curl dbus directfb dri dts dv dvd dvdread eds emboss encode esd ethereal exif expat fam fbcon fbsplash ffmpeg flac freetds gcj gd gdbm gif gimp glut gmp gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal idn ieee1394 imagemagick imlib innodb ipod ipv6 isdnlog java jikes jpeg jpeg2k junit kernel_linux lcms ldap libg++ libwww lirc lua lzo mad matroska mhash mikmod ming mmx mng mod mono motif mozilla mozsvg mp3 mpeg mysql mythtv nas ncurses nfs nls nptl nsplugin objc odbc ogg oggvorbis openal opengl oss pam pcmcia pcre pdf pdflib perl php png postgres pppd python qt quicktime readline real reflection ruby samba scanner sdl session skins slang sndfile speex spell spl sqlite sse sse2 ssl stream streamout svg tcltk tcpd tga theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales vcd vorbis webservices win32codecs wmf wxwindows xine xinerama xml xml2 xmms xorg xosd xpm xv xvid xvmc zlib video_cards_radeon linguas_it userland_GNU elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-05-23 16:07:10 UTC
Feel free to remove -O4 or whatever other cruft from there...
Comment 2 Fabio Bonfante 2006-05-23 16:50:36 UTC
i think removing the flag is most a workaround... in effect there isn't any "gcc-related" compile error there's only problem when the flag is passed to the python setup app.

This beaviour it's very hateful when you have a long emerge sequence to do containing samba, like an emerge -uDN world, or a simply emerge gnome in a fresh gentoo installation. 
If you don't have time to stay hours seeing compiling only for commenting a line in make.conf before emerging samba you are forced to compile all other stuff without this optimization...

Gentoo is all about choices, isn't it? ;-)

Somebody knows how to patch the makefile avoiding pass LDFLAGS to the python plugin?

PS Can we reopen bug?
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-05-23 16:57:25 UTC
(In reply to comment #2)
> Gentoo is all about choices, isn't it? ;-)

Sure, our choice is to not bother with fixing self-inflicted borkage.

> Somebody knows how to patch the makefile avoiding pass LDFLAGS to the python
> plugin?
> 
> PS Can we reopen bug?

No... Besides, you won't get any error if you'll setup your LDFLAGS properly (i.e., -Wl,-O4)