1

I got errors as below when tried to make gnupg 2.0.19

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compress.o: In function `init_uncompress':
/home/steve/Desktop/gnupg-2.0.19/g10/compress.c:147: undefined reference to `inflateInit_'

compress.o: In function `do_uncompress':
/home/steve/Desktop/gnupg-2.0.19/g10/compress.c:196: undefined reference to `inflate'

compress.o: In function `init_compress':
/home/steve/Desktop/gnupg-2.0.19/g10/compress.c:82: undefined reference to `deflateInit_'

compress.o: In function `init_uncompress':
/home/steve/Desktop/gnupg-2.0.19/g10/compress.c:147: undefined reference to `inflateInit2_'

compress.o: In function `init_compress':
/home/steve/Desktop/gnupg-2.0.19/g10/compress.c:82: undefined reference to `deflateInit2_'

compress.o: In function `compress_filter':

/home/steve/Desktop/gnupg-2.0.19/g10/compress.c:264: undefined reference to `inflateEnd'
/home/steve/Desktop/gnupg-2.0.19/g10/compress.c:273: undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
make[2]: *** [gpg2] Error 1 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It looks like ld cannot find object file which owns the reference above. My question is: How to determine which file I was missing? How to resolve this issue?

Many thanks in advance!

2
  • 2
    Hmm, one would imagine that ./configure would have told you about missing files? Or, how did you get your Makefile generated? By the way, any particular reason you don't just install the gnupg2 package?
    – andol
    Oct 18, 2012 at 2:08
  • Hi andol, so Makefile should be where i could have a try,right. I forgot where did i got this package, but the readme file told that after Make Install there will be a gnupg2 then. Oct 18, 2012 at 5:53

1 Answer 1

1

The error messages seem to refer to the fact that you are missing the zlib libraries, as has been noted part of the way down the gnupg mailing list; hence the errors regarding 'inflate' and 'deflate'. So please run,

sudo apt-get install zlib1g zlib1g-dev

However, you must also install the build dependencies of gnupg2 such as libgpg-error, libgcrypt, libksba, and libassuan (>=2.0) with:

sudo apt-get build-dep gnupg2 
sudo apt-get install libgpg-error0 libgpg-error-dev libgcrypt11 libgcrypt11-dev

(You can of course download all the libraries and compile them yourself if you wish from the gnupg site instead of using the repository versions.)

So when compiling this program there is a bit to prepare beforehand, although because you actually began the build process it would seem that the main dependencies had been satisfied for ./configure, even though the zlib libraries were missing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .