Skip to content

Error compiling Python (libressl): error: 'KERN_ARND' undeclared #149

Open
@hfingler

Description

@hfingler

I'm running into the same issues as #109

I compiled rumprun (CC=cc ./build-rr.sh xen), exported RUMPRUN_TOOLCHAIN_TUPLE=x86_64-rumprun-netbsd (output below), cloned this repo and was following the python README. When I run make I get the following error:

 $make
make -C ../libressl
make[1]: Entering directory '/home/hfingler/rumprun-packages/libressl'
make -C build
make[2]: Entering directory '/home/hfingler/rumprun-packages/libressl/build'
Making all in crypto
make[3]: Entering directory '/home/hfingler/rumprun-packages/libressl/build/crypto'
  CC       compat/getentropy_netbsd.lo
compat/getentropy_netbsd.c: In function 'getentropy_sysctl':
compat/getentropy_netbsd.c:39:11: error: 'KERN_ARND' undeclared (first use in this function)
  mib[1] = KERN_ARND;
           ^~~~~~~~~
compat/getentropy_netbsd.c:39:11: note: each undeclared identifier is reported only once for each function it appears in
Makefile:3615: recipe for target 'compat/getentropy_netbsd.lo' failed
make[3]: *** [compat/getentropy_netbsd.lo] Error 1
make[3]: Leaving directory '/home/hfingler/rumprun-packages/libressl/build/crypto'
Makefile:452: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/hfingler/rumprun-packages/libressl/build'
Makefile:9: recipe for target 'build/libressl' failed
make[1]: *** [build/libressl] Error 2
make[1]: Leaving directory '/home/hfingler/rumprun-packages/libressl'
../Makefile.deps:3: recipe for target '/home/hfingler/rumprun-packages/pkgs/lib/libssl.a' failed
make: *** [/home/hfingler/rumprun-packages/pkgs/lib/libssl.a] Error 2

Here's the output for the build:

>>
>> Finished ./build-rr.sh for xen
>>
>> For Rumprun developers (if you're not sure, you don't need it):
. "/home/hfingler/rumprun/./obj-amd64-xen/config"
>>
>> toolchain tuple: x86_64-rumprun-netbsd
>> cc wrapper: x86_64-rumprun-netbsd-gcc
>> installed to "/home/hfingler/rumprun/./rumprun"
>>
>> Set tooldir to front of $PATH (bourne-style shells)
. "/home/hfingler/rumprun/./obj-amd64-xen/config-PATH.sh"
>>
>> ./build-rr.sh ran successfully

Following one of the comments on the previous issues, I ran:

x86_64-rumprun-netbsd-gcc -print-sysroot, which gave me /home/hfingler/rumprun/./rumprun/rumprun-x86_64. I then opened /home/hfingler/rumprun/./rumprun/rumprun-x86_64/include/sys/sysctl.h and searched for KERN_ARND and it is defined there.

The offending file is including <sys/sysctl.h>.

Someone in that issue solved it by changing the libressl version, but that didn't work for me. I changed the version in
UPSTREAM=http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.4.2.tar.gz
to 2.8.2 and 2.6.0; neither worked.

Can anyone help me fix this?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions