Can't compile on MacOS Big Sur M1
afrajag opened this issue · 4 comments
I'm trying to compile SORT on a Mac Mini M1 and I receive this error message:
Dependencies are up to date, no need to sync.
building release version.
mkdir: proj_release: File exists
CMake Error at CMakeLists.txt:94 (find_package):
Could not find a package configuration file provided by "TSL" with any of
the following names:
TSLConfig.cmake
tsl-config.cmake
Add the installation prefix of "TSL" to CMAKE_PREFIX_PATH or set "TSL_DIR"
to a directory containing one of the above files. If "TSL" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
See also "/Users/afrajag/Dropbox/Developing/Raytrace/SORT/proj_release/CMakeFiles/CMakeOutput.log".
See also "/Users/afrajag/Dropbox/Developing/Raytrace/SORT/proj_release/CMakeFiles/CMakeError.log".
make[1]: *** No targets specified and no makefile found. Stop.
This might be a known issue that I fixed yesterday.
Could you please try this?
'make force_update_dep'
Please share the full log if it still doesn't work.
Also, let me know if it does work so that I can close this issue.
Sadly, still got errors..
make force_update_dep
Syncing dependencies
Force syncing dependencies.
Cloning into '/Users/afrajag/Dropbox/Developing/Raytrace/SORT/dependencies/tsl_src'...
remote: Enumerating objects: 39, done.
remote: Counting objects: 100% (39/39), done.
remote: Compressing objects: 100% (27/27), done.
Receiving objects: 100% (3483/3483), 1.50 GiB | 4.11 MiB/s, done.
remote: Total 3483 (delta 11), reused 26 (delta 6), pack-reused 3444
Resolving deltas: 100% (2375/2375), done.
Build and install TSL
Install path: ../tsl
Building release
Sycning arm version llvm...
Syncing llvm
zip file: dummy/llvm-01.zip
zip file: dummy/llvm-02.zip
extracing file: dummy/llvm-01.zip
extracing file: dummy/llvm-02.zip
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Create tsl_version.h from tsl_version.h.in
-- Found LLVM 10.0.0
-- Using LLVMConfig.cmake in: /Users/afrajag/Dropbox/Developing/Raytrace/SORT/dependencies/tsl_src/dependencies/llvm/lib/cmake/llvm
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/afrajag/Dropbox/Developing/Raytrace/SORT/dependencies/tsl_src/proj_release
[ 2%] Generating ../../../generated_src/compiled_lex.cpp, ../../../generated_src/compiled_grammar.cpp, ../../../generated_src/compiled_grammar.hpp
Scanning dependencies of target LLVM_Test
Generating flex and bison source code
src/tsl_lib/compiler/grammar.y:55.9-16: syntax error, unexpected identifier, expecting string
make[6]: *** [generate_src] Error 1
make[5]: *** [../generated_src/compiled_lex.cpp] Error 2
make[4]: *** [src/tsl_lib/CMakeFiles/TSL_Lib.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....
[ 6%] Building CXX object src/llvm_test/CMakeFiles/LLVM_Test.dir/llvm_test.cpp.o
[ 6%] Building CXX object src/llvm_test/CMakeFiles/LLVM_Test.dir/__/thirdparty/gtest/gtest-all.cc.o
[ 8%] Building CXX object src/llvm_test/CMakeFiles/LLVM_Test.dir/main.cpp.o
[ 10%] Linking CXX executable ../../../bin/llvm_test_r
[ 10%] Built target LLVM_Test
make[3]: *** [all] Error 2
-- Install configuration: "Release"
CMake Error at proj_release/src/tsl_lib/cmake_install.cmake:41 (file):
file INSTALL cannot find
"/Users/afrajag/Dropbox/Developing/Raytrace/SORT/dependencies/tsl_src/proj_release/src/tsl_lib/libtsl_r.dylib":
No such file or directory.
Call Stack (most recent call first):
proj_release/cmake_install.cmake:42 (include)
make[1]: *** [install] Error 1
If can help these are the versions I'm using:
XCode 12.3
Python 3.9.1
CMake 3.19.3
The problem is that you don't have Bison 3.7 on your Mac.
Do this
bison -V
If you are seeing 2.x version, that means you are using the one that comes along with your Mac.
So the solution is here
Make sure you can see this output before making the next attempt.
bison (GNU Bison) 3.7.4
Written by Robert Corbett and Richard Stallman.
Copyright (C) 2020 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 A PARTICULAR PURPOSE.
Of course, this requires you to have Bison 3.7.4, which I assume you can install from homebrew.
Once you have this, you should be good to go. The log shows that you already have my fix and I have also verified again on my M1 Macbook Air, it works fine. Though the setup process is a bit outdated since I don't have that much time to maintain everything as this project gets more features in it.
All works now.
Thanks for the support !