Skip to content

Compiling Issue on Mac (OS Monterrey, M2 processor) #12

@quasars100

Description

@quasars100

Hi,

After git cloning https://github.com/Michalychforever/CLASS-PT.git (git pull results in

From https://github.com/Michalychforever/CLASS-PT

  • branch HEAD -> FETCH_HEAD
    Already up to date.

Otherwise, it says "no .git repository" without "git clone"), and changing the path to where I have OpenBLAS installed ("/opt/homebrew/opt/openblas/lib/libopenblas.a"), typing "make clean; make" results in the following error:

ld: warning: could not create compact unwind for _LAPACKE_ztz_nancheck: registers 27 and 28 not saved contiguously in frame
Undefined symbols for architecture arm64:
"_GOMP_parallel", referenced from:
_exec_blas in libopenblas.a(blas_server.o)
"_omp_get_max_threads", referenced from:
_blas_thread_init in libopenblas.a(blas_server.o)
_casum_k_NEOVERSEN1 in libopenblas.a(casum_k_NEOVERSEN1.o)
_casum_k_THUNDERX2T99 in libopenblas.a(casum_k_THUNDERX2T99.o)
_casum_k_THUNDERX3T110 in libopenblas.a(casum_k_THUNDERX3T110.o)
_ccopy_k_NEOVERSEN1 in libopenblas.a(ccopy_k_NEOVERSEN1.o)
_ccopy_k_THUNDERX2T99 in libopenblas.a(ccopy_k_THUNDERX2T99.o)
_ccopy_k_THUNDERX3T110 in libopenblas.a(ccopy_k_THUNDERX3T110.o)
...
"_omp_get_num_threads", referenced from:
_exec_blas._omp_fn.0 in libopenblas.a(blas_server.o)
_exec_blas._omp_fn.1 in libopenblas.a(blas_server.o)
"_omp_get_thread_num", referenced from:
_exec_threads in libopenblas.a(blas_server.o)
_exec_blas._omp_fn.0 in libopenblas.a(blas_server.o)
_exec_blas._omp_fn.1 in libopenblas.a(blas_server.o)
"_omp_in_parallel", referenced from:
_casum_k_NEOVERSEN1 in libopenblas.a(casum_k_NEOVERSEN1.o)
_casum_k_THUNDERX2T99 in libopenblas.a(casum_k_THUNDERX2T99.o)
_casum_k_THUNDERX3T110 in libopenblas.a(casum_k_THUNDERX3T110.o)
_ccopy_k_NEOVERSEN1 in libopenblas.a(ccopy_k_NEOVERSEN1.o)
_ccopy_k_THUNDERX2T99 in libopenblas.a(ccopy_k_THUNDERX2T99.o)
_ccopy_k_THUNDERX3T110 in libopenblas.a(ccopy_k_THUNDERX3T110.o)
gcc+gfortran_compiles

  _cdotc_k_NEOVERSEN1 in libopenblas.a(cdotc_k_NEOVERSEN1.o)
  ...

ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [class] Error 1

To see if it's a gcc/gfortran compiling issue, I tries compiling simple scripts in both C and Fortran, and they both compiled (in screenshot for reference), so I don't think it's a M2 gcc compiler issue as previously thought.
Is there a way to fix this?
Thank you so much for any help/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions