This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 258228 - No such file or directory when building tests with -j 5 make file option
Summary: No such file or directory when building tests with -j 5 make file option
Status: STARTED
Alias: None
Product: cnd
Classification: Unclassified
Component: UnitTest Support (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: ilia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-03 14:23 UTC by slip
Modified: 2016-07-19 12:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description slip 2016-03-03 14:23:18 UTC
Overview:

When attempting to run a test after modifying a project's code. The build output sometimes includes error messages of "No such file or directory" referring to .o.d files.

The problem appears to be when using the -j flag as a make parameter.

Steps to reproduce:

1. Open a C/C++ project that contains a number of tests.
2. Modify NetBeans Options -> C/C++ -> Project Options -> Make Options to include "-j N" where N is the number of instances to run. I use 5 and have an 8 thread machine.
3. Make some changes to the project somewhere, save and build.
4. Attempt to run a test by right clicking on the Test in the project window then click "Test".
5. The build output may contain error messages pertaining to .o.d files that are not found.

Actual Results:

Frequently error messages in the build output such as:

make[2]: Entering directory `/home/sean/Projects/echo3'
.dep.inc:4: build/Debug/GNU-Linux/tests/src/tests/TerrainTest.o.d: No such file or directory
.dep.inc:4: build/Debug/GNU-Linux/tests/src/tests/TextRenderTest.o.d: No such file or directory
make[2]: *** No rule to make target `build/Debug/GNU-Linux/tests/src/tests/TextRenderTest.o.d'. Stop.

The output does not happen every time. If you persist and try executing the test again different tests may error or the Test may execute.

Expected Results:

No build errors should occur and the Test should execute.

Build Date & Hardware:
Product Version: NetBeans IDE 8.1 (Build 201510222201)
Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Linux version 3.13.0-30-generic running on amd64; UTF-8; en_GB (nb)

CPU: Intel Core i7 860
Memory: 16GB

Additional Information:

The project I am using has around 220 .cpp files and 30 tests.

I am using the make file option "-j 5". The issue appears to be a race condition of sorts it goes away if I remove the make option (but builds are obviously slower).

The files that are complained about vary between attempts. For example: The above result just occurred and when I try the exact same operation I received:

make[2]: Entering directory `/home/sean/Projects/echo3'
.dep.inc:4: build/Debug/GNU-Linux/tests/src/tests/TileMapTests.o.d: No such file or directory
make[2]: *** No rule to make target `build/Debug/GNU-Linux/tests/src/tests/TileMapTests.o.d'. Stop.

Which is another test in the project.

All of the tests listed above do not have any changes and do not need rebuilding, but a relink will occur.