Bug 5458

Summary: TMPDIR should not contain '-D' characters.
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Chen Qi <Qi.Chen>
Component: coreAssignee: Chen Qi <Qi.Chen>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: ke.zou, liezhi.yang, meta.mr.watcher, meta.watcher, sgw, yi.zhao
Version: 1.5   
Target Milestone: 1.6 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Chen Qi 2013-11-05 04:49:09 UTC
If my build directory is named to 'build-DVD', then building subversion-native would fail for the do_compile task.

The problem is that '-D' is usually used in CFLAGS and autotools treat '-D' as special when dealing with CFLAGS.

For example, in subversion's configure file, we have:
SVN_NEON_INCLUDES=`$PKG_CONFIG neon --cflags | $SED -e 's/-D[^ ]*//g'`

So when do_compile task is executed, some header files could not be found.

I think we should add a sanity check for TMPDIR about this situation.

//Chen Qi
Comment 1 Chen Qi 2013-11-15 02:49:50 UTC
I looked into the '-D' problem again, so it's actually caused by the following statement in subversion-native.
./build/ac-macros/neon.m4: SVN_NEON_INCLUDES=[`$PKG_CONFIG neon --cflags | $SED -e 's/-D[^ ]*//g'`]
./build/ac-macros/neon.m4: SVN_NEON_INCLUDES=[`$neon_config --cflags | $SED -e 's/-D[^ ]*//g'`]

I think we should fix subversion instead. 

//Chen Qi
Comment 2 Chen Qi 2013-12-06 04:43:47 UTC
Module: openembedded-core.git
Branch: master
Commit: 7078397ef39de43244fca7e24683b2a83913cbbf
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=7078397ef39de43244fca7e24683b2a83913cbbf

//Chen Qi
Comment 3 Ke Zou 2013-12-27 01:55:09 UTC
verified with poky master:005af45191ded6185c618c708181b31281e43092

test step:
. oe-init-build-env build-I-DVD
bitbake core-image-sato

no error encountered