spack: cryptsetup: UUID library not found

New cryptsetup package was merged into develop just yesterday (#12762).

I was quite sure it was working when merged. I tested a couple hours before, by rebasing my develop fork and merging. And it worked! But today, working from develop HEAD (currently at 3f06d5c12), it looks broken:

$ spack install cryptsetup
[snip]
1 error found in build log:
     138    checking for linux/keyctl.h... yes
     139    checking whether __NR_add_key is declared... yes
     140    checking whether __NR_keyctl is declared... yes
     141    checking whether __NR_request_key is declared... yes
     142    checking for key_serial_t... no
     143    checking for uuid_clear in -luuid... no
  >> 144    configure: error: You need the uuid library.

I thought I was going mad, but by trial and error, I found that if I do a git revert b95b4bb9e:

$ spack install cryptsetup
[snip]
==> Successfully installed cryptsetup

b95b4bb9e refers to #12794 – “add compilation option to sqlite” and it merged just 10 minutes before #12762

I don’t currently understand how #12794 could be breaking cryptsetup. It seems impossible, since it only added a variant that is off by default.

@Sinan81 @hartzell

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (20 by maintainers)

Commits related to this issue

Most upvoted comments

This fixes it for me on a CentOS 7 system. I couldn’t find any clean way to get the util-linux package’s copy of libuuid to include the gettext/libintl dependency, which would have let us drop the additional depends_on.

Ah ha-ish. The test for uuid_clear is linking against a libuuid.so that’s included in the util-linux package, not the one from the uuid package.

configure:13894: checking for uuid_clear in -luuid
configure:13919: /home/ghartzell/owen/spack/lib/spack/env/gcc/gcc -o conftest -g -O2   conftest.c -luuid   >&5
/home/ghartzell/owen/spack/opt/spack/linux-centos7-x86_64/gcc-8.2.0/util-linux-2.29.2-daxzq7g4g5xgqc75rsbcgijfjiafu4al/lib/libuuid.so: undefined reference to `libintl_gettext'
collect2: error: ld returned 1 exit status

At a guess, the times that it works it’s picking up the libuuid package and having happy linkage.