开发者

C++ Make compile errors with Poco Library - Path Name containing spaces

I'm attempting to build/install/use the Poco C++ Libraries. I'm running Ubututu (Natty). I've compiled the static libraries which are 开发者_开发知识库working fine, but when I set the env var PROJECT_BASE to a path containing spaces, I get errors:

make
/bin/sh: Syntax error: Unterminated quoted string
/bin/sh: Syntax error: Unterminated quoted string
/home/username/Documents/poco-1.4.1p1/build/rules/global:62: *** Current working directory not under $PROJECT_BASE. Stop.

I've set PROJECT_BASE to:

/files/Dropbox/Myname\'s\ Work/C++\ Work

which I believe should be escaped correctly? Adding a trailling backspace gives me the alternate error of:

make
/bin/sh: Syntax error: Unterminated quoted string
awk: line 1: runaway string constant "/files/Dro ...
/home/username/Documents/poco-1.4.1p1/build/rules/global:62: *** Current working directory not under $PROJECT_BASE. Stop.

I might be missing something basic, but I've been wrestling for a few days now to get the Poco C++ Library build system set up how I want it to no avail :S I know the README said something about SYMBLINKS screwing up the PROJECT_BASE, but I'm no using any :S /files is an ext4 mount (same hdd, seperate partition) if that's relevant at all.

Thanks for your help!


For anyone else getting the: "* Current working directory not under $PROJECT_BASE. Stop." error, I found a solution that maybe sounds obscure.

Basically, if any of the parent directories are symlinks, it will generate this error.

IMPORTANT: Make sure that the path to the build directory does not contain symbolic links. Furthermore, on Mac OS X (or other systems with case insensitive filesystems), make sure that the characters in the path have the correct case. Otherwise you'll get an error saying "Current working directory not under $PROJECT_BASE.".

http://pocoproject.org/docs/00200-GettingStarted.html

In my case, I was compiling the library 5 levels deep and the second directory was a symlink. Changing it to a directory resolved the issue.

HTH


It requires great care and deliberate effort to make systems such as makefiles handle pathnames with spaces accurately. It can be done; it is not trivial. It is fairly clear that this package has not been so modified; it is like the majority of such packages.

If you really want to make life hell for yourself, use a pathname such as:

/home/mine/He said, "Don't do it!"/poco-1.4.1

Spaces, single and double quotes -- at least it doesn't include backquotes, dollars, parentheses, newlines, etc.

In the meantime, bow to the inevitable - use a pathname without spaces etc in it.


If your problem is not with symlinks, as in my case, you probably are not specifying a full path, but instead a relative one, as indicated in the following blog post.

http://fatalfeel.blogspot.com/2013/09/poco-with-cocos2d-in-android-and-ios.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜