Bug 480876 - CDT managed build fails on first attempt in sync projects
Summary: CDT managed build fails on first attempt in sync projects
Status: NEW
Alias: None
Product: PTP
Classification: Tools
Component: RDT.sync (show other bugs)
Version: 9.1.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-28 10:13 EDT by Roberto Oliveira CLA
Modified: 2015-10-28 13:49 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto Oliveira CLA 2015-10-28 10:13:21 EDT
The first time I try to build a synchronized CDT managed C project it fails with following message:

15:04:01 **** Build of configuration Debug for project test_sync ****
make all 
/bin/bash: line 0: cd: /home/iplsdk/test_sync/Debug: No such file or directory
make: *** No rule to make target `all'.  Stop.
> Shell Completed (exit code = 2)

15:04:04 Build Finished (took 2s.317ms)
-------------------

The second time I try, it builds as expected. Seems that the Debug folder is not been synchronized before the first build and it fails.


Steps to reproduce:
1. File > New > Synchronized C/C++ Project
2. Select "Hello World ANSI C Project" on project type. And "Linux GCC" on Remote toolchain. Click "Finish"
3. Right-click project > Build Project
Comment 1 Roberto Oliveira CLA 2015-10-28 12:42:58 EDT
I took a better look in PTP code and in the synchronization behavior and seems that is not really a bug (maybe not the better design for all the scenarios).

By default, the sync projects come with the option "Sync Active After Save" active (right-click project > synchronize > Auto sync settings) and with this configuration the synchronization will happen just after saving a file, not before the build (so the Debug folder will be synchronized after the build happens and the build fails).

To solve the issue in this bug I should change the synchronization to "Sync Active Before Build" so the Debug folder is created locally, synchronized to the remote machine and finally the project is successfully built at first time.

Maybe could have a way to cover both scenarios (sync after save and sync before build) together?
Comment 2 John Eblen CLA 2015-10-28 13:49:33 EDT
Relevant design discussion:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=408513