Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 344740

Summary: Error when SourceDir.outputDir is set to a relative path within a directory with spaces
Product: [Technology] RTSC Reporter: Sasha Slijepcevic <sascha>
Component: CoreAssignee: Dave Russo <d-russo>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: target:3.22.03

Description Sasha Slijepcevic CLA 2011-05-04 13:32:30 EDT
My CCS workspace is C:\Documents and Settings\a0868339\My Documents\workspace\. When I build a project there, with a following line in the config script:
xdc.module("xdc.cfg.SourceDir").outputDir = "../src";

I get the following error:
error: xdc.cfg.SourceDir: "E:/XDCtools installs/xdctools_3_22_00_08_eng/packages/xdc/cfg/SourceDir.xs", line 122: xdc.cfg.SourceDir : Build of generated source libraries failed: exit status = 2: gmake[1]: C:\Documents: No such file or directory

When I use an absolute path with spaces for 'outputDir', I get the following error:
../src/makefile.libs:22: *** "ERROR: GEN_SRC_DIR must be set to the directory containing the generated sources".

I checked what's in that file, and the line that fails is:
GEN_SRC_DIR ?= ../../src

When I edited the line to
GEN_SRC_DIR ?= ../src
the build worked.
Comment 1 Sasha Slijepcevic CLA 2011-05-05 17:09:46 EDT
The second problem with the absolute path happens when 'outputDir' points to a project directory, for example "C:/Documents and Settings/a0868339/My Documents/workspace/M3closure/src" for the project M3closure. However, the error does not show up if the 'outputDir' is inside 'Debug' or 'Release' direcotry, for example "C:/Documents and Settings/a0868339/My Documents/workspace/M3closure/Debug/src"
Comment 2 Dave Russo CLA 2011-06-15 20:15:55 EDT
Moved to 3.22.02
Comment 3 Dave Russo CLA 2011-07-11 14:39:48 EDT
There are several problems configuring SourceDir.outputDir in CCS projects:
    1. the makefile.defs assumes the directory is ./src so changes to outputDir
       must be matched with changes to makefile.defs
    2. setting outputDir is not enough to handle the CCS project build working
       directory which is in ./Debubg or ./Release, ...  You must also set 
       SourceDir.toBuildDir
    3. finally, there is a bug in the command executed by SourceDir to build 
       the generated sources and in the generated makefile: they do not handle
       directories with spaces in the absolute path to the outputDir.

The last problem was "fixed" by replacing directories with spaces by Windows 8.3 names.
Comment 4 Dave Russo CLA 2011-07-11 15:00:08 EDT
fixed in r 1455 (to be xdc-x16)
Comment 5 Dave Russo CLA 2011-11-09 18:56:07 EST
closing "ancient" resolved bugs