Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify local build on MacOS #5

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Simplify local build on MacOS #5

merged 1 commit into from
Oct 10, 2024

Conversation

JCGoran
Copy link
Owner

@JCGoran JCGoran commented Sep 2, 2024

pip install . should just work now, provided the user follows the README exactly.
Also updated instructions for specifying wheel version of COFFE when using cibuildwheel.

`pip install .` should just work now, provided the user follows the
README exactly.
Also updated instructions for specifying wheel version of COFFE when
using `cibuildwheel`.
@fsorrenti
Copy link
Collaborator

I still get error:

(base) 12:13:38 [email protected] coffe master bash scripts/install_other.sh class cuba
++ uname -m

  • CLASS_INSTALL_DIR=/opt/class_public_arm64
    ++ uname -m
  • CUBA_INSTALL_DIR=/opt/cuba_arm64
    +++ dirname scripts/install_other.sh
    ++ cd scripts
    ++ pwd -P
  • script_dir=/Users/francescosorrenti/Library/CloudStorage/OneDrive-unige.ch/university_student/coffe/scripts
  • for arg in '$@'
  • case "${arg}" in
  • install_class
  • '[' -e /opt/class_public_arm64/lib/libclass.a ']'
  • current_dir=/Users/francescosorrenti/Library/CloudStorage/OneDrive-unige.ch/university_student/coffe/scripts/../external/class_public/
  • cd /Users/francescosorrenti/Library/CloudStorage/OneDrive-unige.ch/university_student/coffe/scripts/../external/class_public/
  • export MACOSX_DEPLOYMENT_TARGET=11.0
  • MACOSX_DEPLOYMENT_TARGET=11.0
  • git clean -xdf .
  • make libclass.a
    make: *** No rule to make target `libclass.a'. Stop.

@JCGoran JCGoran merged commit 6885e7c into master Oct 10, 2024
4 checks passed
@JCGoran JCGoran deleted the fix/docs branch October 10, 2024 14:37
@JCGoran
Copy link
Owner Author

JCGoran commented Oct 10, 2024

Should be fixed now (see new instructions), git's default of not cloning submodules was the issue.

@fsorrenti
Copy link
Collaborator

Better, bur there is another error:

arm64-apple-darwin20.0.0-ar: creating archive libclass.a
a - build/growTable.o
a - build/dei_rkck.o
a - build/sparse.o
a - build/evolver_rkck.o
a - build/evolver_ndf15.o
a - build/arrays.o
a - build/parser.o
a - build/quadrature.o
a - build/hyperspherical.o
a - build/common.o
a - build/trigonometric_integrals.o
a - build/input.o
a - build/background.o
a - build/thermodynamics.o
a - build/perturbations.o
a - build/primordial.o
a - build/nonlinear.o
a - build/transfer.o
a - build/spectra.o
a - build/lensing.o
a - build/hyrectools.o
a - build/helium.o
a - build/hydrogen.o
a - build/history.o

  • mkdir -p /opt/class_public_arm64/lib /opt/class_public_arm64/include
    mkdir: /opt/class_public_arm64: Permission denied
    mkdir: /opt/class_public_arm64: Permission denied

For contest, I reinstalled and gitcloned everything again but I got this

@JCGoran
Copy link
Owner Author

JCGoran commented Oct 13, 2024

2 options to resolve this:

  1. Use sudo in front of whatever command you are running
  2. set the environmental variable CLASS_INSTALL_DIR and CUBA_INSTALL_DIR to some dirs that don't require elevated permissions via export CLASS_INSTALL_DIR=/some/other/dir

@fsorrenti
Copy link
Collaborator

sudo works, but we have problem related to class installation 'stdio.h file missing'

(base) 17:18:40 [email protected] coffe master sudo bash scripts/install_other.sh class cuba
Password:
++ uname -m

  • CLASS_INSTALL_DIR=/opt/class_public_arm64
    ++ uname -m
  • CUBA_INSTALL_DIR=/opt/cuba_arm64
    +++ dirname scripts/install_other.sh
    ++ cd scripts
    ++ pwd -P
  • script_dir=/Users/francescosorrenti/Library/CloudStorage/OneDrive-unige.ch/university_student/coffe/scripts
  • for arg in '$@'
  • case "${arg}" in
  • install_class
  • '[' -e /opt/class_public_arm64/lib/libclass.a ']'
  • current_dir=/Users/francescosorrenti/Library/CloudStorage/OneDrive-unige.ch/university_student/coffe/scripts/../external/class_public/
  • cd /Users/francescosorrenti/Library/CloudStorage/OneDrive-unige.ch/university_student/coffe/scripts/../external/class_public/
  • export MACOSX_DEPLOYMENT_TARGET=11.0
  • MACOSX_DEPLOYMENT_TARGET=11.0
  • git clean -xdf .
    Removing build/
    Removing libclass.a
  • make libclass.a
    if ! [ -e /Users/francescosorrenti/Library/CloudStorage/OneDrive-unige.ch/university_student/coffe/external/class_public/build ]; then mkdir /Users/francescosorrenti/Library/CloudStorage/OneDrive-unige.ch/university_student/coffe/external/class_public/build ; mkdir /Users/francescosorrenti/Library/CloudStorage/OneDrive-unige.ch/university_student/coffe/external/class_public/build/lib; fi;
    touch build/.base
    cd /Users/francescosorrenti/Library/CloudStorage/OneDrive-unige.ch/university_student/coffe/external/class_public/build;clang -O3 -ffast-math "" -g -fPIC -fno-tree-vectorize -D__CLASSDIR__='"/Users/francescosorrenti/Library/CloudStorage/OneDrive-unige.ch/university_student/coffe/external/class_public"' -DHYREC -I../include -I../hyrec -c ../tools/growTable.c -o growTable.o
    In file included from ../tools/growTable.c:5:
    In file included from ../include/growTable.h:8:
    ../include/common.h:3:10: fatal error: 'stdio.h' file not found
    #include "stdio.h"
    ^~~~~~~~~
    1 error generated.
    make: *** [growTable.o] Error 1

@JCGoran
Copy link
Owner Author

JCGoran commented Oct 14, 2024

fatal error: 'stdio.h' file not found

Since that's a system header, I suspect your compiler config is probably broken, so maybe this could help? In which case the answer could be running:

export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)

Afraid I cannot be of more help since everything works on my machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants