It's all about the answers!

Ask a question

Eclipse CDT C++ Makefile project path problem


Alexey Zubko (112) | asked Jan 30 '14, 10:46 a.m.
edited Feb 06 '14, 12:06 p.m.

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 commented Feb 04 '14, 3:58 p.m.

Anyone? Should it be filed as a bug?


Krzysztof Kaźmierczyk commented 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 commented 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 commented Feb 06 '14, 12:32 p.m.
JAZZ DEVELOPER

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 commented 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 commented Feb 06 '14, 12:48 p.m.
JAZZ DEVELOPER

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 commented Feb 06 '14, 1:14 p.m.
JAZZ DEVELOPER

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 commented Feb 06 '14, 1:19 p.m.

Great! I hope they'll fix that soon.

showing 5 of 8 show 3 more comments

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.