danieljprice / homebrew-all

homebrew install scripts for various packages I maintain, e.g. brew tap danieljprice/all; brew install splash
GNU General Public License v2.0
2 stars 0 forks source link

Astrochem compilation fails #44

Open smaret opened 1 week ago

smaret commented 1 week ago

Out of curiosity I tried to install astrochem with your tap. It failed with the following error:

checking for main in -lsundials_nvecserial... yes
checking for python module numpy... no
configure: error: Could not find Python module Numpy.

I'll look into this, but I'm reporting it for bookkeeping.

danieljprice commented 6 days ago

thanks for the issue, I fixed the python problem (just with depends_on python instead of a specific version). However there seems to be a genuine bug/issue with compiling from your main GitHub branch:

==> make install
Last 15 lines from /Users/dprice/Library/Logs/Homebrew/astrochem/03.make:
solve.c:417:52: error: use of undeclared identifier 'h'
  417 |       CVodeGetLastStep (astrochem_mem->cvode_mem, &h);
      |                                                    ^
solve.c:419:25: error: use of undeclared identifier 't'
  419 |                (double) t / CONST_MKSA_YEAR,
      |                         ^
solve.c:420:25: error: use of undeclared identifier 'h'
  420 |                (double) h / CONST_MKSA_YEAR);
      |                         ^
15 errors generated.
make[1]: *** [solve.lo] Error 1

I would add that I wrote the brew package for a student was having trouble with dependencies, we were also playing with astrochem as a dependency for mcfost so helpful to have it packaged. Feel free to reuse / adapt

danieljprice commented 6 days ago

also tried installing the stable release instead, but same error.

smaret commented 6 days ago

Which version of SUNDIALS do you use ?

danieljprice commented 3 days ago

I just used depends_on "sundials", without specifying a version:

brew cat sundials

gives the following:

class Sundials < Formula
  desc "Nonlinear and differential/algebraic equations solver"
  homepage "https://computing.llnl.gov/projects/sundials"
  url "https://github.com/LLNL/sundials/releases/download/v7.1.1/sundials-7.1.1.tar.gz"

which I guess is the latest. Should astrochem be compiled with a specific (older) version?

smaret commented 3 days ago

Should astrochem be compiled with a specific (older) version?

Yes: >= 4.1 and < 6

I need to modify the code for latest version (see https://github.com/smaret/astrochem/issues/88)