Bug 204118

Summary: dns/dnscrypt-proxy: doesn't work on FreeBSD/mips
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: freebsd, koobs, lidl, mips
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (freebsd)
Hardware: mips   
OS: Any   
Attachments:
Description Flags
truss /usr/local/sbin/dnscrypt-proxy
none
truss /usr/local/sbin/dnscrypt-proxy
none
poudriere log of dns/dnscrypt-proxy none

Description Piotr Kubaj freebsd_committer freebsd_triage 2015-10-29 10:01:03 UTC
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.
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2015-10-29 10:03:33 UTC
Created attachment 162559 [details]
truss /usr/local/sbin/dnscrypt-proxy
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2015-10-29 10:05:23 UTC
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.
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2015-10-29 17:52:39 UTC
Created attachment 162575 [details]
poudriere log of dns/dnscrypt-proxy
Comment 4 Piotr Kubaj freebsd_committer freebsd_triage 2015-10-29 17:52:59 UTC
(In reply to Kubilay Kocak from comment #2)
I've attached the full log.
Comment 5 Kurt Lidl freebsd_committer freebsd_triage 2016-03-18 13:27:16 UTC
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
Comment 6 Piotr Kubaj freebsd_committer freebsd_triage 2016-08-11 17:16:47 UTC
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.
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2016-08-12 17:06:06 UTC
Correct resolution