Discussion:
[Unbound-users] [1.5.0] Compile error on Debian Lenny
Saturas
2014-11-29 20:19:15 UTC
Permalink
Hello,

i´m trying to compile Unbound 1.5.0 for my old Debian Lenny box.
1.4.22 runs fine so far. OpenSSL is self-compiled - "OpenSSL 1.0.1j 15
Oct 2014". Kernel is stock - "Linux debian 2.6.26-2-686 #1 SMP Sun Mar
4 22:19:19 UTC 2012 i686 GNU/Linux" and GCC is 4.3.2.

$ export CFLAGS="-march=pentium3 -msse -O2"
$ ./configure --prefix=/opt/unbound --with-ssl=/opt/ssl --with-pthreads
$ make
[...]
./libtool --tag=CC --mode=compile gcc -I. -I/opt/ssl/include
-march=pentium3 -msse -O2 -pthread -o getentropy_linux.lo -c
compat/getentropy_linux.c
libtool: compile: gcc -I. -I/opt/ssl/include -march=pentium3 -msse
-O2 -pthread -c compat/getentropy_linux.c -fPIC -DPIC -o
.libs/getentropy_linux.o
In file included from compat/getentropy_linux.c:51:
/usr/include/linux/random.h:38: error: expected
specifier-qualifier-list before '__u32'
make: *** [getentropy_linux.lo] Error 1

The lines in random.h look like this:

struct rand_pool_info {
int entropy_count;
int buf_size;
__u32 buf[0];
};

Is this something unbound should patch or related to the kernel? May
be it´s just a little issue. But as a non-C-programmer I have no clue :)

PS: I just checked 1.5.1-rc1, too. No effect.
--
Regards
Saturas

-------------------------------------------------

VFEmail.net - http://www.vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!
Jeroen Massar
2014-11-29 20:35:58 UTC
Permalink
Post by Saturas
Hello,
i´m trying to compile Unbound 1.5.0 for my old Debian Lenny box.
1.4.22 runs fine so far. OpenSSL is self-compiled - "OpenSSL 1.0.1j 15
Oct 2014". Kernel is stock - "Linux debian 2.6.26-2-686 #1 SMP Sun Mar
4 22:19:19 UTC 2012 i686 GNU/Linux" and GCC is 4.3.2.
$ export CFLAGS="-march=pentium3 -msse -O2"
$ ./configure --prefix=/opt/unbound --with-ssl=/opt/ssl --with-pthreads
Debian does not store SSL in /opt/ hence why are you pointing there?

Also, why not simply backport the Debian package? That is, get the new
package from the repo (add source repo, apt-get source unbound,
dpkg-buildpackage -b...) ?
Post by Saturas
$ make
[...]
./libtool --tag=CC --mode=compile gcc -I. -I/opt/ssl/include
-march=pentium3 -msse -O2 -pthread -o getentropy_linux.lo -c
compat/getentropy_linux.c
libtool: compile: gcc -I. -I/opt/ssl/include -march=pentium3 -msse
-O2 -pthread -c compat/getentropy_linux.c -fPIC -DPIC -o
.libs/getentropy_linux.o
/usr/include/linux/random.h:38: error: expected
specifier-qualifier-list before '__u32'
Seems you are missing a define somewhere. Likely a:
#define __u32 uint32_t

would likely save the day. Though that is something that should be
defined by the configure. Most very likely you simply do not have the
ssl libs there.

Greets,
Jeroen
Wouter Wijngaards
2014-11-30 01:58:57 UTC
Permalink
Hi Jeroen, Saturas,

Does this patch alleviate the issue?

Index: compat/getentropy_linux.c
===================================================================
- --- compat/getentropy_linux.c (revision 3284)
+++ compat/getentropy_linux.c (working copy)
@@ -48,6 +48,7 @@
#include <time.h>
#include <openssl/sha.h>

+#include <linux/types.h>
#include <linux/random.h>
#include <linux/sysctl.h>
#ifdef HAVE_GETAUXVAL


Best regards,
Wouter
Post by Jeroen Massar
Post by Saturas
Hello,
i´m trying to compile Unbound 1.5.0 for my old Debian Lenny box.
1.4.22 runs fine so far. OpenSSL is self-compiled - "OpenSSL
1.0.1j 15 Oct 2014". Kernel is stock - "Linux debian
2.6.26-2-686 #1 SMP Sun Mar 4 22:19:19 UTC 2012 i686 GNU/Linux"
and GCC is 4.3.2.
$ export CFLAGS="-march=pentium3 -msse -O2" $ ./configure
--prefix=/opt/unbound --with-ssl=/opt/ssl --with-pthreads
Debian does not store SSL in /opt/ hence why are you pointing
there?
Also, why not simply backport the Debian package? That is, get the
new package from the repo (add source repo, apt-get source unbound,
dpkg-buildpackage -b...) ?
Post by Saturas
$ make [...] ./libtool --tag=CC --mode=compile gcc -I.
-I/opt/ssl/include -march=pentium3 -msse -O2 -pthread -o
compile: gcc -I. -I/opt/ssl/include -march=pentium3 -msse -O2
-pthread -c compat/getentropy_linux.c -fPIC -DPIC -o
.libs/getentropy_linux.o In file included from
error: expected specifier-qualifier-list before '__u32'
Seems you are missing a define somewhere. Likely a: #define __u32
uint32_t
would likely save the day. Though that is something that should be
defined by the configure. Most very likely you simply do not have
the ssl libs there.
Greets, Jeroen
_______________________________________________ Unbound-users
http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users
Saturas
2014-12-01 11:40:32 UTC
Permalink
Hello,
Post by Wouter Wijngaards
Does this patch alleviate the issue?
Index: compat/getentropy_linux.c
===================================================================
--- compat/getentropy_linux.c (revision 3284)
+++ compat/getentropy_linux.c (working copy)
@@ -48,6 +48,7 @@
#include <time.h>
#include <openssl/sha.h>
+#include <linux/types.h>
#include <linux/random.h>
#include <linux/sysctl.h>
#ifdef HAVE_GETAUXVAL
Yes.

Another guy recommended by mail to add this line in kernel headers
directly. This works, too. As expected.

--- /usr/include/linux/random.h.bak 2014-09-16 22:23:35.000000000 +0200
+++ /usr/include/linux/random.h 2014-11-18 17:49:50.000000000 +0100
@@ -8,6 +8,7 @@
#define _LINUX_RANDOM_H

+#include <linux/types.h>
#include <linux/ioctl.h>

/* ioctl()'s for the random number generator */


Thank you very much. Unbound works again.


Regards
Saturas

-------------------------------------------------

VFEmail.net - http://www.vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!

Loading...