[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mangled argument vector choking on spaces?

From: Kip Warner
Subject: Mangled argument vector choking on spaces?
Date: Mon, 29 Dec 2014 16:27:51 -0800

Hey list,

My updates CXXFLAGS periodically during execution, such as
via pkg-config. Some of the include paths returned from pkg-config's
--cflags contain spaces which I require. It's paths are properly
escaped, so this is not a problem thus far.

        $ pkg-config --cflags libfoo
        -I/some/path\ space

The problem is then when CXXFLAGS is amended with what is returned
breaking further conftests. This is fine:

        CXXFLAGS="$CXXFLAGS -I/some/path/no_spaces"

This breaks:

        CXXFLAGS="$CXXFLAGS -I/some/path\ space"

All succeeding conftests appear to bail. The config.log is revealing:

        configure:9444: g++ -c -g3 -std=c++11  ... -I/some/path\ spaces  
conftest.cpp >&5
        g++: error: spaces: No such file or directory

If I run what appears to be what configure executed (g++ ...), it
executes fine. However, by the looks of it, the argument vector was
broken up unintentionally.

I'm assuming I am not doing something correctly. Any help appreciated.


Kip Warner -- Senior Software Engineer
OpenPGP encrypted/signed mail preferred

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]