spacetelescope / catkit2

Package for controlling testbed hardware.
https://spacetelescope.github.io/catkit2/
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Compilation question on apple M3 #256

Open axelpotier-astro opened 3 hours ago

axelpotier-astro commented 3 hours ago

I am trying to install catkit2 on my completely new apple M3 Mac. Have you guys ever seen the below error returned? It seems to be a local compiler problem. It tells me it cannot find the developer tools in the default location.

CMake Error at /opt/miniconda3/envs/catkit2/share/cmake-3.30/Modules/CMakeTestCCompiler.cmake:67 (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/apoitier/Documents/Research/Softwares/catkit2/build/temp.macosx-11.0-arm64-cpython-39/CMakeFiles/CMakeScratch/TryCompile-2OThlF'

  Run Build Command(s): /opt/miniconda3/envs/catkit2/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_8c3f4/fast
  xcode-select: note: No developer tools were found, requesting install.
  If developer tools are located at a non-default location on disk, use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, and cancel the installation dialog.
  See `man xcode-select` for more details.

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

@RemiSoummer didn't you get a new machine recently? Did you successfully install catkit2 on it yet?

axelpotier-astro commented 2 hours ago

Solved the issue by simply downloading Xcode on the Apple Store. I unfortunately got a new issue:

-- Found Protobuf: /opt/miniconda3/envs/catkit2/lib/libprotobuf.dylib (found version "4.25.3")
CMake Error at catkit_bindings/CMakeLists.txt:10 (add_subdirectory):
  add_subdirectory given source "../extern/pybind11" which is not an existing
  directory.

CMake Error at catkit_bindings/CMakeLists.txt:11 (pybind11_add_module):
  Unknown CMake command "pybind11_add_module".
RemiSoummer commented 1 hour ago

You need to install Xcode and then open it once. Upon first time you open it installs the compilers and also there is a License agreement to acknowledge.

I also have a brand new M3 but haven't installed catkit2 yet. Won't be able to try that until Wednesday next week but i definitely will need to make it work.