Skip to content

parallel make fails with mkdir: ./obj: File exists #134

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

Closed
LudovicRousseau opened this issue Nov 29, 2014 · 6 comments
Closed

parallel make fails with mkdir: ./obj: File exists #134

LudovicRousseau opened this issue Nov 29, 2014 · 6 comments

Comments

@LudovicRousseau
Copy link

I have a multicore processor so I use make -j9 to benefit from GNU make parallelism.
But that fails with:

$ make -j2
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C build/gmake
if [ ! -d ./obj ]; then mkdir ./obj; fi
if [ ! -d ./obj ]; then mkdir ./obj; fi
mkdir: ./obj: File exists
gcc -g -pedantic -Wall -I ../../include -Wunused-parameter  -D_DEBUG=1 -D_MSC_VER=1400 -o obj/access.o -c ../../src/access.c
make[1]: *** [obj/attrs.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [bin/tidy] Error 2

The problem is that the Makefile tries to create a obj directory before each compilation.

Using autoconf + automake would solve that problem and also #61, #79, #100, #116

@skull-squadron
Copy link

👍 Adding -j1 on my box works (which does parallel by default), but defeats the purpose of correctly specified dependencies. Furthermore, mkdir -p would be far simpler and succinct. Finally, putting an @ to silence noisy/ugly commands makes for easier comprehension of what's happening.

@ghost
Copy link

ghost commented Jan 11, 2015

Can we please not use @ to hide the build commands? It makes it really difficult to understand what's going on when the build fails, which is the only time you're going to be paying attention anyway.

@geoffmcl
Copy link
Contributor

The latest development branch, develop-500 now only uses cmake...
$ git pull and git checkout develop-500
Would really appreciate you building this branch, and reporting any problems...

@LudovicRousseau
Copy link
Author

develop-500: The build works for me on Mac OS X 10.9.

@geoffmcl
Copy link
Contributor

Thank you for your quick test and report... Can we close this issue?

@balthisar
Copy link
Member

Close, now using cmake in develop-500.

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

No branches or pull requests

4 participants