I try to run dnscrypt-proxy on a TP-LINK router with FreeBSD. I know that dnscrypt-proxy runs on mips (I've checked on OpenWRT) and it also runs on FreeBSD. But running it on FreeBSD/mips gives only errors. Running service dnscrypt-proxy start throws: root@TL-WR1043ND:~ # service dnscrypt-proxy start Starting dnscrypt_proxy. Cannot execute shared object /usr/local/sbin/dnscrypt-proxy: ELF: not found /usr/local/sbin/dnscrypt-proxy: IP4�l: not found /usr/local/sbin/dnscrypt-proxy: 4: not found /usr/local/sbin/dnscrypt-proxy: 7: Syntax error: word unexpected (expecting ")") /usr/local/etc/rc.d/dnscrypt-proxy: WARNING: failed to start dnscrypt_proxy root@TL-WR1043ND:~ # uname -a FreeBSD TL-WR1043ND 11.0-CURRENT FreeBSD 11.0-CURRENT #8 r290023M: Mon Oct 26 22:33:05 CET 2015 pkubaj@DESKTOP1:/home/pkubaj/obj/mips_ap/mips.mips/home/pkubaj/srcmips/sys/TP-WN1043ND_64_RAM mips Please see the attachment with truss output.
Created attachment 162559 [details] truss /usr/local/sbin/dnscrypt-proxy
A full build log (including configure/build) as an attachment might also be handy here. I've pinged the author on twitter about it in case he can shed some light.
Created attachment 162575 [details] poudriere log of dns/dnscrypt-proxy
(In reply to Kubilay Kocak from comment #2) I've attached the full log.
It would be interesting to compile the dnscrypt-proxy without the -fPIE argument to the compiler. There were versions of 'ld' in the past that mangled the resulting binary when the objects were compiled with -fPIE (which, from the poudriere log, it looks like it was compiled that way). https://sourceware.org/bugzilla/show_bug.cgi?id=10858
security/libsodium now requires C11-capable compiler, which FreeBSD/mips doesn't have in base and I can't compile any of lang/{gcc,clang}* ports in Poudriere mips jail. Closing this bug for now, at least until we can get a modern compiler running on mips.
Correct resolution