Error building using xcodebuild

I’ve been using the command line for builds recently and it’s been fine, but for some reason it started failing:

error: unable to open output file ‘/Users/ray/Dropbox/Programming/Thing/Builds/MacOSX/build/Thing.build/Debug/Thing - Shared
Code.build/Objects-normal/x86_64/juce_audio_basics.o’: ‘Operation not permitted’
1 error generated.

** BUILD FAILED **

The following build commands failed:
CompileC build/Thing.build/Debug/Thing\ -\ Shared\ Code.build/Objects-normal/x86_64/juce_audio_basics.o /Users/ray/Dropbox/Programming/Thing/JuceLibraryCode/juce_audio_basics.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler

I checked folder permissions and they look fine. And oddly, it looks like other files compiled to that directory.

Also, it builds just fine in the IDE.

Any ideas?

I think this is unlikely to be a JUCE bug, but I’m afraid I can’t be more helpful.

I vaguely remember having had issues when building inside the folder shared with Dropbox, which seems to be your case.

I don’t even remember if that was on Mac or Windows, but certainly if you build inside that folder, there will be the Dropbox process eagerly trying to access those same files that are being created, and that may be the source of the issues you are seeing. That may also very well depend on timing, which maybe explains why some of your files compile fine and some not, and why it does build with the IDE and not on the command line: simple coincidences.

Bottom line: in the order, try:

  1. Pausing Dropbox
  2. Exit Dropbox
  3. Build into a folder that’s not inside Dropbox’s folder
1 Like

It turned out to be a problem with one of the directories. I believe the permissions somehow got messed up. I just deleted the build directory and tried again and all was well.

Otherwise, Dropbox has been perfect for me for several years. No issues.

Thanks.