I have a “super” makefile which launches two “sub” make file:
libwebcam:
@echo -e “\nInvoking libwebcam make.”
$(MAKE) -C $(TOPDIR)/libwebcam
uvcdynctrl:
@echo -e “\nInvoking uvcdynctrl make.”
$(MAKE) -C $(TOPDIR)/uvcdynctrl
uvcdynctrl uses libwebcam… I noticed that those two builds are launched as separate threads by make ! Thus sometimes the lib is not available when uvcdynctrl starts being built, and I get errors. By default, make should not launch commands as threads since this is available only through -j (number of jobs) and, according to the make manual, there is no thread by default. I run this on an Ubuntu.
Did someone face the same issue ?
Apple92
I don’t know why you’re commands are being threaded, but threading is not the problem, dependency is. If you set up the dependency correctly this error won’t appear and if you don’t it may appear, threads or no threads.
In the uvcdynctrl makefile, make libwebcam a prerequisite of uvcdynctrl and put in the rule for making libwebcam.