Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 293652 - dev-util/boost-build fails to compile if {C,LD}FLAGS contain extra white space
Summary: dev-util/boost-build fails to compile if {C,LD}FLAGS contain extra white space
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tiziano Müller (RETIRED)
URL: https://svn.boost.org/trac/boost/tick...
Whiteboard:
Keywords:
: 265402 278148 290438 312717 (view as bug list)
Depends on:
Blocks: portage-multilib
  Show dependency tree
 
Reported: 2009-11-18 19:38 UTC by Sebastian Luther (few)
Modified: 2010-08-14 06:34 UTC (History)
15 users (show)

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


Attachments
boost-build-flags-unescape.patch (boost-build-flags-unescape.patch,1.58 KB, text/plain)
2009-12-06 07:00 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details
environment file of my build (boost.env,112.12 KB, text/plain)
2009-12-10 09:07 UTC, Bjørn Magnus Mathisen
Details
patch to the ebuild to include the upstream patch (boost-build-1.41.0.ebuild.patch,346 bytes, patch)
2010-03-27 15:56 UTC, quazgar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Luther (few) 2009-11-18 19:38:34 UTC
I filed a bug upstream for this, see URL. If your bug was marked as duplicate of this one, remove any extra white space from your CFLAGS and LDFLAGS.
Comment 1 Sebastian Luther (few) 2009-11-18 19:42:18 UTC
*** Bug 278148 has been marked as a duplicate of this bug. ***
Comment 2 Sebastian Luther (few) 2009-11-18 19:42:31 UTC
*** Bug 290438 has been marked as a duplicate of this bug. ***
Comment 3 Sebastian Luther (few) 2009-11-18 19:47:14 UTC
*** Bug 265402 has been marked as a duplicate of this bug. ***
Comment 4 Navid Zamani 2009-11-18 22:25:27 UTC
Uuum, as shown in my emerge --info, I *have no extra white space in my {C,LD}FLAGS*. So this is not exactly the same error, isn’t it?

CFLAGS="-O2 -mtune=athlon-xp -fomit-frame-pointer -pipe -falign-functions=4 -fweb"
CXXFLAGS="-O2 -mtune=athlon-xp -fomit-frame-pointer -pipe -falign-functions=4 -fweb"
LDFLAGS="-Wl,-O1"
Comment 5 Sebastian Luther (few) 2009-11-19 07:31:51 UTC
(In reply to comment #4)
> Uuum, as shown in my emerge --info, I *have no extra white space in my
> {C,LD}FLAGS*. So this is not exactly the same error, isn’t it?

Please file a new bug and attach your emerge --info, the build.log and the environment file there. Make sure you are using the latest stable version.
Comment 6 Tiziano Müller (RETIRED) gentoo-dev 2009-11-19 09:19:40 UTC
(In reply to comment #4)
> Uuum, as shown in my emerge --info, I *have no extra white space in my
> {C,LD}FLAGS*. So this is not exactly the same error, isn’t it?
> 
> CFLAGS="-O2 -mtune=athlon-xp -fomit-frame-pointer -pipe -falign-functions=4
> -fweb"
> CXXFLAGS="-O2 -mtune=athlon-xp -fomit-frame-pointer -pipe -falign-functions=4
> -fweb"
> LDFLAGS="-Wl,-O1"
> 

If the linebreak between -falign-functions and -fweb (which I consider ricer-flags but that's your problem) is not introduced when pasting it here those are whitespaces as well and it's the same bug
Comment 7 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2009-12-06 07:00:58 UTC
Created attachment 212207 [details]
boost-build-flags-unescape.patch

This patch seems to allow compilation of >=boost-build-0.39; previous versions appear not to be affected.
Comment 8 Bjørn Magnus Mathisen 2009-12-09 09:28:31 UTC
emerge --info
Portage 2.1.7.11 (default/linux/amd64/10.0/desktop, gcc-4.4.2, glibc-2.11-r1, 2.6.27.35-alt131-amd64 x86_64)
=================================================================
System uname: Linux-2.6.27.35-alt131-amd64-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E6850_@_3.00GHz-with-gentoo-2.0.1
Timestamp of tree: Wed, 09 Dec 2009 08:15:01 +0000
app-shells/bash:     4.0_p35
dev-java/java-config: 1.3.7, 2.1.10
dev-lang/python:     2.4.4-r6, 2.5.4-r3, 2.6.4, 3.1.1-r1
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.8.0
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.5.3
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.64
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O3 -pipe -fomit-frame-pointers"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
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/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O3 -pipe -fomit-frame-pointers"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.gentoo.no http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j4"
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="/usr/local/portage/layman/desktop-effects /usr/local/portage/layman/cell /usr/local/portage/layman/berkano"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi aim alsa amd64 bash-completion berkdb blas bluetooth branding bzip2 cdda cddb cdinstall cdio cdparanoia cdr clamav cli consolekit cpudetection cracklib cscope css ctype cups cvs cxx dbus directfb doc dri dts dvd dvdr dvdread eds emacs emboss encode enscript evo examples exif fam fbcon ffmpeg fftw firefox flac fontconfig fortran ftp gd gdbm gif gimp git glitz glut gmp gnuplot gnutls gphoto2 gpm gstreamer guile hal httpd iconv id3tag ieee1394 imagemagick imap imlib ipv6 java java6 javascript jpeg jpeg2k kde ladspa lame lapack latex ldap libcaca libnotify libwww lm_sensors lua lz lzo mad maildir mikmod mime mmx mmxext mng modules mp2 mp3 mp4 mpeg mpi mplayer msn mudflap mule multilib musepack musicbrainz mysql nas ncurses nemesi nls nntp nocd nptl nptlonly nsplugin ocaml ogg openal opengl openmp optimisememory oss pam pcre pdf perl plotutils png pnm posix ppds pppd pulseaudio pvr python pyton qt3support qt4 quicktime radio rar readline reflection rss ruby samba sasl scanner sdl session shout skins snmp speex spell spl sql sse sse2 ssl ssse3 startup-notification stream subversion svg swscaler sysfs syslog sysvipc taglib tcl tcpd teletext tetex tga theora threads thunar tiff tk transcode truetype twolame unicode upnp usb vcd vcdx vim-syntax vnc vorbis webkit wifi wmf wxwindows x264 xanim xattr xcb xcomposite xinerama xml xorg xosd xpm xprint xscreensaver xulrunner xv xvid xvmc zlib zoran" 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 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv vmware" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

and I get:

[COMPILE] bin.linuxx86_64/bjam
x86_64-pc-linux-gnu-gcc: : No such file or directory
expand.c: In function ‘var_expand’:
expand.c:85: warning: field precision should have type ‘int’, but argument 2 has type ‘long int’
variable.c: In function ‘var_string_to_file’:
variable.c:408: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
variable.c:409: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result

    "x86_64-pc-linux-gnu-gcc"   -o bin.linuxx86_64/bjam "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DOPT_FIX_TARGET_VARIABLES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DYYSTACKSIZE=5000" "-march=nocona" "-O3" "-pipe" "" "-fno-strict-aliasing" "-O" "-Wl,-O1" "command.c" "compile.c" "debug.c" "expand.c" "glob.c" "hash.c" "hcache.c" "headers.c" "hdrmacro.c" "jam.c" "jambase.c" "jamgram.c" "lists.c" "make.c" "make1.c" "mem.c" "newstr.c" "option.c" "output.c" "parse.c" "regexp.c" "rules.c" "scan.c" "search.c" "subst.c" "w32_getreg.c" "timestamp.c" "variable.c" "modules.c" "strings.c" "filesys.c" "builtins.c" "pwd.c" "class.c" "native.c" "modules/set.c" "modules/path.c" "modules/regex.c" "modules/property-set.c" "modules/sequence.c" "modules/order.c" "execunix.c" "fileunix.c" "pathunix.c"

...failed [COMPILE] bin.linuxx86_64/bjam...
...failed updating 1 target...
...updated 1 target...
 * ERROR: dev-util/boost-build-1.41.0 failed:
 *   building bjam failed
Comment 9 Sebastian Luther (few) 2009-12-09 09:40:02 UTC
Please attach the environment file.
Comment 10 Bjørn Magnus Mathisen 2009-12-10 09:07:07 UTC
Created attachment 212605 [details]
environment file of my build

attached my environment file.
Comment 11 Sebastian Luther (few) 2009-12-10 12:06:25 UTC
Have a look at the beginning of emerge's output:

 * Filtering out invalid CFLAG "-fomit-frame-pointers"
 * Filtering out invalid CXXFLAG "-fomit-frame-pointers"

This causes the extra white space.
Comment 12 Bjørn Magnus Mathisen 2009-12-10 12:36:40 UTC
You are indeed correct, i did not notice this line of output, I apologize for my premature bug posting and stand corrected. Thanks a lot for the help!
Comment 13 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-01-17 02:23:21 UTC
The upstream bug seems to be making _slight_, _slow_ progress ;-)
https://svn.boost.org/trac/boost/ticket/3630
Comment 14 Nicolas Dietrich 2010-03-04 03:10:38 UTC
(In reply to comment #11)
> Have a look at the beginning of emerge's output:
> 
>  * Filtering out invalid CFLAG "-fomit-frame-pointers"
>  * Filtering out invalid CXXFLAG "-fomit-frame-pointers"
> 
> This causes the extra white space.

Right, removing -fomit-frame-pointers also solves this problem for me (compiling dev-libs/boost-1.42.0 on amd64).

Though the last failing merge created unexpected trouble: installed the package, but marked as failed. Thus building again, this time without -fomit-frame-pointers, resulted in all files marked as collisions. This is probably a separate bug, which I am too lazy to file now.
Comment 15 Sebastian Luther (few) 2010-03-04 07:12:04 UTC
(In reply to comment #14)
> (In reply to comment #11)
> > Have a look at the beginning of emerge's output:
> > 
> >  * Filtering out invalid CFLAG "-fomit-frame-pointers"
> >  * Filtering out invalid CXXFLAG "-fomit-frame-pointers"
> > 
> > This causes the extra white space.
> 
> Right, removing -fomit-frame-pointers also solves this problem for me
> (compiling dev-libs/boost-1.42.0 on amd64).
> 
> Though the last failing merge created unexpected trouble: installed the
> package, but marked as failed. Thus building again, this time without
> -fomit-frame-pointers, resulted in all files marked as collisions. This is
> probably a separate bug, which I am too lazy to file now.
> 

Could you please attach the build.log?
Comment 16 Nicolas Dietrich 2010-03-04 14:51:57 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > (In reply to comment #11)
> > > Have a look at the beginning of emerge's output:
> > > 
> > >  * Filtering out invalid CFLAG "-fomit-frame-pointers"
> > >  * Filtering out invalid CXXFLAG "-fomit-frame-pointers"
> > > 
> > > This causes the extra white space.
> > 
> > Right, removing -fomit-frame-pointers also solves this problem for me
> > (compiling dev-libs/boost-1.42.0 on amd64).
> > 
> > Though the last failing merge created unexpected trouble: installed the
> > package, but marked as failed. Thus building again, this time without
> > -fomit-frame-pointers, resulted in all files marked as collisions. This is
> > probably a separate bug, which I am too lazy to file now.
> > 
> 
> Could you please attach the build.log?

Sorry, I forgot to save the logfile and already fixed the problem manually and rebuilt boost (and restarted tmpfs ...). I don't have the time to reproduce the mess as too many packages already depend on the newly built boost. Sorry!!

Comment 17 Robert Lippmann 2010-03-13 19:31:09 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > (In reply to comment #14)
> > > (In reply to comment #11)
> > > > Have a look at the beginning of emerge's output:
> > > > 
> > > >  * Filtering out invalid CFLAG "-fomit-frame-pointers"
> > > >  * Filtering out invalid CXXFLAG "-fomit-frame-pointers"
> > > > 
> > > > This causes the extra white space.
> > > 
> > > Right, removing -fomit-frame-pointers also solves this problem for me
> > > (compiling dev-libs/boost-1.42.0 on amd64).
> > > 
> > > Though the last failing merge created unexpected trouble: installed the
> > > package, but marked as failed. Thus building again, this time without
> > > -fomit-frame-pointers, resulted in all files marked as collisions. This is
> > > probably a separate bug, which I am too lazy to file now.
> > > 
> > 
> > Could you please attach the build.log?
> 
> Sorry, I forgot to save the logfile and already fixed the problem manually and
> rebuilt boost (and restarted tmpfs ...). I don't have the time to reproduce the
> mess as too many packages already depend on the newly built boost. Sorry!!
> 

On my machine, the correct gcc (4.x) flag is:

-fomit-frame-pointer

not:

-fomit-frame-pointers
Comment 18 Nicolas Dietrich 2010-03-14 12:34:00 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > (In reply to comment #15)
> > > (In reply to comment #14)
> > > > (In reply to comment #11)
> > > > > Have a look at the beginning of emerge's output:
> > > > > 
> > > > >  * Filtering out invalid CFLAG "-fomit-frame-pointers"
> > > > >  * Filtering out invalid CXXFLAG "-fomit-frame-pointers"
> > > > > 
> > > > > This causes the extra white space.
> > > > 
> > > > Right, removing -fomit-frame-pointers also solves this problem for me
> > > > (compiling dev-libs/boost-1.42.0 on amd64).
> > > > 
> > > > Though the last failing merge created unexpected trouble: installed the
> > > > package, but marked as failed. Thus building again, this time without
> > > > -fomit-frame-pointers, resulted in all files marked as collisions. This is
> > > > probably a separate bug, which I am too lazy to file now.


> On my machine, the correct gcc (4.x) flag is:
> 
> -fomit-frame-pointer
> 
> not:
> 
> -fomit-frame-pointers


Right. This hasn't been my problem though - removing "-fomit-frame-pointer" solved this particular issue (I accidently copied the wording from above). 
Comment 19 quazgar 2010-03-27 15:45:08 UTC
How about including this patch
https://svn.boost.org/trac/boost/attachment/ticket/3630/boost-build-flags-unescape.patch
for older versions which don't have this fixed upstream yet?
Comment 20 quazgar 2010-03-27 15:56:37 UTC
Created attachment 225461 [details, diff]
patch to the ebuild to include the upstream patch

Oops, comment #7 gave the relevant patch already :)  Now here's a patch to the ebuild.  Plus the ewarns culd be removed now I think
Comment 21 Chí-Thanh Christopher Nguyễn gentoo-dev 2010-04-01 22:50:29 UTC
*** Bug 312717 has been marked as a duplicate of this bug. ***
Comment 22 David Owen 2010-04-06 01:50:36 UTC
Having an empty CFLAGS (CFLAGS="") also causes the build to fail.
Comment 23 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-04-06 03:09:27 UTC
(In reply to comment #22)
> Having an empty CFLAGS (CFLAGS="") also causes the build to fail.
Please attach your build.log. Did you ensure that LDFLAGS had no spaces in it as well?
Comment 24 Steve Herber 2010-04-06 21:12:06 UTC
I manually applied the patch into the 1.42 ebuild and it worked for me on my ~amd64 system.
Comment 25 KevinS 2010-04-10 15:59:30 UTC
Another comment:

I changed mt CFLAGS from:

CFLAGS="-march=native -02 -pipe"

To:
CFLAGS="-march=athlon64 -O2 -pipe -msse2"

And I was able to compile boost-build.  There are no extra white spaces in:
CFLAGS="-march=native -02 -pipe"
Comment 26 Jose Fernandez-Alcon 2010-04-16 13:34:10 UTC
What it made the difference for me was changing the -02 (zero two) to -O2 (capital o two).

FAIL: CFLAGS="-march=native -02 -pipe -fomit-frame-pointer"

OK: CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
Comment 27 Guillaume Castagnino 2010-07-12 08:30:07 UTC
This commit introduces an extra white space in LDFLAGS and so breaks boost-build for all linux profiles :

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/profiles/default/linux/make.defaults?r1=1.4&r2=1.5

Boost needs to be fixed ;)
Comment 28 Lat Miver 2010-07-17 13:22:03 UTC
SOLVED adding LDFLAGS="-Wl,-O1" to my make.conf (I had no personnal LDFLAGS configuration, but there was an extra space on my default/linux/x86/10.0 profile
Comment 29 Christopher Dale 2010-07-20 03:41:06 UTC
@Samhob, I was hit with this one too; and like you it was LDFLAGS that caused the failure. I ended up running emerge --info boost-build to find that LDFLAGS="-Wl,-O1 ", so I set it to LDFLAGS="-Wl,-O1" in /etc/make.conf. I'll probably remove that from my /etc/make.conf file after boost-build is done.
Comment 30 Ryan Hill (RETIRED) gentoo-dev 2010-08-14 06:33:42 UTC
I commited the upstream patch to versions >=1.39.0.  LDFLAGS whitespace still failed even when added to the patch (I think it's because of LIBS=${LDFLAGS} in the ebuild) so I also worked around that in all versions.