0

When I try to compile nettle-2.7.1, I get the following:

root@tcx2270-19:~/nettle-2.7.1# make make: Warning: Can't find aes-decrypt-internal.o.d': No such file or directory make: Fatal error in reader: Makefile, line 594: Read of include fileaes-decrypt-internal.o.d' failed

Has anyone seen this issue? Thanks.

user2719735
  • 97
  • 2
  • 10

2 Answers2

1

I also had the exact same problem. It has nothing to do with gmp. The ./configure script generates a broken Makefile. After doing some analyzation of the generated Makefile I figured out a solution.

On the very bottom of the generated Makefile search for the line that looks like the following:

DEP_FILES = $(SOURCES:.c=.$(OBJEXT).d) $(SOURCES:.c=.p$(OBJEXT).d) asm.d

You can fix the build by changing it to the following line:

DEP_FILES = $(SOURCES:.c=.c.$(OBJEXT).d) $(SOURCES:.c=.c.p$(OBJEXT).d) asm.d

Additionally, we have to fix the Makefiles in all sub-directories.

For ./tools/Makefile, on the very bottom, find the line that looks like:

include  $(SOURCES:.c=.$(OBJEXT).d)

and change it to

include  $(SOURCES:.c=.c.$(OBJEXT).d)

Furthermore, you need to add the following two build-targets:

../libnettle.a:
        $(MAKE) -C .. libnettle.a

../libhogweed.a:
        $(MAKE) -C .. libhogweed.a

For ./testsuite/Makefile, on the very bottom, find the line that looks like this:

DEP_FILES = $(SOURCES:.c=.$(OBJEXT).d) $(CXX_SOURCES:.cxx=.$(OBJEXT).d)

and change it to:

DEP_FILES = $(SOURCES:.c=.c.$(OBJEXT).d) $(CXX_SOURCES:.cxx=.cxx.$(OBJEXT).d)

Finally, in ./examples/Makefile, again on the very bottom, search for the line that looks like:

include  $(SOURCES:.c=.$(OBJEXT).d)

and change it to

include  $(SOURCES:.c=.c.$(OBJEXT).d)

Phew, at least for me, that makes the build work. Of course, this is an ugly solution but it gets the job done. A better solution would be to fix the configure-script but I did not have the time to do it yet. It is also worth noting that nettle 3.0 does not have this issue. Too bad gnutls does not work with that newer version.

Christian
  • 11
  • 2
0

UPDATE: I created a patch which does all the above fixes in the Makefile.in files. As a result, you don't have to fix them yourselfs. Optimally, just unpack the source, apply the patch and proceed the way you normally would by continuing with the ./configure.

Get it from here: http://pastebin.com/36M5LHK3

Christian
  • 11
  • 2