[RC] Unable to build DNSCrypt

Thank you for your hard work OSMC team, and a great release.

I’m having a problem building DNSCrypt on the new RC. I’m not sure if it’s an OSMC or DNSCrypt problem but perhaps somebody have an idea. I had it working on Alpha 4.

./configure gives me the following:

osmc@osmc:~$ tar -xf dnscrypt-proxy-1.4.3.tar.gz
osmc@osmc:~$ cd dnscrypt-proxy-1.4.3
osmc@osmc:~/dnscrypt-proxy-1.4.3$ ./configure
checking build system type… armv7l-unknown-linux-gnueabihf
checking host system type… armv7l-unknown-linux-gnueabihf

checking build system type… armv7l-unknown-linux-gnueabihf
checking host system type… armv7l-unknown-linux-gnueabihf
checking for gcc… gcc -std=gnu99
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… configure: error: in /home/osmc/dnscrypt-proxy-1.4.3/src/libevent-modified': configure: error: cannot run C compiled programs. If you meant to cross compile, use –host’.
See `config.log’ for more details
configure: error: ./configure failed for src/libevent-modified**

Prior to this I prepared the system as follows:
sudo apt-get update
sudo apt-get install aptitude
sudo aptitude install gcc libc6-dev wget make dnsmasq dnsutils
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.2.tar.gz
wget http://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-proxy-1.4.3.tar.gz

I succesfully extracted, built and installed libsodium. Then when running configure for dnscrypt it returns above error.

I’m unable to upload/attach config.log to the forum, but I can email it if interested. It ends thus:

install_sh=’${SHELL} /home/osmc/dnscrypt-proxy-1.4.3/libltdl/config/install-sh’
ltdl_LIBOBJS=’ lt__strl.o’
ltdl_LTLIBOBJS=’ lt__strl.lo’
subdirs=’ src/libevent-modified libltdl’

configure: exit 1


sudo apt-get install build-essential

Sounds like you are still missing some build tools.

Thank you DBMandrake, I was thinking along those lines. Tried your suggestion but same result.
I don’t recall having done anything differently on Alpha 4, was thinking if it had anything to do with change of default target arm architecture on the Pi 2.

Please upload the full config.log to paste.osmc.io

Crude way of checking your compiler works:

echo "void main() {return;}" | sudo gcc -o /dev/null -xc - && echo -e "Compiler works"


So, I fixed it. If all else fails; ldconfig :wink:

Thank you!

@hyperchaotic can you explain how you fixed it?

Sure, it said it had problems running a program, not creating it, so I figured perhaps it couldn’t load a library. Only library not already in the platform that I had built was libsodium which I had just installed. So I ran “make” and “sudo make install” again for libsodium, they said “nothing to do”, so I ran “sudo ldconfig” to validate lib cache and now dnscrypt could build.

There mustv’e been an error message in the config log I missed, there are several config.log files in different directories.

I now have a OSMC box with dnsmasq serving DHCP/DNS with DNSCrypt fetching the records on the back end. Playing music on it right now via AirPlay.
I only wish it was a Vero, but Pi will do :slight_smile: