Bug 317528 - Managed build using wrong working directory
Summary: Managed build using wrong working directory
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build-managed (show other bugs)
Version: 6.0.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-21 18:23 EDT by Sean Simmons CLA
Modified: 2020-09-04 15:17 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Simmons CLA 2010-06-21 18:23:07 EDT
I'm running Eclipse 3.5.2/CDT 6.0.2 on Ubuntu 10.04. I have the same problem with essentially the same configuration of Eclipse on Ubuntu 9.10. I've got several projects in my workspace all of which use the internal builder. On occasion, the internal builder seems to use my home directory as the working directory instead of the target directory.

I added a pwd command to the pre-build steps and here's what I get:

**** Internal Builder is used for build ****
pwd
/home/sean
i686-unknown-linux-gnu-g++ -I/home/sean/workspace/platform/Platform/include -O0 -g3 -Wall -c -fmessage-length=0 -fPIC -oTestPlugIn.o ../TestPlugIn.cpp
.i686-unknown-linux-gnu-g++: ../TestPlugIn.cpp: No such file or directory
.i686-unknown-linux-gnu-g++: no input files
Build error occurred, build is stopped
Time consumed: 125 ms.

Cleaning the project fixes the problem:

**** Internal Builder is used for build ****
pwd
/home/sean/workspace/platform/TestPlugIn/Debug
i686-unknown-linux-gnu-g++ -I/home/sean/workspace/platform/Platform/include -O0 -g3 -Wall -c -fmessage-length=0 -fPIC -oTestPlugIn.o ../TestPlugIn.cpp
i686-unknown-linux-gnu-g++ -L/home/sean/workspace/platform/Platform/Debug -shared -oTestPlugIn.so TestPlugIn.o -lPlatform -lboost_thread -lboost_system
Build complete for project TestPlugIn
Time consumed: 517 ms.

Once a build succeeds, it seems to work until the project is cleaned again. Then the problem may or may not occur or may occur in a different project if the entire workspace is cleaned.