Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Why do I get permission denied when using make with j flag on Apple Silicon?

$
0
0

I have a simple make file that compiles a bunch of c files using /opt/homebrew/opt/llvm/bin/clang. I have two machines (an Intel Mac and and Apple M1 Max) both running macOS 12.7.3.

On the Intel Mac: Both make and "make -j8" compile all the files without issue and as expected.

On the Apple M1 Max: When I run make without any flags, it compiles all the files without problem. However, if run "make -j8", I get: make: /opt/homebrew/opt/llvm/bin/clang: Permission denied. If I run "sudo make -j8", then I do not get permission denied.

Why does running make with multiple threads give permission denied on Apple M1 Max but not Intel Macs even though both are running macOS 12.7.3 and both are using the same version of clang (17.0.6)?

I tried changing the owner and permissions on /opt/homebrew/opt/llvm/bin/clang. I tried many different make files (all have the same issue). I tried changing the number of threads. "-j1" works, but "-j2" and higher fail. I was expecting that the using the -j8 on the Apple M1 Max would simply use multiple threads to compile all the files more quickly. Could there be some security feature in the Apple M1 Max chips that prevents users from running multi-threaded jobs in the terminal? My account has admin privileges.

Solution:On both systems:

🙏 type -a make

make is /usr/bin/make

🙏 make --version

GNU Make 3.81Copyright (C) 2006 Free Software Foundation, Inc.This is free software; see the source for copying conditions.There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR APARTICULAR PURPOSE.This program built for i386-apple-darwin11.3.0

When I switch to gmake. Everything works properly on both machines. So the culprit is Apple's ancient make. Thanks to John Bolinger and MadScientist for pointing me in the right direction!


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>