Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 492952 - dev-util/boost-build compile can't handle tab characters in CFLAGS
Summary: dev-util/boost-build compile can't handle tab characters in CFLAGS
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: C++ Team [disbanded]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-30 15:24 UTC by Joshua Kinard
Modified: 2017-04-05 18:46 UTC (History)
0 users

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


Attachments
emerge --info (file_492952.txt,5.16 KB, text/plain)
2013-11-30 15:25 UTC, Joshua Kinard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2013-11-30 15:24:49 UTC
It looks like boost-build's build system dislikes tab characters inside of the CFLAGS variable in /etc/make.conf.  For readability, I have my CFLAGS formatted as this (\t == tab):

CFLAGS="-O2 -march=core2 -mtune=core2 \
\t-mfpmath=sse -msse -msse2 -mssse3 -msse4.1 \
\t-mcx16 -msahf -maccumulate-outgoing-args \
\t-fforce-addr -fmodulo-sched -fivopts \
\t-fgcse-after-reload -fgcse-lm -fgcse-sm -fgcse-las \
\t-ftree-loop-im -ftree-loop-linear -ftree-loop-ivcanon \
\t-ftree-vectorize"


However, because boost-build wraps each CFLAG in double quotes, it looks like it's retaining the tab characters.  Note the whitespace before -mfpmath=sse and -mcx16 as examples:

    "x86_64-pc-linux-gnu-gcc"   -o bin.linuxx86_64/b2 "-DNDEBUG" "-DOPT_HEADER_CACHE_EXT" "-DOPT_GRAPH_DEBUG_EXT" "-DOPT_SEMAPHORE" "-DOPT_AT_FILES" "-DOPT_DEBUG_PROFILE" "-DOPT_FIX_TARGET_VARIAB
LES_EXT" "-DOPT_IMPROVED_PATIENCE_EXT" "-DYYSTACKSIZE=5000" "-O2" "-march=core2" "-mtune=core2" "       -mfpmath=sse" "-msse" "-msse2" "-mssse3" "-msse4.1" "   -mcx16" "-msahf" "-maccumulate-outg
oing-args" "    -fforce-addr" "-fmodulo-sched" "-fivopts" "     -fgcse-after-reload" "-fgcse-lm" "-fgcse-sm" "-fgcse-las" "     -ftree-loop-im" "-ftree-loop-linear" "-ftree-loop-ivcanon" "    -ft
ree-vectorize" "command.c" "compile.c" "constants.c" "debug.c" "function.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" "object.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" "md5.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" "-Wl,-z,no


Which leads to this build failure:
x86_64-pc-linux-gnu-gcc: error:         -mfpmath=sse: No such file or directory
x86_64-pc-linux-gnu-gcc: error:         -mcx16: No such file or directory
x86_64-pc-linux-gnu-gcc: error:         -fforce-addr: No such file or directory
x86_64-pc-linux-gnu-gcc: error:         -fgcse-after-reload: No such file or directory
x86_64-pc-linux-gnu-gcc: error:         -ftree-loop-im: No such file or directory
x86_64-pc-linux-gnu-gcc: error:         -ftree-vectorize: No such file or directory
...skipped bjam for lack of b2...
...failed updating 1 target...
 * ERROR: dev-util/boost-build-1.53.0::gentoo failed (compile phase):
 *   building bjam failed


The quick fix is to either make CFLAGS a one-liner or remove the tabs.
Comment 1 Joshua Kinard gentoo-dev 2013-11-30 15:25:26 UTC
Created attachment 364266 [details]
emerge --info
Comment 2 David Seifert gentoo-dev 2017-04-05 18:46:05 UTC
Removed from tree, reopen if issue persists.

commit abc5c3d3b5a854114070bf6ed2a9e6ad2f04d6e8
Author: David Seifert <soap@gentoo.org>
Date:   Tue Apr 4 19:33:14 2017 +0200

    dev-util/boost-build: Remove old