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

Installation with arm64 #111

Open
AlanSong641 opened this issue Jun 19, 2024 · 13 comments
Open

Installation with arm64 #111

AlanSong641 opened this issue Jun 19, 2024 · 13 comments

Comments

@AlanSong641
Copy link
Collaborator

AlanSong641 commented Jun 19, 2024

so I am trying to install eongit master branch in Mac with m1 chip.

  • environment is the same by typing micromamba create -f environment.yml and activate it.

  • then installation syntax is like meson setup bbdir --prefix=$CONDA_PREFIX, the screen of this command is shown as below:

The Meson build system
Version: 1.4.1
Source dir: /Users/alan/Github/EONgit-main/client
Build dir: /Users/alan/Github/EONgit-main/client/bbdir
Build type: native build
Project name: eonclient
Project version: 0.1
C++ compiler for the host machine: arm64-apple-darwin20.0.0-clang++ (clang 16.0.6 "clang version 16.0.6")
C++ linker for the host machine: arm64-apple-darwin20.0.0-clang++ ld64 711
Host machine cpu family: aarch64
Host machine cpu: aarch64
C compiler for the host machine: arm64-apple-darwin20.0.0-clang (clang 16.0.6 "clang version 16.0.6")
C linker for the host machine: arm64-apple-darwin20.0.0-clang ld64 711
Library m found: YES
Run-time dependency threads found: YES
Found CMake: /Users/alan/micromamba/envs/eongit/bin/cmake (3.29.6)
Run-time dependency eigen3 (modules: Eigen3::Eigen) found: YES 3.4.0
Found pkg-config: YES (/Users/alan/micromamba/envs/eongit/bin/pkg-config) 0.29.2
Run-time dependency fmt found: YES 9.1.0
Run-time dependency spdlog found: YES 1.12.0
Program python3 found: YES (/Users/alan/micromamba/envs/eongit/bin/python3.12)
Run-time dependency python found: YES 3.12
pybind11-config found: NO
Run-time dependency pybind11 found: YES 2.12.0
Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711

Executing subproject xtb 

xtb| Project name: xtb
xtb| Project version: 6.6.1
xtb| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
xtb| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
xtb| C compiler for the host machine: arm64-apple-darwin20.0.0-clang (clang 16.0.6 "clang version 16.0.6")
xtb| C linker for the host machine: arm64-apple-darwin20.0.0-clang ld64 711
xtb| Program git found: YES (/opt/homebrew/bin/git)
xtb| WARNING: You should add the boolean check kwarg to the run_command call.
xtb| It currently defaults to false,
xtb| but it will default to true in future releases of meson.
xtb| See also: https://github.com/mesonbuild/meson/issues/9300
xtb| Program python3 found: YES (/Users/alan/micromamba/envs/eongit/bin/python3)
xtb| Configuring xtb_version.fh using configuration
xtb| subprojects/xtb/meson/meson.build:23: WARNING: FC and CC are not from the same vendor
xtb| Run-time dependency lapack found: YES
xtb| Run-time dependency blas found: YES
xtb| Run-time dependency OpenMP found: YES 5.0
xtb| Dependency threads found: YES unknown (cached)
xtb| Run-time dependency mctc-lib found: NO (tried pkgconfig, framework and cmake)
xtb| Looking for a fallback subproject for the dependency mctc-lib
xtb| Using subprojects/xtb/subprojects/mctc-lib.wrap
xtb| WARNING: Subproject mctc-lib's revision may be out of date; its wrap file has changed since it was first configured

Executing subproject xtb:mctc-lib

mctc-lib| Project name: mctc-lib
mctc-lib| Project version: 0.3.1
mctc-lib| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
mctc-lib| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
mctc-lib| Run-time dependency json-fortran found: NO (tried pkgconfig, framework and cmake)
mctc-lib| Looking for a fallback subproject for the dependency json-fortran
mctc-lib| Building fallback subproject with default_library=static
mctc-lib| Using subprojects/mctc-lib/subprojects/json-fortran-8.2.5.wrap
mctc-lib| WARNING: Subproject json-fortran-8.2.5's revision may be out of date; its wrap file has changed since it was first configured

Executing subproject xtb:mctc-lib:json-fortran-8.2.5

json-fortran-8.2.5| Project name: jsonfortran
json-fortran-8.2.5| Project version: 8.2.5
json-fortran-8.2.5| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
json-fortran-8.2.5| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
json-fortran-8.2.5| Build targets in project: 12
json-fortran-8.2.5| Subproject json-fortran-8.2.5 finished.

mctc-lib| Dependency json-fortran from subproject subprojects/json-fortran-8.2.5 found: YES 8.2.5
mctc-lib| Build targets in project: 15
mctc-lib| Subproject mctc-lib finished.

xtb| Dependency mctc-lib from subproject subprojects/mctc-lib found: YES 0.3.1
xtb| Run-time dependency tblite found: NO (tried pkgconfig, framework and cmake)
xtb| Looking for a fallback subproject for the dependency tblite
xtb| Using subprojects/xtb/subprojects/tblite.wrap
xtb| WARNING: Subproject tblite's revision may be out of date; its wrap file has changed since it was first configured

Executing subproject xtb:tblite

tblite| Project name: tblite
tblite| Project version: 0.3.0
tblite| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
tblite| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
tblite| C compiler for the host machine: arm64-apple-darwin20.0.0-clang (clang 16.0.6 "clang version 16.0.6")
tblite| C linker for the host machine: arm64-apple-darwin20.0.0-clang ld64 711
tblite| Dependency openmp found: YES 5.0 (cached)
tblite| Dependency lapack found: YES unknown (cached)
tblite| Dependency blas found: YES unknown (cached)
tblite| Dependency mctc-lib found: YES 0.3.1 (cached)
tblite| Run-time dependency dftd4 found: NO (tried pkgconfig, framework and cmake)
tblite| Looking for a fallback subproject for the dependency dftd4
tblite| Using subprojects/xtb/subprojects/dftd4.wrap
tblite| WARNING: Subproject dftd4's revision may be out of date; its wrap file has changed since it was first configured

Executing subproject xtb:tblite:dftd4

dftd4| Project name: dftd4
dftd4| Project version: 3.5.0
dftd4| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
dftd4| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
dftd4| C compiler for the host machine: arm64-apple-darwin20.0.0-clang (clang 16.0.6 "clang version 16.0.6")
dftd4| C linker for the host machine: arm64-apple-darwin20.0.0-clang ld64 711
dftd4| Dependency openmp found: YES 5.0 (cached)
dftd4| Dependency lapack found: YES unknown (cached)
dftd4| Library blas found: YES
dftd4| Dependency mctc-lib found: YES 0.3.1 (cached)
dftd4| Run-time dependency multicharge found: NO (tried pkgconfig, framework and cmake)
dftd4| Looking for a fallback subproject for the dependency multicharge
dftd4| Using subprojects/xtb/subprojects/multicharge.wrap
dftd4| WARNING: Subproject multicharge's revision may be out of date; its wrap file has changed since it was first configured

Executing subproject xtb:tblite:dftd4:multicharge

multicharge| Project name: multicharge
multicharge| Project version: 0.2.0
multicharge| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
multicharge| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
multicharge| Dependency openmp found: YES 5.0 (cached)
multicharge| Dependency lapack found: YES unknown (cached)
multicharge| Dependency blas found: YES unknown (cached)
multicharge| Dependency mctc-lib found: YES 0.3.1 (cached)
multicharge| Using subprojects/xtb/subprojects/mstore.wrap
multicharge| WARNING: Subproject mstore's revision may be out of date; its wrap file has changed since it was first configured

Executing subproject xtb:tblite:dftd4:multicharge:mstore

mstore| Project name: mstore
mstore| Project version: 0.2.0
mstore| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
mstore| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
mstore| Dependency mctc-lib found: YES 0.3.1 (cached)
mstore| Build targets in project: 20
mstore| Subproject mstore finished.

multicharge| Build targets in project: 21
multicharge| Subproject multicharge finished.

dftd4| Dependency multicharge from subproject subprojects/multicharge found: YES 0.2.0
dftd4| Program tester.py found: YES (/Users/alan/Github/EONgit-main/client/subprojects/dftd4/app/tester.py)
dftd4| Dependency mstore from subproject subprojects/mstore found: YES 0.2.0
dftd4| Build targets in project: 24
dftd4| Subproject dftd4 finished.

tblite| Dependency dftd4 from subproject subprojects/dftd4 found: YES 3.5.0
tblite| Run-time dependency s-dftd3 found: NO (tried pkgconfig, framework and cmake)
tblite| Looking for a fallback subproject for the dependency s-dftd3
tblite| Using subprojects/xtb/subprojects/s-dftd3.wrap
tblite| WARNING: Subproject s-dftd3's revision may be out of date; its wrap file has changed since it was first configured

Executing subproject xtb:tblite:s-dftd3

s-dftd3| Project name: s-dftd3
s-dftd3| Project version: 1.0.0
s-dftd3| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
s-dftd3| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
s-dftd3| subprojects/s-dftd3/meson.build:30: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build.
s-dftd3| C compiler for the host machine: arm64-apple-darwin20.0.0-clang (clang 16.0.6 "clang version 16.0.6")
s-dftd3| C linker for the host machine: arm64-apple-darwin20.0.0-clang ld64 711
s-dftd3| Run-time dependency OpenMP found: YES 5.0
s-dftd3| Dependency mctc-lib found: YES 0.3.1 (cached)
s-dftd3| Run-time dependency toml-f found: NO (tried pkgconfig, framework and cmake)
s-dftd3| Looking for a fallback subproject for the dependency toml-f
s-dftd3| Using subprojects/xtb/subprojects/toml-f.wrap
s-dftd3| WARNING: Subproject toml-f's revision may be out of date; its wrap file has changed since it was first configured

Executing subproject xtb:tblite:s-dftd3:toml-f

toml-f| Project name: toml-f
toml-f| Project version: 0.4.1
toml-f| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
toml-f| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
toml-f| Run-time dependency test-drive found: NO (tried pkgconfig, framework and cmake)
toml-f| Looking for a fallback subproject for the dependency test-drive
toml-f| Building fallback subproject with default_library=static
toml-f| Using subprojects/xtb/subprojects/test-drive.wrap
toml-f| WARNING: Subproject test-drive's revision may be out of date; its wrap file has changed since it was first configured

Executing subproject xtb:tblite:s-dftd3:toml-f:test-drive

test-drive| Project name: test-drive
test-drive| Project version: 0.4.0
test-drive| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
test-drive| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
test-drive| Build targets in project: 29
test-drive| Subproject test-drive finished.

toml-f| Dependency test-drive from subproject subprojects/test-drive found: YES 0.4.0
toml-f| Program go found: NO
toml-f| Build targets in project: 33
toml-f| Subproject toml-f finished.

s-dftd3| Dependency toml-f from subproject subprojects/toml-f found: YES 0.4.1
s-dftd3| Dependency mstore found: YES 0.2.0 (cached)
s-dftd3| Program /Users/alan/Github/EONgit-main/client/subprojects/s-dftd3/test/validation/tester.py found: YES (/Users/alan/micromamba/envs/eongit/bin/python3.12 /Users/alan/Github/EONgit-main/client/subprojects/s-dftd3/test/validation/tester.py)
s-dftd3| Build targets in project: 36
s-dftd3| Subproject s-dftd3 finished.

tblite| Dependency s-dftd3 from subproject subprojects/s-dftd3 found: YES 1.0.0
tblite| Dependency toml-f found: YES 0.4.1 (cached)
tblite| Dependency mstore found: YES 0.2.0 (cached)
tblite| Program tester.py found: YES (/Users/alan/micromamba/envs/eongit/bin/python3.12 /Users/alan/Github/EONgit-main/client/subprojects/tblite/test/validation/tester.py)
tblite| Build targets in project: 39
tblite| Subproject tblite finished.

xtb| Dependency tblite from subproject subprojects/tblite found: YES 0.3.0
xtb| Run-time dependency cpx found: NO (tried pkgconfig, framework and cmake)
xtb| Looking for a fallback subproject for the dependency cpx
xtb| Using subprojects/xtb/subprojects/cpx.wrap
xtb| WARNING: Subproject cpx's revision may be out of date; its wrap file has changed since it was first configured

Executing subproject xtb:cpx

cpx| Project name: cpx
cpx| Project version: 1.0.0
cpx| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
cpx| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
cpx| C compiler for the host machine: arm64-apple-darwin20.0.0-clang (clang 16.0.6 "clang version 16.0.6")
cpx| C linker for the host machine: arm64-apple-darwin20.0.0-clang ld64 711
cpx| Dependency openmp found: YES 5.0 (cached)
cpx| Dependency lapack found: YES unknown (cached)
cpx| Dependency blas found: YES unknown (cached)
cpx| Run-time dependency numsa found: NO (tried pkgconfig, framework and cmake)
cpx| Looking for a fallback subproject for the dependency numsa
cpx| Using subprojects/xtb/subprojects/numsa.wrap
cpx| WARNING: Subproject numsa's revision may be out of date; its wrap file has changed since it was first configured

Executing subproject xtb:cpx:numsa

numsa| Project name: numsa
numsa| Project version: 0.2.0
numsa| Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
numsa| Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
numsa| Dependency openmp found: YES 5.0 (cached)
numsa| Build targets in project: 42
numsa| Subproject numsa finished.

cpx| Dependency numsa from subproject subprojects/numsa found: YES 0.2.0
cpx| Program config/install-mod.py found: YES (/usr/bin/env python /Users/alan/Github/EONgit-main/client/subprojects/cpx/config/install-mod.py)
cpx| Dependency test-drive from subproject subprojects/test-drive found: YES 0.4.0
cpx| Build targets in project: 46
cpx| Subproject cpx finished.

xtb| Dependency cpx from subproject subprojects/cpx found: YES 1.0.0
xtb| Program asciidoctor found: NO
xtb| Dependency test-drive found: YES 0.4.0 (cached)
xtb| Build targets in project: 51
xtb| Subproject xtb finished.

Program python3 found: YES (/Users/alan/micromamba/envs/eongit/bin/python3.12)
Dependency pybind11 found: YES 2.12.0 (cached)
Run-time dependency GTest found: YES 1.14.0
Run-time dependency GMock found: YES 1.14.0
Build targets in project: 60

eonclient 0.1

  Subprojects
    cpx               : YES 1 warnings (from xtb)
    dftd4             : YES 1 warnings (from xtb => tblite)
    json-fortran-8.2.5: YES (from xtb => mctc-lib)
    mctc-lib          : YES 1 warnings (from xtb)
    mstore            : YES (from xtb => tblite => dftd4 => multicharge)
    multicharge       : YES 1 warnings (from xtb => tblite => dftd4)
    numsa             : YES (from xtb => cpx)
    s-dftd3           : YES 2 warnings (from xtb => tblite)
    tblite            : YES 2 warnings (from xtb)
    test-drive        : YES (from xtb => tblite => s-dftd3 => toml-f)
    toml-f            : YES 1 warnings (from xtb => tblite => s-dftd3)
    xtb               : YES 8 warnings

  User defined options
    prefix            : /Users/alan/micromamba/envs/eongit

Found ninja-1.12.1 at /Users/alan/micromamba/envs/eongit/bin/ninja
  • then the error occured in 'meson install -C bbdir':
In file included from ../potentials/ASE_ORCA/ASE_ORCA.cpp:11:
In file included from ../potentials/ASE_ORCA/ASE_ORCA.h:14:
../potentials/ASE_ORCA/../../Potential.h:21:9: warning: field 'forceCallCounter' will be initialized after field 'm_params' [-Wreorder-ctor]
        forceCallCounter{0},
        ^~~~~~~~~~~~~~~~~~~
        m_params{a_params}
In file included from ../potentials/ASE_ORCA/ASE_ORCA.cpp:11:
In file included from ../potentials/ASE_ORCA/ASE_ORCA.h:16:
In file included from /opt/homebrew/include/pybind11/eigen.h:12:
In file included from /opt/homebrew/include/pybind11/eigen/matrix.h:28:
In file included from /Users/alan/micromamba/envs/eongit/include/eigen3/Eigen/SparseCore:61:
/Users/alan/micromamba/envs/eongit/include/eigen3/Eigen/src/SparseCore/TriangularSolver.h:273:13: warning: variable 'count' set but not used [-Wunused-but-set-variable]
      Index count = 0;
            ^
../potentials/ASE_ORCA/ASE_ORCA.cpp:48:54: warning: parameter 'variance' set but not used [-Wunused-but-set-parameter]
                       double *F, double *U, double *variance,
                                                     ^
3 warnings generated.
ninja: build stopped: subcommand failed.
Could not rebuild /Users/alan/Github/EONgit-main/client/bbdir
@AlanSong641
Copy link
Collaborator Author

something is up with ASE_ORCA potential? and where do I choose which potential we need to compile since we are not using makefile anymore.

@HaoZeke
Copy link
Collaborator

HaoZeke commented Jun 19, 2024

@AlanSong641 could provide the commit? main shouldn't be trying to use the xtb and stuff (it is false on main), the meson_options.txt file can be used or by the command line:

# if you don't want to remove the directory / else run with setup
meson configure b2dir -Dwith_xtb=False
meson compile -C b2dir

@HaoZeke
Copy link
Collaborator

HaoZeke commented Jun 19, 2024

Also there were a couple of other fixes / better build defaults which landed this evening :)

@AlanSong641
Copy link
Collaborator Author

AlanSong641 commented Jun 20, 2024

alright, updated the newest master branch. here is a new dependency error which require Catch2, I assume that this will cmake for me automatically, but it failed somehow.

The Meson build system
Version: 1.4.1
Source dir: /Users/alan/Github/EONgit-main/client
Build dir: /Users/alan/Github/EONgit-main/client/bbdir
Build type: native build
Project name: eonclient
Project version: 0.1
C++ compiler for the host machine: arm64-apple-darwin20.0.0-clang++ (clang 16.0.6 "clang version 16.0.6")
C++ linker for the host machine: arm64-apple-darwin20.0.0-clang++ ld64 711
Host machine cpu family: aarch64
Host machine cpu: aarch64
C compiler for the host machine: arm64-apple-darwin20.0.0-clang (clang 16.0.6 "clang version 16.0.6")
C linker for the host machine: arm64-apple-darwin20.0.0-clang ld64 711
Library m found: YES
Run-time dependency threads found: YES
Found CMake: /Users/alan/micromamba/envs/eongit/bin/cmake (3.29.6)
Run-time dependency eigen3 (modules: Eigen3::Eigen) found: YES 3.4.0
Found pkg-config: YES (/Users/alan/micromamba/envs/eongit/bin/pkg-config) 0.29.2
Run-time dependency fmt found: YES 9.1.0
Run-time dependency spdlog found: YES 1.12.0
Fortran compiler for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran (gcc 12.3.0 "GNU Fortran (GCC) 12.3.0")
Fortran linker for the host machine: /Users/alan/micromamba/envs/eongit/bin/arm64-apple-darwin20.0.0-gfortran ld64 711
Run-time dependency catch2 found: NO (tried cmake)

meson.build:354:17: ERROR: Dependency "Catch2" not found, tried cmake

@HaoZeke
Copy link
Collaborator

HaoZeke commented Jun 20, 2024

Ah, so Catch2 is now part of the environment.yml but it wouldn't have been installed unless the environment is re-created, locally micromamba install catch2 will work

@AlanSong641
Copy link
Collaborator Author

okay now we close to success, maybe need to modify few more libs to compatible with arm64

[134/144] Compiling C++ object eonclient.p/ClientEON.cpp.o
FAILED: eonclient.p/ClientEON.cpp.o 
arm64-apple-darwin20.0.0-clang++ -Ieonclient.p -I. -I.. -I../thirdparty -I/Users/alan/micromamba/envs/eongit/include/eigen3 -I/Users/alan/micromamba/envs/eongit/include -fdiagnostics-color=always -D_LIBCPP_ENABLE_ASSERTIONS=1 -Wall -Winvalid-pch -Wextra -std=c++17 -O0 -g -faligned-allocation -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/alan/micromamba/envs/eongit/include -D_FORTIFY_SOURCE=2 -isystem /Users/alan/micromamba/envs/eongit/include -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -Wno-unused-result -g3 -O0 -Wunused-but-set-parameter -DOSX=TRUE -DSPDLOG_FMT_EXTERNAL -DCUH2_POT -DWITH_FORTRAN -MD -MQ eonclient.p/ClientEON.cpp.o -MF eonclient.p/ClientEON.cpp.o.d -o eonclient.p/ClientEON.cpp.o -c ../ClientEON.cpp
In file included from ../ClientEON.cpp:40:
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/xmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../ClientEON.cpp:40:
In file included from /Users/alan/micromamba/envs/eongit/lib/clang/16/include/xmmintrin.h:17:
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:37:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
    __builtin_ia32_emms();
    ^
/Users/alan/micromamba/envs/eongit/bin/../include/c++/v1/math.h:507:10: note: '__builtin_isless' declared here
  return __builtin_isless((type)__x, (type)__y);
         ^
In file included from ../ClientEON.cpp:40:
In file included from /Users/alan/micromamba/envs/eongit/lib/clang/16/include/xmmintrin.h:17:
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:37:25: error: too few arguments to function call, expected 2, have 0
    __builtin_ia32_emms();
    ~~~~~~~~~~~~~~~~~~~~^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:54:19: error: use of undeclared identifier '__builtin_ia32_vec_init_v2si'
    return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:71:12: error: use of undeclared identifier '__builtin_ia32_vec_ext_v2si'
    return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
           ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:133:19: error: use of undeclared identifier '__builtin_ia32_packsswb'
    return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:163:19: error: use of undeclared identifier '__builtin_ia32_packssdw'
    return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:193:19: error: use of undeclared identifier '__builtin_ia32_packuswb'
    return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:220:19: error: use of undeclared identifier '__builtin_ia32_punpckhbw'
    return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:243:19: error: use of undeclared identifier '__builtin_ia32_punpckhwd'
    return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:264:19: error: use of undeclared identifier '__builtin_ia32_punpckhdq'
    return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:291:19: error: use of undeclared identifier '__builtin_ia32_punpcklbw'
    return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:314:19: error: use of undeclared identifier '__builtin_ia32_punpcklwd'
    return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:335:19: error: use of undeclared identifier '__builtin_ia32_punpckldq'
    return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:356:19: error: use of undeclared identifier '__builtin_ia32_paddb'; did you mean '__builtin_arm_addg'?
    return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:356:19: note: '__builtin_arm_addg' declared here
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:356:19: error: first argument of MTE builtin function must be a pointer ('__v8qi' (vector of 8 'char' values) invalid)
    return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
                  ^                    ~~~~~~~~~~~~
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:377:19: error: use of undeclared identifier '__builtin_ia32_paddw'; did you mean '__builtin_arm_addg'?
    return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:356:19: note: '__builtin_arm_addg' declared here
    return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Users/alan/micromamba/envs/eongit/lib/clang/16/include/mmintrin.h:377:19: error: first argument of MTE builtin function must be a pointer ('__v4hi' (vector of 4 'short' values) invalid)
    return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
                  ^                    ~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[139/144] Compiling C++ object eonclient.p/CommandLine.cpp.o
ninja: build stopped: subcommand failed.
Could not rebuild /Users/alan/Github/EONgit-main/client/bbdir

@HaoZeke
Copy link
Collaborator

HaoZeke commented Jun 20, 2024

Yeah we're almost there, it seems there is an old ifdef for OSX which isn't valid for aarm64, I'll update ASAP

@AlanSong641
Copy link
Collaborator Author

thanks for the update, pulled the new main branch and overwrited the micromamba environment. unfortunately now we have new error:

[140/156] Compiling C++ object eonclient.p/ClientEON.cpp.o
FAILED: eonclient.p/ClientEON.cpp.o 
arm64-apple-darwin20.0.0-clang++ -Ieonclient.p -I. -I.. -I../thirdparty -I/Users/alan/micromamba/envs/eongit/include/eigen3 -I/Users/alan/micromamba/envs/eongit/include -fdiagnostics-color=always -D_LIBCPP_ENABLE_ASSERTIONS=1 -std=c++17 -O0 -g -faligned-allocation -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/alan/micromamba/envs/eongit/include -D_FORTIFY_SOURCE=2 -isystem /Users/alan/micromamba/envs/eongit/include -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -Wno-class-memaccess -Wno-unused-function -Wno-reorder -Wno-sign-compare -Wno-unused-but-set-parameter -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-unused-result -Wno-unused-variable -g3 -O0 -DEON_CHECKS=TRUE -DOSX=TRUE -DSPDLOG_FMT_EXTERNAL -DCUH2_POT -DWITH_FORTRAN -MD -MQ eonclient.p/ClientEON.cpp.o -MF eonclient.p/ClientEON.cpp.o.d -o eonclient.p/ClientEON.cpp.o -c ../ClientEON.cpp
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunknown-warning-option]
../ClientEON.cpp:50:26: error: use of undeclared identifier 'OS_INFO'
  spdlog::info("OS: {}", OS_INFO);
                         ^
../ClientEON.cpp:51:28: error: use of undeclared identifier 'ARCH'
  spdlog::info("Arch: {}", ARCH);
                           ^
../ClientEON.cpp:410:26: error: variable has incomplete type 'struct task_basic_info'
  struct task_basic_info t_info;
                         ^
../ClientEON.cpp:410:10: note: forward declaration of 'task_basic_info'
  struct task_basic_info t_info;
         ^
../ClientEON.cpp:411:3: error: unknown type name 'mach_msg_type_number_t'
  mach_msg_type_number_t t_info_count = TASK_BASIC_INFO_COUNT;
  ^
../ClientEON.cpp:411:41: error: use of undeclared identifier 'TASK_BASIC_INFO_COUNT'
  mach_msg_type_number_t t_info_count = TASK_BASIC_INFO_COUNT;
                                        ^
../ClientEON.cpp:413:7: error: use of undeclared identifier 'KERN_SUCCESS'
  if (KERN_SUCCESS != task_info(mach_task_self(), TASK_BASIC_INFO,
      ^
../ClientEON.cpp:413:33: error: use of undeclared identifier 'mach_task_self'
  if (KERN_SUCCESS != task_info(mach_task_self(), TASK_BASIC_INFO,
                                ^
../ClientEON.cpp:414:34: error: use of undeclared identifier 'task_info_t'
                                (task_info_t)&t_info, &t_info_count)) {
                                 ^
../ClientEON.cpp:413:51: error: use of undeclared identifier 'TASK_BASIC_INFO'
  if (KERN_SUCCESS != task_info(mach_task_self(), TASK_BASIC_INFO,
                                                  ^
1 warning and 9 errors generated.
[141/156] Compiling C++ object test_matter.p/gtests_MatterTest.cpp.o
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunknown-warning-option]
1 warning generated.
[142/156] Compiling C++ object approve_params.p/gtests_ApproveParams.cpp.o
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunknown-warning-option]
1 warning generated.
[143/156] Compiling C++ object test_pot.p/gtests_PotTest.cpp.o
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunknown-warning-option]
1 warning generated.
[144/156] Compiling C++ object eonclient.p/CommandLine.cpp.o
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunknown-warning-option]
1 warning generated.
[145/156] Compiling C++ object libTestMain.dylib.p/gtests_TestMain.cpp.o
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunknown-warning-option]
1 warning generated.
[146/156] Compiling C++ object libTestMain.dylib.p/thirdparty_catch2_catch_amalgamated.cpp.o
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunknown-warning-option]
1 warning generated.
[147/156] Compiling C++ object test_matter.p/thirdparty_catch2_catch_amalgamated.cpp.o
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunknown-warning-option]
1 warning generated.
[148/156] Compiling C++ object test_pot.p/thirdparty_catch2_catch_amalgamated.cpp.o
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunknown-warning-option]
1 warning generated.
[149/156] Compiling C++ object approve_params.p/thirdparty_catch2_catch_amalgamated.cpp.o
warning: unknown warning option '-Wno-class-memaccess'; did you mean '-Wno-class-varargs'? [-Wunknown-warning-option]
1 warning generated.
ninja: build stopped: subcommand failed.
Could not rebuild /Users/alan/Github/EONgit/client/bbdir

@HaoZeke
Copy link
Collaborator

HaoZeke commented Jun 21, 2024 via email

@AlanSong641
Copy link
Collaborator Author

hmmmm tried checkout to that branch and get the same error:(

@HaoZeke
Copy link
Collaborator

HaoZeke commented Jun 21, 2024

Ah, we can debug it live when we meet, but if it is causing trouble they're only logging statements, could ifdef them out for now on __arm__

@HaoZeke
Copy link
Collaborator

HaoZeke commented Jun 22, 2024

The issue is that OS and friends are not being set in the version.h file on M1 arch.. so

configure_file(
  input: 'version.h.in',
  output: 'version.h',
  configuration: {
    'VERSION': version,
    'BUILD_DATE': build_date,
    'OS_INFO': host_system,
    'ARCH': architecture,
  }
)

Where the last 2 are supposed to be set from meson and ... aren't

@HaoZeke
Copy link
Collaborator

HaoZeke commented Jun 22, 2024

So the problem is "fixed" via ifdef skips, but really meson should do a better job, so I'll keep this open for a bit.

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

No branches or pull requests

2 participants