configure error with libzip "zlib version too old, please install at least v1.1.2"

444 views
Skip to first unread message

Eric Masshardt

unread,
Apr 15, 2020, 1:55:10 AM4/15/20
to Spack
I'm working on an initial build in a CentOS 7 container to try to mimic our Spack v0.12.1 install on our HPC cluster.

I built gcc 7.3.0 via spack without issues and did a spack compiler add once completed.

Then I did a 'spack install bcftools@1.9 %g...@7.3.0' and that's when I receive the error (after successful builds/installs of diffutils, bzip2, xz, zlib, htslib

zlib build
==> Installing zlib
==> Searching for binary cache of zlib
==> Warning: No Spack mirrors are currently configured
==> No binary for zlib found: installing from source
==> Using cached archive: /opt/spack/var/spack/cache/zlib/zlib-1.2.11.tar.gz
==> Staging archive: /opt/spack/var/spack/stage/zlib-1.2.11-zknfwanbwk6tnyaplsykwghx7cvnz4cr/zlib-1.2.11.tar.gz
==> Created stage in /opt/spack/var/spack/stage/zlib-1.2.11-zknfwanbwk6tnyaplsykwghx7cvnz4cr
==> No patches needed for zlib
==> Building zlib [Package]
==> Executing phase: 'install'
==> Successfully installed zlib
  Fetch: 0.01s.  Build: 1.31s.  Total: 1.32s.
[+] /opt/spack/opt/spack/linux-centos7-x86_64/gcc-7.3.0/zlib-1.2.11-zknfwanbwk6tnyaplsykwghx7cvnz4cr

libzip build
==> Installing libzip
==> Searching for binary cache of libzip
==> Warning: No Spack mirrors are currently configured
==> No binary for libzip found: installing from source
######################################################################## 100.0%
==> Staging archive: /opt/spack/var/spack/stage/libzip-1.2.0-wt3ksq2b5ymuikvsglomjneyxgc2c2lj/libzip-1.2.0.tar.gz
==> Created stage in /opt/spack/var/spack/stage/libzip-1.2.0-wt3ksq2b5ymuikvsglomjneyxgc2c2lj
==> No patches needed for libzip
==> Building libzip [AutotoolsPackage]
==> Executing phase: 'autoreconf'
==> Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 1:
    '/opt/spack/var/spack/stage/libzip-1.2.0-wt3ksq2b5ymuikvsglomjneyxgc2c2lj/libzip-1.2.0/configure' '--prefix=/opt/spack/opt/spack/linux-centos7-x86_64/gcc-7.3.0/libzip-1.2.0-wt3ksq2b5ymuikvsglomjneyxgc2c2lj'

1 error found in build log:
     36    checking for inttypes.h... yes
     37    checking for stdint.h... yes
     38    checking for unistd.h... yes
     39    checking whether byte ordering is bigendian... no
     40    checking for main in -lz... no
     41    checking new ZLIB version... no
  >> 42    configure: error: ZLIB version too old, please install at least v1.1.2

See build log for details:
  /opt/spack/var/spack/stage/libzip-1.2.0-wt3ksq2b5ymuikvsglomjneyxgc2c2lj/libzip-1.2.0/spack-build.out

Do I need to feed something else into the build command for libzip to specify the zlib location?

Gamblin, Todd

unread,
Apr 15, 2020, 3:09:28 AM4/15/20
to Eric Masshardt, Spack
I waas able to reproduce this in a centos7 container, but I don’t know why this happens.  It does not happen in 0.13 or 0.14, so there may be some lingering issue from 0.12.1 that was causing the system zlib to creep into this build.

Do you have plans to upgrade your environment to a later spack version?  If so I would just leave this alone.  If you really need a container to mimic 0.12, we could look at why this particular build is breaking.  The simplest thing is likely to edit the libzip package in the 0.12.1 install in your container and tell it specifically where Spack’s zlib (spec[‘zlib’]) is.

-Todd

--
You received this message because you are subscribed to the Google Groups "Spack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spack+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spack/4ca05e75-fc21-4404-860b-3593e1fe62d8%40googlegroups.com.

Eric Masshardt

unread,
Apr 16, 2020, 12:38:10 AM4/16/20
to Spack
Todd,

I would certainly like to upgrade, but I need to get a better understanding of the environment first (as I took it over after another admin left). I took a look at the "how does one upgrade spack" thread and it looks like it would be best to install the new version and rebuild any needed compilers/packages/modules?

Can you go into more detail about how/where I'd edit the libzip package or point me to appropriate spack documentation about it? I'm still a newb :)

I'll also build a 0.14.2 (since it was just announced!) instance in another container to check it out :)

Thanks for your help,

Eric
-Todd

To unsubscribe from this group and stop receiving emails from it, send an email to sp...@googlegroups.com.

Gamblin, Todd

unread,
Apr 16, 2020, 1:13:28 AM4/16/20
to Eric Masshardt, Spack
On Apr 15, 2020, at 9:38 PM, Eric Masshardt <emass...@gmail.com> wrote:

Todd,

I would certainly like to upgrade, but I need to get a better understanding of the environment first (as I took it over after another admin left). I took a look at the "how does one upgrade spack" thread and it looks like it would be best to install the new version and rebuild any needed compilers/packages/modules?

That’s generally what we recommend.

Can you go into more detail about how/where I'd edit the libzip package or point me to appropriate spack documentation about it? I'm still a newb :)

It looks like 0.12.1 is just missing a dependency for libzip.  I was able to get this working by running:

spack edit libzip

Which will open $EDITOR with libzip’s package.py file, and I made this change (based on what’s in latest):

[centos] spack-012: git diff
diff --git a/var/spack/repos/builtin/packages/libzip/package.py b/var/spack/repos/builtin/packages/libzip/package.py
index c40bc28..374c630 100644
--- a/var/spack/repos/builtin/packages/libzip/package.py
+++ b/var/spack/repos/builtin/packages/libzip/package.py
@@ -14,3 +14,5 @@ class Libzip(AutotoolsPackage):

 

     version('1.2.0', '5c3372ab3a7897295bfefb27f745cf69')
+
+    depends_on("zl...@1.1.2:")

So I just added that last depends_on line.  That’s it!

There is more on packaging here:

Or try the tutorial:

There is more on AutotoolsPackage (what libzip is) here:

I'll also build a 0.14.2 (since it was just announced!) instance in another container to check it out :)

If you want to, you can try our containers, which come with spack already in them:

docker run —rm -it spack/centos7

They’re built for particular releases and for latest (develop).

-Todd

To unsubscribe from this group and stop receiving emails from it, send an email to spack+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spack/926fa1aa-bc06-4c75-a102-536a602b4827%40googlegroups.com.

Eric Masshardt

unread,
Apr 16, 2020, 5:51:37 PM4/16/20
to Spack
Thanks for the quick fix :)

I'll check out your containers. I'm checking out 0.14.2 (built gcc 9.3.0 and some packages) and it looked like there was good reuse of previously installed packages (although they had all been obviously very recently installed). Is this yet using the new concretizer you discussed at SC19 or is that still coming later?

Eric

Gamblin, Todd

unread,
Apr 16, 2020, 5:54:52 PM4/16/20
to Eric Masshardt, Spack
That’s later — experimental in 0.15 and in prod by 0.16 is the plan.

To unsubscribe from this group and stop receiving emails from it, send an email to spack+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spack/b71acd1f-84eb-41e5-8b20-2cb7f57743a0%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages