Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race condition in Makefile #12

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Conversation

ek9852
Copy link

@ek9852 ek9852 commented Mar 7, 2018

Fix the following error:

make install
./uninstall-opencv.sh
make: execvp: ./uninstall-opencv.sh: Text file busy
Makefile:27: recipe for target 'uninstallopencv' failed
make: *** [uninstallopencv] Error 127

The problem is that Makefile will run in parallel,
and chmod and execvp just run at the same time will
trigger this. git support +x natively.
Just checkin the code with +x permission and remove
the chmod hack in the Makefile

nealvis and others added 18 commits October 10, 2017 18:13
The intent of this pull is to streamline the API only make instructions to include it as an option in the download itself.
- Changed 2-spacing to 4-spacing
- Make self-consistent indentation
Make indent consistent with PEP-8
Update Makefile to include a "make api" command
Fix the following error:
===========
make install
./uninstall-opencv.sh
make: execvp: ./uninstall-opencv.sh: Text file busy
Makefile:27: recipe for target 'uninstallopencv' failed
make: *** [uninstallopencv] Error 127

The problem is that Makefile will run in parallel,
and chmod and execvp just run at the same time will
trigger this. git support +x natively.
Just checkin the code with +x permission and remove
the chown hack in the Makefile
@jjo-in-pdx
Copy link

make doesn't run in parallel unless you run at make -jN with N>1... Are you seeing something different? On what system?

GNU make knows how to execute several recipes at once. Normally, make will execute only one recipe at a time, waiting for it to finish before executing the next. However, the ‘-j’ or ‘--jobs’ option tells make to execute many recipes simultaneously.
https://www.gnu.org/software/make/manual/html_node/Parallel.html

@ek9852
Copy link
Author

ek9852 commented Mar 8, 2018 via email

@jjo-in-pdx
Copy link

I forgot to thank you, @ek9852 , for the submissions on this as well, so thanks again. I did a search on AWS running make in parallel and didn't find anything. I will discuss this request, but doing a search for GitHub executable permissions shows lots of issues people have had, a fair amount had to do with Windows and Unix/Linux/Mac cross platform complications that we would want to avoid.

Are you able to run NCS natively on Darwin/Mac OS ? Somebody asked that on the #11 (comment) but I didn't see an answer.

@ek9852
Copy link
Author

ek9852 commented Mar 10, 2018

It can at least built the api and use it on MBP, but not everything builts.
chmod is fast and after a few times tries the race condition might go though. But If this is a problem, this is a problem and we have the log.
I don't understand why "executable permissions shows lots of issues", it does not make sense to me.

@molyswu
Copy link

molyswu commented Jun 29, 2018

Hi,
Make a CNN model on examples caffe or tensorflow ,how to set the number of SHAVE ?

Thanks for your help!

@oraoto
Copy link

oraoto commented Jun 29, 2018

I encounter the same problem when building the Docker images. Some quick search leads to this sync hack: moby/moby#9547 (comment)

.PHONY: uninstallopencv
uninstallopencv:
	sync
	./uninstall-opencv.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants