Building with Musl

Konstantin Tokarev annulen at yandex.ru
Tue Jul 26 17:48:20 AWST 2016



26.07.2016, 12:46, "Andrew Bainbridge" <andbain at microsoft.com>:
> Hi all
>
> Are there any instructions on how to build Dropbear with Musl (an alternative libc)? There's a brief mention of it on the Dropbear homepage, but nothing in INSTALL.
>
> I'm building on a Raspberry Pi 3, running Raspbian 8 (Jesse). I'm attempting to build a dbclient that will run on a slightly odd Qualcomm Snapdragon based embedded Linux device. Both the Pi and the Snapdragon use the ARMv7 instruction set, so this should be easy.
>
> Here's what I've tried...
>
> Got https://www.musl-libc.org/releases/musl-1.1.15.tar.gz.
>
> ./configure and then make install. All good.
>
> Got http://zlib.net/zlib-1.2.8.tar.xz.
>
> export PATH="$PATH:/usr/local/musl/bin"
>
> export CC=musl-gcc
>
> ./configure --static. make. All good.
>
> Got https://matt.ucc.asn.au/dropbear/releases/dropbear-2016.73.tar.bz2.
>
> export CFLAGS="-I ../zlib-1.2.8"
>
> export LDFLAGS="-L ../zlib-1.2.8"
>
> ./configure
>
> make PROGRAMS="dbclient" STATIC=1
>
> Not all good :-(
>
> Lots of stuff built. I've got libtommath.a and libtomcrypt.a. But make dies saying:
>
> musl-gcc -I ../zlib-1.2.8 -I./libtomcrypt/src/headers/ -I. -I.  -I../zlib-1.2.8 -DDROPBEAR_CLIENT   -c -o dbutil.o dbutil.c
>
> In file included from dbutil.c:64:0:
>
> includes.h:160:25: fatal error: linux/types.h: No such file or directory
>
> #include <linux/types.h>
>
>                          ^
>
> compilation terminated.
>
> <builtin>: recipe for target 'dbutil.o' failed
>
> make: *** [dbutil.o] Error 1
>
> I’m pretty sure a Musl build should even try to #include linux/types.h. Any ideas?

Kernel headers are not installed, or compiler does not pick them up.

>
> Thanks,
>
> Andy


-- 
Regards,
Konstantin


More information about the Dropbear mailing list