Repository: spack/spack

Issue:
spack fails to build samrai 3.11.2
While building samrai on LLNL quartz for version 3.11.2 with Intel compiler, spack expects there is include/boost/tr1 sub-directory, but the boost library installed by spack does not have such a directory, and the build fails.

### Expected Result

The build should succeed without an error.

### Actual Result

Spack fails at the configuration step, because it cannot find include/boost/tr1 directory for boost.

Error message:
     113    checking whether HDF5 link works... yes
     114    checking for BOOST installation...
  >> 115    configure: error: BOOST not found in /usr/workspace/wsa/wang102/spack/opt/spack/linux-rhel7-x86_64/intel-18.0.2/boost-1.67.0-5356zjcg5ezmk76eybujazxnfuz6wtql

### Steps to reproduce the issue
$ spack install samrai@3.11.2 %intel@18.0.2


### Other information
spack: 0.11.2, development branch
machine architecture: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz
OS: (Red Hat Enterprise Linux Server release 7.4 (Maipo)
compiler: Intel 18.0.2

$ spack spec samrai@3.11.2 %intel@18.0.2

Input spec
--------------------------------
samrai@3.11.2%intel@18.0.2

Concretized
--------------------------------
samrai@3.11.2%intel@18.0.2~debug arch=linux-rhel7-x86_64
    ^boost@1.67.0%intel@18.0.2+atomic+chrono~clanglibcpp cxxstd=default +date_time~debug+exception+filesystem~graph~icu+iostreams+locale+log+math~mpi+multithreaded~numpy patches=2ab6c72d03dec6a4ae20220a9dfd5c8c572c5294252155b85c6874d97c323199 +program_options~python+random+regex+serialization+shared+signals~singlethreaded+system~taggedlayout+test+thread+timer~versionedlayout+wave arch=linux-rhel7-x86_64
        ^bzip2@1.0.6%intel@18.0.2+shared arch=linux-rhel7-x86_64
        ^zlib@1.2.11%intel@18.0.2+optimize+pic+shared arch=linux-rhel7-x86_64
    ^hdf5@1.10.2%intel@18.0.2~cxx~debug~fortran~hl+mpi+pic+shared~szip~threadsafe arch=linux-rhel7-x86_64
        ^openmpi@3.1.0%intel@18.0.2~cuda fabrics=verbs ~java~memchecker~pmi schedulers= ~sqlite3~thread_multiple+vt arch=linux-rhel7-x86_64
            ^hwloc@1.11.9%intel@18.0.2~cairo~cuda+libxml2+pci+shared arch=linux-rhel7-x86_64
                ^libpciaccess@0.13.5%intel@18.0.2 arch=linux-rhel7-x86_64
                    ^libtool@2.4.6%intel@18.0.2 arch=linux-rhel7-x86_64
                        ^m4@1.4.18%intel@18.0.2 patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00 +sigsegv arch=linux-rhel7-x86_64
                            ^libsigsegv@2.11%intel@18.0.2 arch=linux-rhel7-x86_64
                    ^pkgconf@1.4.2%intel@18.0.2 arch=linux-rhel7-x86_64
                    ^util-macros@1.19.1%intel@18.0.2 arch=linux-rhel7-x86_64
                ^libxml2@2.9.8%intel@18.0.2~python arch=linux-rhel7-x86_64
                    ^xz@5.2.4%intel@18.0.2 arch=linux-rhel7-x86_64
                ^numactl@2.0.11%intel@18.0.2 arch=linux-rhel7-x86_64
                    ^autoconf@2.69%intel@18.0.2 arch=linux-rhel7-x86_64
                        ^perl@5.26.2%intel@18.0.2+cpanm patches=0eac10ed90aeb0459ad8851f88081d439a4e41978e586ec743069e8b059370ac +shared+threads arch=linux-rhel7-x86_64
                            ^gdbm@1.14.1%intel@18.0.2 arch=linux-rhel7-x86_64
                                ^readline@7.0%intel@18.0.2 arch=linux-rhel7-x86_64
                                    ^ncurses@6.1%intel@18.0.2~symlinks~termlib arch=linux-rhel7-x86_64
                    ^automake@1.16.1%intel@18.0.2 arch=linux-rhel7-x86_64


Discussion:
Hmm. I'm seeing this as well. I will look into this.
Is there a boost variant that needs to be enabled in the dependency?

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/samrai/package.py b/var/spack/repos/builtin/packages/samrai/package.py
--- a/var/spack/repos/builtin/packages/samrai/package.py
+++ b/var/spack/repos/builtin/packages/samrai/package.py
@@ -37,7 +37,12 @@ class Samrai(AutotoolsPackage):
     url      = "https://computation.llnl.gov/projects/samrai/download/SAMRAI-v3.11.2.tar.gz"
     list_url = homepage
 
+    version('3.12.0',     '07364f6e209284e45ac0e9caf1d610f6')
+    version('3.11.5',     '4359a03145c03501b230777f92b62104')
+    version('3.11.4',     '473d6796772f5926b1c0d1cf8f3f8c99')
+    # Version 3.11.3 permissions don't allow downloading
     version('3.11.2',     'd5f59f8efd755b23b797e46349428206')
+    version('3.11.1',     '19a2398a7448ec0f0f0c5e8fc6f80478')
     version('3.10.0',     'ff5f5b8b4a35b52a1b7e37a74166c65a')
     version('3.9.1',      '232d04d0c995f5abf20d94350befd0b2')
     version('3.8.0',      'c18fcffa706346bfa5828b36787ce5fe')
@@ -59,9 +64,14 @@ class Samrai(AutotoolsPackage):
     depends_on('mpi')
     depends_on('zlib')
     depends_on('hdf5+mpi')
-    depends_on('boost')
     depends_on('m4', type='build')
 
+    # At some point later versions of boost were not able to be found
+    # by SAMRAI during configure, so we're using boost <= 1.60.0 for
+    # < 3.12.0 versions. I don't know what version of boost that
+    # happened at though without trying each version of boost.
+    depends_on('boost@:1.60.0', when='@0:3.11.99')
+
     # don't build tools with gcc
     patch('no-tool-build.patch', when='%gcc')
 
@@ -74,13 +84,17 @@ def configure_args(self):
             '--with-F77=%s' % self.spec['mpi'].mpifc,
             '--with-M4=%s' % self.spec['m4'].prefix,
             '--with-hdf5=%s' % self.spec['hdf5'].prefix,
-            '--with-boost=%s' % self.spec['boost'].prefix,
             '--with-zlib=%s' % self.spec['zlib'].prefix,
             '--without-blas',
             '--without-lapack',
             '--with-hypre=no',
             '--with-petsc=no'])
 
+        if self.spec.satisfies('@0:3.11.99'):
+            options.extend([
+                '--with-boost=%s' % self.spec['boost'].prefix
+            ])
+
         if '+debug' in self.spec:
             options.extend([
                 '--disable-opt',


Test patch: