rabrahm / ceres

A set of pipelines and routines for echelle spectrographs
MIT License
39 stars 27 forks source link

installation issue, building process, mac #35

Closed cmcgrud1 closed 3 years ago

cmcgrud1 commented 3 years ago

Hello, I am trying to install ceres, but I keep running into the following issue: ` 2.- Building processes...

 ----------------------------------------------------------
 > C code found in directory utils/Continuum. Building...
 ----------------------------------------------------------
 > ERROR: CERES couldn't be installed.
 > Problem building code in utils/Continuum. The error was:

    Compiling with an SDK that doesn't seem to exist: /opt/MacOSX10.9.sdk
    Please check your Xcode installation
    clang-10: warning: no such sysroot directory: '/opt/MacOSX10.9.sdk' [-Wmissing-sysroot]
    In file included from FunNorm.c:1:
    /opt/anaconda3/envs/ceres/include/python2.7/Python.h:33:10: fatal error: 'stdio.h' file not found
    #include <stdio.h>
             ^~~~~~~~~
    1 error generated.
    error: command 'x86_64-apple-darwin13.4.0-clang' failed with exit status 1

 > If you can't solve the problem, please communicate
 > with the CERES team for help.

` I've made a specific py2 env with all necessary packages (env path: '/opt/anaconda3/envs/ceres'). I also fresh installed the xcode Command Line Tools by first deleting the previous command line tools and reinstalling it with

sudo rm -rf /Library/Developer/CommandLineTools xcode-select --install

I also have a linux machine, where I tried to install this and it was able to get past this part (but stuck on another, issue #34). So I'm lead to believe this is a specific mac issue, as I did everything the same on the linux version. I'm very stuck on what is causing the bug. Any direction is appreciated.

nespinoza commented 3 years ago

Hi Chima,

This seems like a very specific problem to your system, and thus it's unlikely you will find help from either @rabrahm or myself. The x86_64-apple-darwin13.4.0-clang bit seems to be a compiler mismatch between what CERES is using and what's installed in your system (apparently this is typical with anaconda installations: https://ask.csdn.net/questions/1355295). I've usually solved problems like this by installing compilers via homebrew (e.g., brew install gcc), but without further outputs from this it's hard to tell.

Can you perhaps go to ceres/utils/Continuum and do python setup.py install and tell us what you get?

N.

cmcgrud1 commented 3 years ago

Okay after a lot of pain and suffering, I think I found the issue and you're right, @nespinoza , this is a system problem. The issue is that it was trying to find a sdk folder that didn't exist because the system configuration of anaconda py2 I installed hard coded the specific file name. This problem has arisen from many other people too. It seems that I came across this issue because I'm using py2, it was fixed in py3. It could also be related to the specific version of py2 I have, but I just made a new py2 env with the most recent version of miniconda, so I think it's an overlooked bug by the conda developers. Regardless, my solution was going here to download that specific sdk so py2 would find it.