NOAA-EMC / NCEPLIBS-bacio

This library performs binary I/O for the NCEP models.
Other
2 stars 6 forks source link

spack build works for EMC branch of spack, but not main spack repo #120

Closed edwardhartnett closed 1 year ago

edwardhartnett commented 1 year ago

I have a CI system for NCEPLIBS-grib_utils which works for spack: https://github.com/NOAA-EMC/NCEPLIBS-grib_util/pull/194

But it only works if we use our own fork of spack. When I use the main spack repo I get this error:

The 'bacio' package cannot find an attribute while trying to build from sources. This might be due to a change in Spack's package format to support multiple build-systems for a single package. You can fix this by updating the build recipe, and you can also report the issue as a bug. More information at https://spack.readthedocs.io/en/latest/packaging_guide.html#installation-procedure

/home/runner/work/NCEPLIBS-grib_util/NCEPLIBS-grib_util/spack/var/spack/repos/builtin/packages/bacio/package.py:44, in patch:
         43    def patch(self):
  >>     44        if self.spec.satisifes("@@2.4.1"):
         45            filter_file(".*", "2.4.1", "VERSION")

==> Warning: Skipping build of w3emc-2.9.2-xf7gyqshwuihii7amk6xsymgsijbw2ea since bacio-2.4.1-fprv2bmeo3a7sfccu5hgobebs62esu6v failed
==> Error: Terminating after first install failure: AttributeError: 'Spec' object has no attribute 'satisifes'
==> Updating view at /home/runner/work/NCEPLIBS-grib_util/NCEPLIBS-grib_util/spack/var/spack/environments/grib_utils-env/.spack-env/view

We need the main spack repo to build our code. Not just our own fork.

AlexanderRichert-NOAA commented 1 year ago

This is a typo that came from a revision of my PR to main spack. Working on this now.

AlexanderRichert-NOAA commented 1 year ago

@edwardhartnett Fix was just merged, please rerun.

edwardhartnett commented 1 year ago

Quick work! Did you have to make a change to the main spack repo?

AlexanderRichert-NOAA commented 1 year ago

Yes. The issue was the result of my PR that got merged last night, thankfully the turnaround on this was very fast.

edwardhartnett commented 1 year ago

I tried again and it failed, but in a different way:

    '/usr/local/bin/cmake' '-G' 'Unix Makefiles' '-DCMAKE_INSTALL_PREFIX:STRING=/home/runner/work/NCEPLIBS-grib_util/NCEPLIBS-grib_util/spack/opt/spack/linux-ubuntu22.04-x86_64_v4/gcc-10.4.0/bacio-2.4.1-5uq4k2iozdykk5jsfyugnx3k3aojgvc6' '-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo' '-DBUILD_TESTING:BOOL=OFF' '-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=OFF' '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON' '-DCMAKE_INSTALL_RPATH:STRING=/home/runner/work/NCEPLIBS-grib_util/NCEPLIBS-grib_util/spack/opt/spack/linux-ubuntu22.04-x86_64_v4/gcc-10.4.0/bacio-2.4.1-5uq4k2iozdykk5jsfyugnx3k3aojgvc6/lib;/home/runner/work/NCEPLIBS-grib_util/NCEPLIBS-grib_util/spack/opt/spack/linux-ubuntu22.04-x86_64_v4/gcc-10.4.0/bacio-2.4.1-5uq4k2iozdykk5jsfyugnx3k3aojgvc6/lib64' '-DCMAKE_PREFIX_PATH:STRING=' '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON' '/tmp/runner/spack-stage/spack-stage-bacio-2.4.1-5uq4k2iozdykk5jsfyugnx3k3aojgvc6/spack-src'

1 error found in build log:
  >> 3    CMake Error at CMakeLists.txt:5 (project):
     4      VERSION "2.4.12.4.1" format invalid.
     5    
     6    
     7    -- Configuring incomplete, errors occurred!

See build log for details:
  /tmp/runner/spack-stage/spack-stage-bacio-2.4.1-5uq4k2iozdykk5jsfyugnx3k3aojgvc6/spack-build-out.txt

If you want you can rerun the test when you think the fix is in. Just rerun the failed CI jobs here: https://github.com/NOAA-EMC/NCEPLIBS-grib_util/pull/194

edwardhartnett commented 1 year ago

@AlexanderRichert-NOAA let me know when I should try this again.

AlexanderRichert-NOAA commented 1 year ago

Will do-- There was an issue with the Spack CI so I'm waiting on the PR to go through, I'll keep you posted.

AlexanderRichert-NOAA commented 1 year ago

@edwardhartnett Okay, fixed as of 536c770 (https://github.com/spack/spack/pull/34668).