OpenMC installtion Mac Apple M1 chip

Hi Everyone,

my name is Shuqi Xu, currently working as a postdoc for the HighNESS project at European Spallation Source in Swedn. I tried to install OpenMC from source in my MacBook (MacOS Monterey 12.6.1, Apple M1 Pro chip) by following the commands indicated in the website: Quick Install Guide — OpenMC Documentation. While errors occured:

[ 97%] Linking CXX shared library lib/libopenmc.dylib
ld: warning: ignoring file /Users/shuqixu/opt/miniconda3/lib/libhdf5_hl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /Users/shuqixu/opt/miniconda3/lib/libhdf5.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /Users/shuqixu/opt/miniconda3/lib/libhdf5.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /Users/shuqixu/opt/miniconda3/lib/libhdf5_hl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_H5Aclose", referenced from:
      _attribute_typesize in hdf5_interface.cpp.o
      openmc::attribute_shape(long long, char const*) in hdf5_interface.cpp.o
      _get_shape_attr in hdf5_interface.cpp.o
      openmc::read_attr(long long, char const*, long long, void*) in hdf5_interface.cpp.o
      _read_attr_double in hdf5_interface.cpp.o
      _read_attr_int in hdf5_interface.cpp.o
      _read_attr_string in hdf5_interface.cpp.o
      ...
  "_H5Acreate2", referenced from:
      openmc::write_attr(long long, int, unsigned long long const*, char const*, long long, void const*) in hdf5_interface.cpp.o
      _write_attr_double in hdf5_interface.cpp.o
      _write_attr_int in hdf5_interface.cpp.o
      _write_attr_string in hdf5_interface.cpp.o
  "_H5Aexists_by_name", referenced from:
      _attribute_exists in hdf5_interface.cpp.o
      openmc::ensure_exists(long long, char const*, bool) in hdf5_interface.cpp.o
  "_H5Aget_space", referenced from:
      _get_shape in hdf5_interface.cpp.o
      openmc::object_shape(long long) in hdf5_interface.cpp.o
      _get_shape_attr in hdf5_interface.cpp.o
  "_H5Aget_type", referenced from:
      _attribute_typesize in hdf5_interface.cpp.o
  "_H5Aopen", referenced from:
      _attribute_typesize in hdf5_interface.cpp.o
      openmc::attribute_shape(long long, char const*) in hdf5_interface.cpp.o
      _get_shape_attr in hdf5_interface.cpp.o
      openmc::read_attr(long long, char const*, long long, void*) in hdf5_interface.cpp.o
      _read_attr_double in hdf5_interface.cpp.o
      _read_attr_int in hdf5_interface.cpp.o
      _read_attr_string in hdf5_interface.cpp.o
      ...
  "_H5Aread", referenced from:
      openmc::read_attr(long long, char const*, long long, void*) in hdf5_interface.cpp.o
      _read_attr_double in hdf5_interface.cpp.o
      _read_attr_int in hdf5_interface.cpp.o
      _read_attr_string in hdf5_interface.cpp.o
  "_H5Awrite", referenced from:
      openmc::write_attr(long long, int, unsigned long long const*, char const*, long long, void const*) in hdf5_interface.cpp.o
      _write_attr_double in hdf5_interface.cpp.o
      _write_attr_int in hdf5_interface.cpp.o
      _write_attr_string in hdf5_interface.cpp.o
  "_H5Dclose", referenced from:
      _close_dataset in hdf5_interface.cpp.o
      _dataset_typesize in hdf5_interface.cpp.o
      openmc::read_dataset_lowlevel(long long, char const*, long long, long long, bool, void*) in hdf5_interface.cpp.o
      openmc::write_dataset_lowlevel(long long, int, unsigned long long const*, char const*, long long, long long, bool, void const*) in hdf5_interface.cpp.o
      openmc::create_voxel(openmc::Plot const&) in plot.cpp.o
      openmc::voxel_finalize(long long, long long, long long) in plot.cpp.o
      openmc::write_source_bank(long long, bool) in state_point.cpp.o
      ...
  "_H5Dcreate2", referenced from:
      openmc::write_dataset_lowlevel(long long, int, unsigned long long const*, char const*, long long, long long, bool, void const*) in hdf5_interface.cpp.o
      openmc::create_voxel(openmc::Plot const&) in plot.cpp.o
      openmc::voxel_init(long long, unsigned long long const*, long long*, long long*, long long*) in plot.cpp.o
      openmc::write_source_bank(long long, bool) in state_point.cpp.o
      openmc::finalize_particle_track(openmc::Particle&) in track_output.cpp.o
  "_H5Dget_space", referenced from:
      _get_shape in hdf5_interface.cpp.o
      openmc::object_shape(long long) in hdf5_interface.cpp.o
      _dataset_ndims in hdf5_interface.cpp.o
      openmc::write_source_bank(long long, bool) in state_point.cpp.o
      openmc::read_source_bank(long long, std::__1::vector<openmc::SourceSite, std::__1::allocator<openmc::SourceSite> >&, bool) in state_point.cpp.o
  "_H5Dget_type", referenced from:
      _dataset_typesize in hdf5_interface.cpp.o
      openmc::read_source_bank(long long, std::__1::vector<openmc::SourceSite, std::__1::allocator<openmc::SourceSite> >&, bool) in state_point.cpp.o
  "_H5Dopen2", referenced from:
      _dataset_typesize in hdf5_interface.cpp.o
      _open_dataset in hdf5_interface.cpp.o
      openmc::read_dataset_lowlevel(long long, char const*, long long, long long, bool, void*) in hdf5_interface.cpp.o
      openmc::read_source_bank(long long, std::__1::vector<openmc::SourceSite, std::__1::allocator<openmc::SourceSite> >&, bool) in state_point.cpp.o
  "_H5Dread", referenced from:
      openmc::read_dataset_lowlevel(long long, char const*, long long, long long, bool, void*) in hdf5_interface.cpp.o
      void openmc::read_dataset<std::__1::complex<double> >(long long, xt::xarray_container<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >, (xt::layout_type)1, xt::svector<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type, 4ul, std::__1::allocator<std::__1::vector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type>, true>, xt::xtensor_expression_tag>&, bool) in hdf5_interface.cpp.o
      openmc::read_source_bank(long long, std::__1::vector<openmc::SourceSite, std::__1::allocator<openmc::SourceSite> >&, bool) in state_point.cpp.o
  "_H5Dwrite", referenced from:
      openmc::write_dataset_lowlevel(long long, int, unsigned long long const*, char const*, long long, long long, bool, void const*) in hdf5_interface.cpp.o
      openmc::create_voxel(openmc::Plot const&) in plot.cpp.o
      openmc::voxel_write_slice(int, long long, long long, long long, void*) in plot.cpp.o
      openmc::write_source_bank(long long, bool) in state_point.cpp.o
      openmc::finalize_particle_track(openmc::Particle&) in track_output.cpp.o
  "_H5Fclose", referenced from:
      _file_close in hdf5_interface.cpp.o
      openmc::read_dataset_lowlevel(long long, char const*, long long, long long, bool, void*) in hdf5_interface.cpp.o
      openmc::using_mpio_device(long long) in hdf5_interface.cpp.o
      void openmc::read_dataset<std::__1::complex<double> >(long long, xt::xarray_container<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >, (xt::layout_type)1, xt::svector<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type, 4ul, std::__1::allocator<std::__1::vector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type>, true>, xt::xtensor_expression_tag>&, bool) in hdf5_interface.cpp.o
      openmc::write_dataset_lowlevel(long long, int, unsigned long long const*, char const*, long long, long long, bool, void const*) in hdf5_interface.cpp.o
  "_H5Fcreate", referenced from:
      _file_open in hdf5_interface.cpp.o
  "_H5Fget_access_plist", referenced from:
      openmc::read_dataset_lowlevel(long long, char const*, long long, long long, bool, void*) in hdf5_interface.cpp.o
      openmc::using_mpio_device(long long) in hdf5_interface.cpp.o
      void openmc::read_dataset<std::__1::complex<double> >(long long, xt::xarray_container<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >, (xt::layout_type)1, xt::svector<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type, 4ul, std::__1::allocator<std::__1::vector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type>, true>, xt::xtensor_expression_tag>&, bool) in hdf5_interface.cpp.o
      openmc::write_dataset_lowlevel(long long, int, unsigned long long const*, char const*, long long, long long, bool, void const*) in hdf5_interface.cpp.o
  "_H5Fopen", referenced from:
      _file_open in hdf5_interface.cpp.o
  "_H5Gclose", referenced from:
      _close_group in hdf5_interface.cpp.o
  "_H5Gcreate2", referenced from:
      _create_group in hdf5_interface.cpp.o
      openmc::create_group(long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in hdf5_interface.cpp.o
  "_H5Gget_info", referenced from:
      _get_num_datasets in hdf5_interface.cpp.o
      _get_num_groups in hdf5_interface.cpp.o
      _get_datasets in hdf5_interface.cpp.o
      _get_groups in hdf5_interface.cpp.o
      openmc::member_names(long long, H5O_type_t) in hdf5_interface.cpp.o
  "_H5Gopen2", referenced from:
      openmc::open_group(long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in hdf5_interface.cpp.o
      _open_group in hdf5_interface.cpp.o
  "_H5Iget_file_id", referenced from:
      openmc::read_dataset_lowlevel(long long, char const*, long long, long long, bool, void*) in hdf5_interface.cpp.o
      openmc::using_mpio_device(long long) in hdf5_interface.cpp.o
      void openmc::read_dataset<std::__1::complex<double> >(long long, xt::xarray_container<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >, (xt::layout_type)1, xt::svector<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type, 4ul, std::__1::allocator<std::__1::vector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type>, true>, xt::xtensor_expression_tag>&, bool) in hdf5_interface.cpp.o
      openmc::write_dataset_lowlevel(long long, int, unsigned long long const*, char const*, long long, long long, bool, void const*) in hdf5_interface.cpp.o
  "_H5Iget_name", referenced from:
      openmc::object_name(long long) in hdf5_interface.cpp.o
      _get_name in hdf5_interface.cpp.o
  "_H5Iget_type", referenced from:
      _get_shape in hdf5_interface.cpp.o
      openmc::object_shape(long long) in hdf5_interface.cpp.o
  "_H5LTpath_valid", referenced from:
      openmc::ensure_exists(long long, char const*, bool) in hdf5_interface.cpp.o
      _object_exists in hdf5_interface.cpp.o
  "_H5Lget_name_by_idx", referenced from:
      _get_datasets in hdf5_interface.cpp.o
      _get_groups in hdf5_interface.cpp.o
      openmc::member_names(long long, H5O_type_t) in hdf5_interface.cpp.o
  "_H5Oclose", referenced from:
      openmc::close_object(long long) in hdf5_interface.cpp.o
  "_H5Oget_info_by_idx1", referenced from:
      _get_num_datasets in hdf5_interface.cpp.o
      _get_num_groups in hdf5_interface.cpp.o
      _get_datasets in hdf5_interface.cpp.o
      _get_groups in hdf5_interface.cpp.o
      openmc::member_names(long long, H5O_type_t) in hdf5_interface.cpp.o
  "_H5Oopen", referenced from:
      openmc::open_object(long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in hdf5_interface.cpp.o
  "_H5Pclose", referenced from:
      openmc::read_dataset_lowlevel(long long, char const*, long long, long long, bool, void*) in hdf5_interface.cpp.o
      openmc::using_mpio_device(long long) in hdf5_interface.cpp.o
      void openmc::read_dataset<std::__1::complex<double> >(long long, xt::xarray_container<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >, (xt::layout_type)1, xt::svector<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type, 4ul, std::__1::allocator<std::__1::vector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type>, true>, xt::xtensor_expression_tag>&, bool) in hdf5_interface.cpp.o
      openmc::write_dataset_lowlevel(long long, int, unsigned long long const*, char const*, long long, long long, bool, void const*) in hdf5_interface.cpp.o
  "_H5Pget_driver", referenced from:
      openmc::read_dataset_lowlevel(long long, char const*, long long, long long, bool, void*) in hdf5_interface.cpp.o
      openmc::using_mpio_device(long long) in hdf5_interface.cpp.o
      void openmc::read_dataset<std::__1::complex<double> >(long long, xt::xarray_container<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >, (xt::layout_type)1, xt::svector<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type, 4ul, std::__1::allocator<std::__1::vector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type>, true>, xt::xtensor_expression_tag>&, bool) in hdf5_interface.cpp.o
      openmc::write_dataset_lowlevel(long long, int, unsigned long long const*, char const*, long long, long long, bool, void const*) in hdf5_interface.cpp.o
  "_H5Sclose", referenced from:
      _get_shape in hdf5_interface.cpp.o
      openmc::object_shape(long long) in hdf5_interface.cpp.o
      _get_shape_attr in hdf5_interface.cpp.o
      _dataset_ndims in hdf5_interface.cpp.o
      _read_tally_results in hdf5_interface.cpp.o
      openmc::write_attr(long long, int, unsigned long long const*, char const*, long long, void const*) in hdf5_interface.cpp.o
      _write_attr_double in hdf5_interface.cpp.o
      ...
  "_H5Screate", referenced from:
      openmc::write_attr(long long, int, unsigned long long const*, char const*, long long, void const*) in hdf5_interface.cpp.o
      _write_attr_double in hdf5_interface.cpp.o
      _write_attr_int in hdf5_interface.cpp.o
      _write_attr_string in hdf5_interface.cpp.o
      openmc::write_dataset_lowlevel(long long, int, unsigned long long const*, char const*, long long, long long, bool, void const*) in hdf5_interface.cpp.o
  "_H5Screate_simple", referenced from:
      _read_tally_results in hdf5_interface.cpp.o
      openmc::write_attr(long long, int, unsigned long long const*, char const*, long long, void const*) in hdf5_interface.cpp.o
      _write_attr_double in hdf5_interface.cpp.o
      _write_attr_int in hdf5_interface.cpp.o
      openmc::write_dataset_lowlevel(long long, int, unsigned long long const*, char const*, long long, long long, bool, void const*) in hdf5_interface.cpp.o
      _write_tally_results in hdf5_interface.cpp.o
      openmc::create_voxel(openmc::Plot const&) in plot.cpp.o
      ...
  "_H5Sget_simple_extent_dims", referenced from:
      _get_shape in hdf5_interface.cpp.o
      openmc::object_shape(long long) in hdf5_interface.cpp.o
      _get_shape_attr in hdf5_interface.cpp.o
      openmc::read_source_bank(long long, std::__1::vector<openmc::SourceSite, std::__1::allocator<openmc::SourceSite> >&, bool) in state_point.cpp.o
  "_H5Sget_simple_extent_ndims", referenced from:
      openmc::object_shape(long long) in hdf5_interface.cpp.o
      _dataset_ndims in hdf5_interface.cpp.o
  "_H5Soffset_simple", referenced from:
      openmc::create_voxel(openmc::Plot const&) in plot.cpp.o
      openmc::voxel_write_slice(int, long long, long long, long long, void*) in plot.cpp.o
  "_H5Sselect_hyperslab", referenced from:
      _read_tally_results in hdf5_interface.cpp.o
      _write_tally_results in hdf5_interface.cpp.o
      openmc::create_voxel(openmc::Plot const&) in plot.cpp.o
      openmc::voxel_init(long long, unsigned long long const*, long long*, long long*, long long*) in plot.cpp.o
      openmc::write_source_bank(long long, bool) in state_point.cpp.o
      openmc::read_source_bank(long long, std::__1::vector<openmc::SourceSite, std::__1::allocator<openmc::SourceSite> >&, bool) in state_point.cpp.o
  "_H5T_C_S1_g", referenced from:
      _read_attr_string in hdf5_interface.cpp.o
      _read_string in hdf5_interface.cpp.o
      _write_attr_string in hdf5_interface.cpp.o
      _write_string in hdf5_interface.cpp.o
      openmc::write_string(long long, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in hdf5_interface.cpp.o
  "_H5T_NATIVE_DOUBLE_g", referenced from:
      _read_attr_double in hdf5_interface.cpp.o
      void openmc::read_dataset<std::__1::complex<double> >(long long, xt::xarray_container<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >, (xt::layout_type)1, xt::svector<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type, 4ul, std::__1::allocator<std::__1::vector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type>, true>, xt::xtensor_expression_tag>&, bool) in hdf5_interface.cpp.o
      _read_complex in hdf5_interface.cpp.o
      _read_double in hdf5_interface.cpp.o
      _read_tally_results in hdf5_interface.cpp.o
      _write_attr_double in hdf5_interface.cpp.o
      _write_double in hdf5_interface.cpp.o
      ...
  "_H5T_NATIVE_INT64_g", referenced from:
      __GLOBAL__sub_I_hdf5_interface.cpp in hdf5_interface.cpp.o
  "_H5T_NATIVE_INT8_g", referenced from:
      __GLOBAL__sub_I_hdf5_interface.cpp in hdf5_interface.cpp.o
  "_H5T_NATIVE_INT_g", referenced from:
      _read_attr_int in hdf5_interface.cpp.o
      _read_int in hdf5_interface.cpp.o
      _write_attr_int in hdf5_interface.cpp.o
      _write_int in hdf5_interface.cpp.o
      __GLOBAL__sub_I_hdf5_interface.cpp in hdf5_interface.cpp.o
      openmc::create_voxel(openmc::Plot const&) in plot.cpp.o
      openmc::voxel_init(long long, unsigned long long const*, long long*, long long*, long long*) in plot.cpp.o
      ...
  "_H5T_NATIVE_LLONG_g", referenced from:
      _read_llong in hdf5_interface.cpp.o
      _write_llong in hdf5_interface.cpp.o
  "_H5T_NATIVE_SCHAR_g", referenced from:
      __GLOBAL__sub_I_hdf5_interface.cpp in hdf5_interface.cpp.o
  "_H5T_NATIVE_UINT_g", referenced from:
      __GLOBAL__sub_I_hdf5_interface.cpp in hdf5_interface.cpp.o
  "_H5T_NATIVE_ULLONG_g", referenced from:
      __GLOBAL__sub_I_hdf5_interface.cpp in hdf5_interface.cpp.o
  "_H5T_NATIVE_ULONG_g", referenced from:
      __GLOBAL__sub_I_hdf5_interface.cpp in hdf5_interface.cpp.o
  "_H5Tclose", referenced from:
      _attribute_typesize in hdf5_interface.cpp.o
      _dataset_typesize in hdf5_interface.cpp.o
      _read_attr_string in hdf5_interface.cpp.o
      void openmc::read_dataset<std::__1::complex<double> >(long long, xt::xarray_container<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >, (xt::layout_type)1, xt::svector<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type, 4ul, std::__1::allocator<std::__1::vector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type>, true>, xt::xtensor_expression_tag>&, bool) in hdf5_interface.cpp.o
      _read_complex in hdf5_interface.cpp.o
      _read_string in hdf5_interface.cpp.o
      _write_attr_string in hdf5_interface.cpp.o
      ...
  "_H5Tcopy", referenced from:
      _read_attr_string in hdf5_interface.cpp.o
      _read_string in hdf5_interface.cpp.o
      _write_attr_string in hdf5_interface.cpp.o
      _write_string in hdf5_interface.cpp.o
      openmc::write_string(long long, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in hdf5_interface.cpp.o
  "_H5Tcreate", referenced from:
      void openmc::read_dataset<std::__1::complex<double> >(long long, xt::xarray_container<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >, (xt::layout_type)1, xt::svector<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type, 4ul, std::__1::allocator<std::__1::vector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type>, true>, xt::xtensor_expression_tag>&, bool) in hdf5_interface.cpp.o
      _read_complex in hdf5_interface.cpp.o
      openmc::h5banktype() in state_point.cpp.o
      openmc::open_track_file() in track_output.cpp.o
  "_H5Tget_member_name", referenced from:
      openmc::dtype_member_names(long long) in state_point.cpp.o
  "_H5Tget_nmembers", referenced from:
      openmc::dtype_member_names(long long) in state_point.cpp.o
  "_H5Tget_size", referenced from:
      _attribute_typesize in hdf5_interface.cpp.o
      _dataset_typesize in hdf5_interface.cpp.o
  "_H5Tinsert", referenced from:
      void openmc::read_dataset<std::__1::complex<double> >(long long, xt::xarray_container<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >, (xt::layout_type)1, xt::svector<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type, 4ul, std::__1::allocator<std::__1::vector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type>, true>, xt::xtensor_expression_tag>&, bool) in hdf5_interface.cpp.o
      _read_complex in hdf5_interface.cpp.o
      openmc::h5banktype() in state_point.cpp.o
      openmc::open_track_file() in track_output.cpp.o
  "_H5Tset_size", referenced from:
      _read_attr_string in hdf5_interface.cpp.o
      _read_string in hdf5_interface.cpp.o
      _write_attr_string in hdf5_interface.cpp.o
      _write_string in hdf5_interface.cpp.o
      openmc::write_string(long long, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in hdf5_interface.cpp.o
  "_H5Tset_strpad", referenced from:
      _read_attr_string in hdf5_interface.cpp.o
      _read_string in hdf5_interface.cpp.o
  "_H5check_version", referenced from:
      _file_open in hdf5_interface.cpp.o
  "_H5free_memory", referenced from:
      openmc::dtype_member_names(long long) in state_point.cpp.o
  "_H5open", referenced from:
      _file_open in hdf5_interface.cpp.o
      _read_attr_double in hdf5_interface.cpp.o
      _read_attr_int in hdf5_interface.cpp.o
      _read_attr_string in hdf5_interface.cpp.o
      void openmc::read_dataset<std::__1::complex<double> >(long long, xt::xarray_container<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >, (xt::layout_type)1, xt::svector<xt::uvector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type, 4ul, std::__1::allocator<std::__1::vector<std::__1::complex<double>, std::__1::allocator<std::__1::complex<double> > >::size_type>, true>, xt::xtensor_expression_tag>&, bool) in hdf5_interface.cpp.o
      _read_complex in hdf5_interface.cpp.o
      _read_double in hdf5_interface.cpp.o
      ...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libopenmc.dylib] Error 1
make[1]: *** [CMakeFiles/libopenmc.dir/all] Error 2
make: *** [all] Error 2

Nevertheless, I installed successfully in my old Mac (MacOS Ventura 13.0 Intel Core i5). So I would like to know if someone confronted the same issue when using the Apple M1 chip, or may I make some mistakes? Thank you very much for your help!

Shuqi

Hi @xushuqi and welcome to the community! I know that some others have had issues installing on Apple M1 as well; I’ll ping a few people who may be able to give some pointers here.

1 Like

The line building for macOS-x86_64 but attempting to link with file built for macOS-arm64 seems to indicate that your compiler is attempting to generate an x86 binary rather than a native arm64 for the M1, and is running into trouble because your HDF5 install is in arm64. You might try running clang --version as discussed in this thread (command line - clang showing incorrect target on M1 Mac - Ask Different) to see if that is indeed the case.

1 Like

Hi @paulromano and @jtramm,

thank you very much for your replies! Yes the problem was due to the complier. I reinstall it in arm64 and the issue was resolved.

Best regards,
Shuqi

Hi everyone,

I am also new to OpenMC, and am having similar issues with the installation process. I have a MacBook Pro (Apple M1 Max chip), and on macOS Ventura 13.1. The error occurs on the last step of the Quick Install Guide at pip install.

When I do

pip install .

The following error occurs.

ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

I double checked below, and made sure I have latest version of python and numpy installed.

Does anyone have any advice on how to resolve this issue?

@soha By default when you run pip install, it will look at the build requirements in pyproject.toml and create an isolated environment where they are installed first (this is discussed at length in PEP 517). This means it will ignore the version of numpy that’s already installed. You can run pip install --no-build-isolation . to force pip to not use this isolated environment so it will pick up your existing installation of numpy. Also note that if you go this route, you’ll need to have wheel and Cython installed as well. Hope this helps!

Thanks for your response. It solved the previous error, and this is the newest one about h5py:

ERROR: Could not build wheels for h5py, which is required to install pyproject.toml-based projects

@soha You may want to try the suggestions from this stack overflow thread about setting HDF5_DIR. Hopefully that will get you a little further along!