ericw-tools icon indicating copy to clipboard operation
ericw-tools copied to clipboard

Installation fails on macOS 12.1 Monterey (M1 Silicon)

Open mattthw opened this issue 2 years ago • 1 comments

Expected Behavior

I expected the installation to succeed.

Actual Behavior

Installation fails. ☹️

Reproduction Steps

  1. Be on macOS 12.1 Monterey (M1 Silicon) Note: I have not confirmed which, if any, of this information is relevant. I am including it as it is one possible difference between my failure versus ericw's presumed success on macOS.
  2. Run the following (which was written for macOS 10.5):
brew install embree tbb
git clone --recursive https://github.com/ericwa/ericw-tools
cd ericw-tools
mkdir build
cd build
cmake .. -GXcode -DCMAKE_PREFIX_PATH="$(brew --prefix embree);$(brew --prefix tbb)"

This results in a terminal output of:

➜  project-resources rm -rf ericw-tools
➜  project-resources brew install embree tbb
git clone --recursive https://github.com/ericwa/ericw-tools
cd ericw-tools
mkdir build
cd build
cmake .. -GXcode -DCMAKE_PREFIX_PATH="$(brew --prefix embree);$(brew --prefix tbb)"
Warning: embree 3.13.3 is already installed and up-to-date.
To reinstall 3.13.3, run:
  brew reinstall embree
Warning: tbb 2021.5.0 is already installed and up-to-date.
To reinstall 2021.5.0, run:
  brew reinstall tbb
Cloning into 'ericw-tools'...
remote: Enumerating objects: 18100, done.
remote: Counting objects: 100% (1502/1502), done.
remote: Compressing objects: 100% (396/396), done.
remote: Total 18100 (delta 1232), reused 1306 (delta 1096), pack-reused 16598
Receiving objects: 100% (18100/18100), 13.71 MiB | 22.22 MiB/s, done.
Resolving deltas: 100% (12902/12902), done.
Submodule 'lib/fmt' (https://github.com/fmtlib/fmt) registered for path '3rdparty/fmt'
Submodule '3rdparty/googletest' (https://github.com/google/googletest) registered for path '3rdparty/googletest'
Submodule '3rdparty/json' (https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent) registered for path '3rdparty/json'
Cloning into '/Users/matt_1/workspace/projects-vita/project-solitude/project-resources/ericw-tools/3rdparty/fmt'...
remote: Enumerating objects: 29272, done.
remote: Counting objects: 100% (29272/29272), done.
remote: Compressing objects: 100% (7395/7395), done.
remote: Total 29272 (delta 19778), reused 29192 (delta 19741), pack-reused 0
Receiving objects: 100% (29272/29272), 13.85 MiB | 11.56 MiB/s, done.
Resolving deltas: 100% (19778/19778), done.
Cloning into '/Users/matt_1/workspace/projects-vita/project-solitude/project-resources/ericw-tools/3rdparty/googletest'...
remote: Enumerating objects: 24115, done.
remote: Counting objects: 100% (573/573), done.
remote: Compressing objects: 100% (287/287), done.
remote: Total 24115 (delta 328), reused 435 (delta 272), pack-reused 23542
Receiving objects: 100% (24115/24115), 10.30 MiB | 22.50 MiB/s, done.
Resolving deltas: 100% (17716/17716), done.
Cloning into '/Users/matt_1/workspace/projects-vita/project-solitude/project-resources/ericw-tools/3rdparty/json'...
remote: Enumerating objects: 404, done.
remote: Counting objects: 100% (404/404), done.
remote: Compressing objects: 100% (186/186), done.
remote: Total 404 (delta 192), reused 365 (delta 156), pack-reused 0
Receiving objects: 100% (404/404), 503.99 KiB | 5.20 MiB/s, done.
Resolving deltas: 100% (192/192), done.
Submodule path '3rdparty/fmt': checked out '7bdf0628b1276379886c7f6dda2cef2b3b374f0b'
Submodule path '3rdparty/googletest': checked out '703bd9caab50b139428cea1aaff9974ebee5742e'
Submodule path '3rdparty/json': checked out '0db99d5ed1ba0c4409509db3916e7bd8398ee920'
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:4 (project):
  No CMAKE_C_COMPILER could be found.



CMake Error at CMakeLists.txt:4 (project):
  No CMAKE_CXX_COMPILER could be found.



-- Configuring incomplete, errors occurred!
See also "/Users/matt_1/workspace/projects-vita/project-solitude/project-resources/ericw-tools/build/CMakeFiles/CMakeOutput.log".
See also "/Users/matt_1/workspace/projects-vita/project-solitude/project-resources/ericw-tools/build/CMakeFiles/CMakeError.log".

I believe CMake Error at CMakeLists.txt:4 (project): No CMAKE_CXX_COMPILER could be found. to be a red herring. If we look at CMakeError.log, we see a story which may explain why it failed at this point:

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:
Build flags:
Id flags:

The output was:
65
2022-03-29 11:03:17.549 xcodebuild[96089:9590007] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-03-29 11:03:17.549 xcodebuild[96089:9590007] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

2022-03-29 11:03:17.822 xcodebuild[96089:9590007] [MT] IDELogStore: Failed to open log store at /Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Build
2022-03-29 11:03:17.822 xcodebuild[96089:9590007] [MT] IDELogStore: Failed to open Build log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Build/LogStoreManifest.plist': (257) The file “LogStoreManifest.plist” couldn’t be opened because you don’t have permission to view it." UserInfo={NSLocalizedDescription=Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Build/LogStoreManifest.plist': (257) The file “LogStoreManifest.plist” couldn’t be opened because you don’t have permission to view it.}. User info: {
    NSLocalizedDescription = "Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Build/LogStoreManifest.plist': (257) The file \U201cLogStoreManifest.plist\U201d couldn\U2019t be opened because you don\U2019t have permission to view it.";
}.
2022-03-29 11:03:17.828 xcodebuild[96089:9590007] [MT] IDELogStore: Failed to open log store at /Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Localization
2022-03-29 11:03:17.829 xcodebuild[96089:9590007] [MT] IDELogStore: Failed to open Localization log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Localization/LogStoreManifest.plist': (257) The file “LogStoreManifest.plist” couldn’t be opened because you don’t have permission to view it." UserInfo={NSLocalizedDescription=Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Localization/LogStoreManifest.plist': (257) The file “LogStoreManifest.plist” couldn’t be opened because you don’t have permission to view it.}. User info: {
    NSLocalizedDescription = "Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Localization/LogStoreManifest.plist': (257) The file \U201cLogStoreManifest.plist\U201d couldn\U2019t be opened because you don\U2019t have permission to view it.";
}.
2022-03-29 11:03:17.829 xcodebuild[96089:9590007] [MT] IDELogStore: Failed to open log store at /Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Package
2022-03-29 11:03:17.829 xcodebuild[96089:9590007] [MT] IDELogStore: Failed to open Package log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Package/LogStoreManifest.plist': (257) The file “LogStoreManifest.plist” couldn’t be opened because you don’t have permission to view it." UserInfo={NSLocalizedDescription=Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Package/LogStoreManifest.plist': (257) The file “LogStoreManifest.plist” couldn’t be opened because you don’t have permission to view it.}. User info: {
    NSLocalizedDescription = "Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Package/LogStoreManifest.plist': (257) The file \U201cLogStoreManifest.plist\U201d couldn\U2019t be opened because you don\U2019t have permission to view it.";
}.
2022-03-29 11:03:17.835 xcodebuild[96089:9590007] [MT] IDELogStore: Failed to open log store at /Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Test
2022-03-29 11:03:17.835 xcodebuild[96089:9590007] [MT] IDELogStore: Failed to open Test log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Test/LogStoreManifest.plist': (257) The file “LogStoreManifest.plist” couldn’t be opened because you don’t have permission to view it." UserInfo={NSLocalizedDescription=Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Test/LogStoreManifest.plist': (257) The file “LogStoreManifest.plist” couldn’t be opened because you don’t have permission to view it.}. User info: {
    NSLocalizedDescription = "Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Test/LogStoreManifest.plist': (257) The file \U201cLogStoreManifest.plist\U201d couldn\U2019t be opened because you don\U2019t have permission to view it.";
}.
2022-03-29 11:03:17.839 xcodebuild[96089:9590007] Couldn't create intermediates directory: You don’t have permission to save the file “CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb” in the folder “DerivedData2”.
2022-03-29 11:03:18.140 xcodebuild[96089:9590007] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-20102/IDEFoundation/Buildables/IDEWorkspaceArena.m:1134
Details:  Failed to create workspace arena at <DVTFilePath:0x6000018e2e20:'/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb'>: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb” in the folder “DerivedData2”." UserInfo={NSFilePath=/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb, NSUnderlyingError=0x600002601c80 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
Object:   <IDEWorkspaceArena: 0x6000004ef000>
Method:   -createWorkspaceArenaFolderIfNecessary
Thread:   <_NSMainThread: 0x600003fe44c0>{number = 1, name = main}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
2022-03-29 11:03:18.144 xcodebuild[96089:9590007] [MT] IDELogStore: Failed to open log store at /Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Package
2022-03-29 11:03:18.144 xcodebuild[96089:9590007] [MT] IDELogStore: Failed to open Package log store: Error Domain=IDEFoundationErrorDomain Code=1 "Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Package/LogStoreManifest.plist': (257) The file “LogStoreManifest.plist” couldn’t be opened because you don’t have permission to view it." UserInfo={NSLocalizedDescription=Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Package/LogStoreManifest.plist': (257) The file “LogStoreManifest.plist” couldn’t be opened because you don’t have permission to view it.}. User info: {
    NSLocalizedDescription = "Unable to read log store dictionary file at '/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/Logs/Package/LogStoreManifest.plist': (257) The file \U201cLogStoreManifest.plist\U201d couldn\U2019t be opened because you don\U2019t have permission to view it.";
}.
note: Using new build system
error: Build service could not create build operation: unknown error while handling message: fopen(/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb/XCBuildData/PIFCache/WORKSPACE@v11_hash=(null)_subobjects=54eb1c57265162ca32b72cbf6a6ea02a-Workspace.lock, wb): Permission denied (13)

** BUILD FAILED **

Couldn't set atribute on intermediates directory: setxattr(/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb, com.apple.xcode.CreatedByBuildSystem, true): Permission denied (13)
Couldn't set atribute on intermediates directory: setxattr(/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb, com.apple.xcode.CreatedByBuildSystem, true): Permission denied (13)
Couldn't set atribute on intermediates directory: setxattr(/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb, com.apple.xcode.CreatedByBuildSystem, true): Permission denied (13)
Couldn't set atribute on intermediates directory: setxattr(/Users/matt/Library/Developer/Xcode/DerivedData2/CompilerIdCXX-buexollkslnqqtbskveyjwqbfuvb, com.apple.xcode.CreatedByBuildSystem, true): Permission denied (13)

Resolution Attempts Thus Far

Manually setting chown on the directory:

➜  build git:(master) chown -R $(whoami) /Users/matt/Library/Developer/Xcode/
chown: /Users/matt/Library/Developer/Xcode/: Permission denied
➜  build git:(master) sudo !!

➜  build git:(master) sudo chown -R $(whoami) /Users/matt/Library/Developer/Xcode/
Password:
chown: /Users/matt/Library/Developer/Xcode/: No such file or directory

Manually setting chmod on the directory:

➜  build git:(master) sudo chmod -R u+rw /Users/matt/Library/Developer/Xcode/
chmod: /Users/matt/Library/Developer/Xcode/: No such file or directory

Manually setting ownership to everyone using macOS finder interface. (Success). Note that I noted here, that the directory already had ownsership R+W permissions for my user.

mattthw avatar Mar 29 '22 18:03 mattthw

What happens if you omit the -GXcode, i.e. delete your build folder and start at:

mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH="$(brew --prefix embree);$(brew --prefix tbb)"

This should default to the makefile generator so you can then hopefully run:

make

ericwa avatar Mar 29 '22 18:03 ericwa

ericwa, your instructions fix the build on Mac OS M1 13.0.1

This is the result from running the tests


===============================================================================
/Users/victor/ericw-tools/tests/test_ltface.cc:446:
TEST CASE:  surface lights minlight

/Users/victor/ericw-tools/tests/test_ltface.cc:446: ERROR: test case THREW exception: filesystem error: in file_size: Is a directory ["light"]

Allowed to fail so marking it as not failed

===============================================================================
/Users/victor/ericw-tools/tests/test_qbsp.cc:1203:
TEST SUITE: testmaps_q1
TEST CASE:  qbsp_q1_0125unit_faces

/Users/victor/ericw-tools/tests/test_qbsp.cc:1208: ERROR: CHECK( 2 == bsp.dfaces.size() ) is NOT correct!
  values: CHECK( 2 == 1 )

Allowed to fail so marking it as not failed


===============================================================================
/Users/victor/ericw-tools/tests/test_qbsp.cc:1407:
TEST SUITE: testmaps_q1
TEST CASE:  q1_rocks
  q1_rocks.map

/Users/victor/ericw-tools/tests/test_qbsp.cc:1440: ERROR: CHECK( clipnodes.at(CONTENTS_SOLID) == 7 ) is NOT correct!
  values: CHECK( 15 == 7 )
  logged: hull 1

/Users/victor/ericw-tools/tests/test_qbsp.cc:1440: ERROR: CHECK( clipnodes.at(CONTENTS_SOLID) == 7 ) is NOT correct!
  values: CHECK( 16 == 7 )
  logged: hull 2



===============================================================================
/Users/victor/ericw-tools/tests/test_qbsp.cc:1407:
TEST SUITE: testmaps_q1
TEST CASE:  q1_rocks
  q1_rocks_structural.map

/Users/victor/ericw-tools/tests/test_qbsp.cc:1440: ERROR: CHECK( clipnodes.at(CONTENTS_SOLID) == 7 ) is NOT correct!
  values: CHECK( 15 == 7 )
  logged: hull 1

/Users/victor/ericw-tools/tests/test_qbsp.cc:1440: ERROR: CHECK( clipnodes.at(CONTENTS_SOLID) == 7 ) is NOT correct!
  values: CHECK( 16 == 7 )
  logged: hull 2

----  / ericw-tools v0.18.1-1776-g710e70d7 ----

===============================================================================
/Users/victor/ericw-tools/tests/test_qbsp.cc:1407:
TEST SUITE: testmaps_q1
TEST CASE:  q1_rocks

DEEPEST SUBCASE STACK REACHED (DIFFERENT FROM THE CURRENT ONE):
  q1_rocks_structural_cube.map

Allowed to fail so marking it as not failed


===============================================================================
/Users/victor/ericw-tools/tests/test_qbsp.cc:1505:
TEST SUITE: testmaps_q1
TEST CASE:  q1_hull_expansion_lip

/Users/victor/ericw-tools/tests/test_qbsp.cc:1530: ERROR: CHECK( clipnodes.at(CONTENTS_SOLID) == 6 ) is NOT correct!
  values: CHECK( 8 == 6 )
  logged: hull 1

/Users/victor/ericw-tools/tests/test_qbsp.cc:1531: ERROR: CHECK( clipnodes.at(CONTENTS_EMPTY) == 3 ) is NOT correct!
  values: CHECK( 4 == 3 )
  logged: hull 1

/Users/victor/ericw-tools/tests/test_qbsp.cc:1534: ERROR: CHECK( CountClipnodeNodes(bsp, i) == 8 ) is NOT correct!
  values: CHECK( 11 == 8 )
  logged: hull 1

/Users/victor/ericw-tools/tests/test_qbsp.cc:1530: ERROR: CHECK( clipnodes.at(CONTENTS_SOLID) == 6 ) is NOT correct!
  values: CHECK( 8 == 6 )
  logged: hull 2

/Users/victor/ericw-tools/tests/test_qbsp.cc:1531: ERROR: CHECK( clipnodes.at(CONTENTS_EMPTY) == 3 ) is NOT correct!
  values: CHECK( 4 == 3 )
  logged: hull 2

/Users/victor/ericw-tools/tests/test_qbsp.cc:1534: ERROR: CHECK( CountClipnodeNodes(bsp, i) == 8 ) is NOT correct!
  values: CHECK( 11 == 8 )
  logged: hull 2

Allowed to fail so marking it as not failed


===============================================================================
/Users/victor/ericw-tools/tests/test_qbsp_q2.cc:590:
TEST SUITE: testmaps_q2
TEST CASE:  q2_missing_faces

/Users/victor/ericw-tools/tests/test_qbsp_q2.cc:599: ERROR: CHECK( BSP_FindFaceAtPoint(&bsp, &bsp.dmodels[0], point_on_missing_face) ) is NOT correct!
  values: CHECK( nullptr )

/Users/victor/ericw-tools/tests/test_qbsp_q2.cc:600: ERROR: CHECK( BSP_FindFaceAtPoint(&bsp, &bsp.dmodels[0], point_on_missing_face2) ) is NOT correct!
  values: CHECK( nullptr )

Allowed to fail so marking it as not failed
===============================================================================
[doctest] test cases:   192 |   192 passed |  0 failed | 5 skipped
[doctest] assertions: 68476 | 68463 passed | 13 failed |
[doctest] Status: SUCCESS!

victorbstan avatar Dec 27 '22 01:12 victorbstan