Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blas reports cmake as a dependency but fails to build with cmake dependency spec #7084

Closed
tjfulle opened this issue Jan 26, 2018 · 9 comments

Comments

@tjfulle
Copy link
Contributor

tjfulle commented Jan 26, 2018

Summary

blas reports cmake as a dependency but fails to build with cmake dependency spec

Expected Result

blas to build with cmake dependency spec

Actual Result

blas failed to build

Steps to reproduce the issue

$ spack dependencies blas
atlas  cmake  intel-mkl  intel-parallel-studio  netlib-lapack  netlib-xblas  openblas  veclibfort

$ spack spack install -y blas %gcc@6.4.0 ^cmake @3.10.1 %clang@8.0.0-apple
==> Error: blas does not depend on cmake
failed to install package 'blas'

Information on your system

Platform: Mac OS X 10.11 (El Capitan)

@davydden
Copy link
Member

blas is a virtual package, you can not install blas, you need to install one of the packages which provide blas, i.e. openblas, intel-mkl, etc.

@tjfulle
Copy link
Contributor Author

tjfulle commented Jan 26, 2018

Thanks @davydden, I did realize that after encountering the error, but the commands above seemed contradictory.

@davydden
Copy link
Member

yes, i think Spack should tell straight-away that one can not install virtual packages.

p.s. why would you start from installing blas? Spack works differently from apt-get install <package> and alike in that you should really start from the package you need, i.e. spack install petsc or alike and let Spack figure out the rest.

@tjfulle
Copy link
Contributor Author

tjfulle commented Jan 26, 2018

@davydden , I need blas for doing Trilinos development, but I don’t want to install Trilinos through spack. I use spack to install the prerequisites for Trilinos.

@davydden
Copy link
Member

I use spack to install the prerequisites for Trilinos.

that's what you need:

$ spack install -h
...
  --only {package,dependencies}
                        select the mode of installation. the default is to
                        install the package along with all its dependencies.
                        alternatively one can decide to install only the
                        package or only the dependencies
...

@tjfulle
Copy link
Contributor Author

tjfulle commented Jan 26, 2018

Perfect, thanks!

@davydden
Copy link
Member

p.s. i would still recommend installing Trilinos through Spack and then simply take the cmake config option from Spack. I use Spack to develop dealii, see this part of the wiki https://github.com/dealii/dealii/wiki/deal.II-in-Spack#develop-using-spack

p.p.s. ideally, spack setup is the right tool to do this, but it's being broken for quite a while... #5043

@tjfulle
Copy link
Contributor Author

tjfulle commented Jan 26, 2018

Thanks @davydden , I’ve got pretty extensive Trilinos setup scripts for different builds, I thought I’d take a stab at using spack to install dependencies on a new machine instead of Macports (which I have traditionally used). Looking more closely at the Trilinos package in spack, it looks like I still would need to modify several dependencies to work for me - so I am back to installing each one individually.

But, the reason for opening the issue was what seemed like an inconsistency to me between spack dependencies blas and spack install blas ^cmake.... You said that spack will not install virtual packages, but spack install blas doesn’t give an error but installs openblas.

Anyway, feel free to close this issue. Thanks, I did learn some new things!

@alalazo
Copy link
Member

alalazo commented Dec 13, 2019

@tjfulle A comment before closing the issue. The command:

spack dependencies <spec>

shows to you by default possible dependencies of a package. If you want to see the actual dependencies of some spec that is already installed there's the -i flag to the same command. Finally, you can use virtual specs at install time:

$ spack spec mpi
Input spec
--------------------------------
mpi

Concretized
--------------------------------
openmpi@3.1.4%gcc@9.0.1~cuda+cxx_exceptions fabrics=none ~java~legacylaunchers~memchecker~pmi schedulers=none ~sqlite3~thread_multiple+vt arch=linux-ubuntu18.04-broadwell
    ^hwloc@1.11.11%gcc@9.0.1~cairo~cuda~gl+libxml2~nvml+pci+shared arch=linux-ubuntu18.04-broadwell
        ^libpciaccess@0.13.5%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell
            ^libtool@2.4.6%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell
                ^m4@1.4.18%gcc@9.0.1 patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00,fc9b61654a3ba1a8d6cd78ce087e7c96366c290bc8d2c299f09828d793b853c8 +sigsegv arch=linux-ubuntu18.04-broadwell
                    ^libsigsegv@2.12%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell
            ^pkgconf@1.6.3%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell
            ^util-macros@1.19.1%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell
        ^libxml2@2.9.9%gcc@9.0.1~python arch=linux-ubuntu18.04-broadwell
            ^libiconv@1.16%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell
            ^xz@5.2.4%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell
            ^zlib@1.2.11%gcc@9.0.1+optimize+pic+shared arch=linux-ubuntu18.04-broadwell
        ^numactl@2.0.12%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell
            ^autoconf@2.69%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell
                ^perl@5.30.0%gcc@9.0.1+cpanm+shared+threads arch=linux-ubuntu18.04-broadwell
                    ^gdbm@1.18.1%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell
                        ^readline@8.0%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell
                            ^ncurses@6.1%gcc@9.0.1~symlinks~termlib arch=linux-ubuntu18.04-broadwell
            ^automake@1.16.1%gcc@9.0.1 arch=linux-ubuntu18.04-broadwell

They'll just be resolved to some concrete spec.

@alalazo alalazo closed this as completed Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants