Eclipse CDT C++ Makefile project path problem
I can't build my C++ Makefile project when it's connected to Jazz source control. I think the problem is in the current working directory.
If I replace "make" command with "bash -c pwd" I can see in the console:
When the project is disconnected from RTC/Jazz source control:
10:40:43 **** Build of configuration Default for project soam ****
bash -c pwd
/data/alexeyz/src/soam/soam
10:40:44 Build Finished (took 80ms)
When it's connected (Team->Share Project..->Jazz Source Control...), the current directory is my home directory (from where eclipse was started):
10:41:42 **** Build of configuration Default for project soam ****
bash -c pwd
/home/alexeyz
10:41:42 Build Finished (took 73ms)
That's Eclipse Juno SR2 with all updates and RTC plugin (3.1.500v20130804_0220). OS is RHEL 6 x86_64. I see no other errors or warnings. Changing "Build location" parameter in C++ Build Settings (it's ${workspace_loc:/soam}/ ) doesn't make any effect.
------------------------------------------
Can't post screenshots in the comments, so I put them here:
This is a default "C++ Makefile project", no changes were made. CDT executes a command ("make" or you could override - I ran "bash -c pwd") in Build location directory. When Jazz source control is enabled the command executed in eclipse's work directory instead. Looks like a bug.
Here are some screenshots:
You could see PWD and CWD are set properly:
This is when Jazz source control is enabled (executed in wrong directory):
And this is after I disconnected Jazz source control (directory is fine):
Comments
Alexey Zubko
Feb 04 '14, 3:58 p.m.Anyone? Should it be filed as a bug?
Krzysztof Kaźmierczyk
Feb 05 '14, 5:29 a.m.Hi Alex,
Could you please share the information how you are building the project? What are exactly options you are using? Please provide the screen shot.
Alexey Zubko
Feb 06 '14, 12:12 p.m.Something is really crazy with this messages editor. It doesn't display pictures but if I press edit it shows them. Can't upload either - need higher reputation.
Karl Weinert
JAZZ DEVELOPER Feb 06 '14, 12:32 p.m.Hi Alexey,
Yea It's odd that you can paste pictures but they don't show up.
Sometimes I can find them after the fact and post them for you, but not this time.
But I think you have a PMR open. Is that correct?
If so I seem to be able to repro your problem using MinGW on Windows.
If not someone else has a similar issue we are looking into.
Project not under source control that works
Info: Internal Builder is used for build
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o "src\External.o" "..\src\External.cpp"
g++ -o External.exe "src\External.o"
Project added to source control
Info: Internal Builder is used for build
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o "C:\default\Shared\Debug\src\Shared.o" "C:\Users\kweinert.DEV\workspace\Shared\src\Shared.cpp"
Cannot run program "g++": The directory name is invalid.
Seems to be pointing to a "default" directory.
Alexey Zubko
Feb 06 '14, 12:35 p.m.No I didn't open PMR yet, could you pointing me out how to do that?
Karl Weinert
JAZZ DEVELOPER Feb 06 '14, 12:48 p.m.I don't know all the ins and outs but this is where you open one:
https://www-947.ibm.com/support/servicerequest/Home.action
I believe your company has to have put you on a list of users that have permissions to open PMRs.
Either way I'll be sure to update this post when I get an answer for the one I am currently looking at.
Karl Weinert
JAZZ DEVELOPER Feb 06 '14, 1:14 p.m.Alexey I found this defect on the eclipse site and it appears to be a problem with CDT
https://bugs.eclipse.org/bugs/show_bug.cgi?id=423342
More to follow
Alexey Zubko
Feb 06 '14, 1:19 p.m.Great! I hope they'll fix that soon.