Skip to content

Unable to build on Mac M4 #490

Description

@lipohlmann

Description

Hi all,

I am working to build OpenMOC to run some benchmarks, but the build system appears to be outdated... I am attempting to install from source as the documentation suggests.

Device specifications:

  • Apple Air M4 Chip
  • Compiler: clang
  • RAM: 16 GB

Terminal log:

Just attempting to install in a base conda environment with Python 3.13:

lipohlmann@macbook-air-4 ~/c/OpenMOC (develop)> python setup.py install --user --cc=clang                       (base) 
/Users/lipohlmann/anaconda3/lib/python3.13/site-packages/setuptools/_distutils/cmd.py:90: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        This deprecation is overdue, please update your project and remove deprecated
        calls to avoid build errors in the future.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
/Users/lipohlmann/anaconda3/lib/python3.13/site-packages/setuptools/dist.py:599: SetuptoolsDeprecationWarning: Invalid dash-separated key 'description-file' in 'metadata' (setup.cfg), please use the underscore name 'description_file' instead.
!!

        ********************************************************************************
        Usage of dash-separated 'description-file' will not be supported in future
        versions. Please use the underscore name 'description_file' instead.
        (Affected: openmoc).

        This deprecation is overdue, please update your project and remove deprecated
        calls to avoid build errors in the future.

        See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
        ********************************************************************************

!!
  opt = self._enforce_underscore(opt, section)
error: [Errno 17] File exists: '/Users/lipohlmann/anaconda3/bin/python3.13'

However, if I create a new conda environment based on Python 3.8, the build process gets a little farther:

lipohlmann@macbook-air-4 ~/c/OpenMOC (develop)> python setup.py install --user --cc=clang                    (openmoc) 
/Users/lipohlmann/anaconda3/envs/openmoc/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
/Users/lipohlmann/anaconda3/envs/openmoc/lib/python3.8/site-packages/setuptools/dist.py:452: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!

        ********************************************************************************
        Usage of dash-separated 'description-file' will not be supported in future
        versions. Please use the underscore name 'description_file' instead.

        This deprecation is overdue, please update your project and remove deprecated
        calls to avoid build errors in the future.

        See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
        ********************************************************************************

!!
  opt = self.warn_dash_deprecation(opt, section)
Deprecated command line option: -py3. Ignored, this option is no longer supported.
openmoc/swig/../../src/Cell.h:191: Warning 511: Can't use keyword arguments with overloaded functions (Cell::minSurfaceDist(Point *,double,double)).
openmoc/swig/../../src/Cell.h:192: Warning 511: Can't use keyword arguments with overloaded functions (Cell::minSurfaceDist(LocalCoords *)).
openmoc/swig/../../src/log.h:114: Warning 511: Can't use keyword arguments with overloaded functions (set_log_level(char const *)).
openmoc/swig/../../src/log.h:115: Warning 511: Can't use keyword arguments with overloaded functions (set_log_level(int)).
openmoc/swig/../../src/Quadrature.h:188: Warning 503: Can't wrap 'operator <<' unless renamed to a valid identifier.
openmoc/swig/../../src/Region.h:86: Warning 511: Can't use keyword arguments with overloaded functions (Region::minSurfaceDist(LocalCoords *)).
openmoc/swig/../../src/Region.h:87: Warning 511: Can't use keyword arguments with overloaded functions (Region::minSurfaceDist(Point *,double,double)).
openmoc/swig/../../src/Region.h:158: Warning 511: Can't use keyword arguments with overloaded functions (Halfspace::minSurfaceDist(LocalCoords *)).
openmoc/swig/../../src/Region.h:159: Warning 511: Can't use keyword arguments with overloaded functions (Halfspace::minSurfaceDist(Point *,double,double)).
openmoc/swig/../../src/Surface.h:195: Warning 511: Can't use keyword arguments with overloaded functions (Surface::getMinDistance(Point *,double,double)).
openmoc/swig/../../src/Surface.h:196: Warning 511: Can't use keyword arguments with overloaded functions (Surface::getMinDistance(LocalCoords *)).
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: clang++error: unknown argument: '-Xpreprocessor -fopenmp'
: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++clang++: : error: unknown argument: '-Xpreprocessor -fopenmp'
error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
clang++: error: unknown argument: '-Xpreprocessor -fopenmp'
error: command '/usr/bin/g++' failed with exit code 1

Any help would be greatly appreciated!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions