Bug 7874 - subversion-native compile failure with missing serf header on paths containing "-D"
Summary: subversion-native compile failure with missing serf header on paths containin...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.9 M2
Assignee: Jose Lamego
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-06-10 22:54 UTC by Paul Gortmaker
Modified: 2015-07-14 17:08 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Gortmaker 2015-06-10 22:54:31 UTC
If you create a project with a dash and a capital "D", you will get a build failure on subversion-native.  For example, "/home/paul/My-Demo"

This happens because subversion serf.m4 contains this line:

 http://svn.apache.org/repos/asf/subversion/branches/master-passphrase/build/ac-macros/serf.m4

SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_major --cflags | $SED -e 's/-D[^ ]*//g'`]

Presumably the sed was to remove "-Dfoo=bar" type stuff from cflags, but it also mangles any "-I/path/with/a/dash/dee/my-Dir/include" too.  Which then means you won't get the include path to the serf.h and the compile will fail.

A possible sed expression to fix this would be:

echo "-Dcrap -I/home/here/foo-D/paul -Dbar=foo"| sed -e 's/[[:space:]]-D[^ ]*//g' -e 's/^-D[^ ]*//g'
-I/home/here/foo-D/paul

compared to the failure of the original:

echo "-Dcrap -I/home/here/foo-D/paul -Dbar=foo" | sed -e 's/-D[^ ]*//g'  
 -I/home/here/foo 

[possible sed regex courtesy of seebs]
Comment 1 Jose Lamego 2015-07-14 17:08:17 UTC
The patch is merged by subversion upstream with replacing '[[:space:]]' with ' '.

http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/serf.m4?r1=1594156&r2=1689824