Installation Problem while Building Conda Package

I’m trying to replace pystan by cmdstanpy for building the package orbit-ml. It works in PyPI. However, when I try similar process in conda. I encounter an error like this:

/bin/sh: mpicxx: command not found
  stan/lib/stan_math/make/libraries:117: *** "Need to set TBB_CXX_TYPE for non-standard compiler other than gcc or clang.".  Stop.
  21:09:04 - cmdstanpy - WARNING - CmdStan installation failed.

Please see the log for details.

The build.sh i used is the following:

STAN_MPI=true
CXX=mpicxx
TBB_CXX_TYPE=gcc

python -c "import sys; print(sys.version)"

$PYTHON -m pip install . -vv

For all the setup, one can check the recipe here: orbit-ml-feedstock/recipe at main · conda-forge/orbit-ml-feedstock · GitHub

Thanks for the attention.

Edwin

I believe you need to depend on MPI to be able to use mpicxx. See Knowledge Base — conda-forge 2023.01.25 documentation

Have you tried a build which doesn’t use MPI?

I did try one without MPI but it doesn’t work. I also tried only using TBB_CXX_TYPE=gcc and it doesn’t work too. Here is a longer version of the error message. See this.

It seems the error is from the command make build -j2 and asking to set some proper values for TBB_CXX_TYPE but I am not sure what it is expecting.

  Unpacked download as cmdstan-2.31.0
  Building version cmdstan-2.31.0, may take several minutes, depending on your system.
  cmd: make build -j2
  cwd: None
  stan/lib/stan_math/make/libraries:117: *** "Need to set TBB_CXX_TYPE for non-standard compiler other than gcc or clang.".  Stop.
  07:18:18 - cmdstanpy - WARNING - CmdStan installation failed.
  Command "make build" failed
  Command ['make', 'build', '-j2']
        error during processing No such file or directory
  CmdStan installation failed.
  Command "make build" failed
  Command ['make', 'build', '-j2']

I think because make calls make as a subprocess to build TBB you may need to actually export TBB_CXX_TYPE, not just set it.

Alternatively try echoing it into $CMDSTAN/make/local

Thanks for the suggestion. the export approach works.