RJVB / afsctool

This is a version of "brkirch"'s afsctool utility that allows end-users to leverage HFS+ compression.
https://brkirch.wordpress.com/afsctool
GNU General Public License v3.0
187 stars 18 forks source link

Unable to build when the path to Xcode contains spaces #51

Open LenaWil opened 2 years ago

LenaWil commented 2 years ago

Not sure if I this a Xcode bug or AFSC-tool one, but when I try to run cmake, while having installed Xcode to /custom location/ instead of /Apps I get the following error:

-- Check for working C compiler: /usr/bin/cc - broken
CMake Error at /usr/local/Cellar/cmake/3.22.2/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/tmw/Downloads/afsctool/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/make -f Makefile cmTC_3466d/fast && /custom location/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/cmTC_3466d.dir/build.make CMakeFiles/cmTC_3466d.dir/build
    make: /custom: No such file or directory
    make: *** [cmTC_3466d/fast] Error 1

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)

-- Configuring incomplete, errors occurred!
RJVB commented 2 years ago

Yes, this is most likely a cmake bug.

As a general rule of thumb, do not use paths with spaces for commands that have to be used from the shell.

You have 2 options that I can see, if you do not want to correct that situation:

1) put symlinks to the relevant applications in "/custom location/Xcode.app/Contents/Developer/usr/bin/" into /usr/local/bin and make sure that /usr/local/bin is before /usr/bin in your path 2) use cmake's XCode generator. With luck this will not trip over the incompatible paths and generate an Xcode project which you then build inside the IDE.

Where did you get cmake from; does that same source provide make (or gmake)?

LenaWil commented 2 years ago

Where did you get cmake from?

I got it from homebrew. I didn't have macports installed and wanted to download this, so executed brew install google-sparsehash zlib cmake pkgconfig as in the readme.

does that same source provide make (or gmake)?

I could try to install something else if you want to?

RJVB commented 2 years ago

I could try to install something else if you want to?

No, no need for that. I just asked because of being able to install another make command. Not that Apple's isn't capable enough, it's the fact that it gets installed deep inside Xcode and may thus contain spaces in its name like in your case. So yeah, try installing HB's make command, and see if that gets you any further!