[dm-crypt] static libraries

Milan Broz gmazyland at gmail.com
Sun Jan 6 11:21:49 CET 2013


On 01/05/2013 11:15 PM, .. ink .. wrote:
> 
>  
> 
>     Anyway, if you find some situation when configure script doesn't detect
>     some missing library, let me know (with proper info mentioned above).
> 
> 
> i am using version 0.27.1 of pkg-config
> 
> http://pastebin.com/ASBk1X6K

That's exactly error I need to see that something is wrong :)

./configure: line 16992: --static: command not found

(pkgconfig was not properly initialized in autoconf)


> The development package of libgrypt does not ship with libgcrypt.a in
> the distribution i am using and this necessitated me to build another
> version of libgrcypt to have a static library and i installed it in
> "/home/local" because thats where i install personal packages.

Gcrypt supports static libraries but not all distros use them.

The fun is here it uses own libgcrypt-config script which does not
have --static switch to properly detect libraries needed for 
static compilation.

IOW see
  libgcrypt-config --libs

(In fedora for example it reports -lgpg-error.)

But cryptsetup autoconf tries to handle that but I do not
want workaround for every broken gcrypt install...

As you can see here, it tries gpg-error library

LIBS="$saved_LIBS $LIBGCRYPT_LIBS -static"
AC_CHECK_LIB(gcrypt, gcry_check_version,,
             AC_MSG_ERROR([Cannot find static gcrypt library.]),
             [-lgpg-error])

So maybe the error message just should mention gpg-error as well.

Milan


More information about the dm-crypt mailing list