#773370 src:nettle: please ship nettle-benchmark as a binary (not buildable without source)

#773370#5
Date:
2014-12-17 15:53:07 UTC
From:
To:
nettle-dev currently ships
/usr/share/doc/nettle-dev/examples/nettle-benchmark.c.gz

but that file can't be built without a copy of nettle-internal.h,
which isn't shipped anywhere other than the source package.

Even when i try to pull a copy of nettle-internal.h out of the source
package, and to build nettle-benchmark.c simply, it fails, presumably
because it needs some of the pre-existing build system (e.g. the
source has examples/Makefile.in):

0 dkg@alice:~/test$ gcc -o nettle-benchmark -lnettle -I /usr/include/nettle nettle-benchmark.c
nettle-benchmark.c:105:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PRINTF_STYLE’
 static void NORETURN PRINTF_STYLE(1,2)
                      ^
nettle-benchmark.c:144:25: error: expected ‘;’, ‘,’ or ‘)’ before ‘UNUSED’
 bench_nothing(void *arg UNUSED)
                         ^
nettle-benchmark.c: In function ‘time_overhead’:
nettle-benchmark.c:295:28: error: ‘bench_nothing’ undeclared (first use in this function)
   overhead = time_function(bench_nothing, NULL);
                            ^
nettle-benchmark.c:295:28: note: each undeclared identifier is reported only once for each function it appears in
1 dkg@alice:~/test$


It would be great to have nettle-benchmark available as a binary for
people to run directly.  I can imagine it would go in nettle-bin, but
it could also be placed in nettle-dev.

Regards,