Created attachment 197566 [details] patch mips64, powerpc64 and sparc64 need newer compiler to build this port, USES=compiler:c11 fixes that. Tested on amd64 and powerpc64. Hardware sponsored by IntegriCloud.
adding compiler:c++11* does not fix build on MIPS/MIPS64, as it requires GCC(not available on mips)
(In reply to Nathan from comment #1) Tor code is c11. IMO, USES=compiler:c11 should work. If it doesn't work on MIPS, this looks like a bug (wrong compiler is triggered by this flag), and a bug against Mk/Uses/compiler.mk should be created.
(In reply to Yuri Victorovich from comment #2) Yea adding compiler:c* tends to trigger gcc requirement
(In reply to Nathan from comment #3) If you have observed that USES=compiler:c11 introduces the compiler that isn't C11-compatible, you should create a bug report for this.
I tried to add USE_CSTD=c99, USE_CSTD=c11, USE_CSTD=c17, USE_CSTD=gnu89 - compilation breaks with all of them. I don't quite understand how can this be possible: compiler by default has to match one of these.
(In reply to Yuri Victorovich from comment #5) Which is probably why gcc gets pulled when using compiler:c* as using the USE_C*STD= doesn't work
Created attachment 197584 [details] Patch Try this patch; Builds on mips with it. If it doesn't build on powerpc, can do another way to satisfy both
(In reply to Nathan from comment #7) You only added USES=autoreconf? Why does this change things?
(In reply to Yuri Victorovich from comment #8) Seems autoreconf regens the configure file. Before I added that, it wouldn't build on mips. Adding that caused configure to be rebuilt and then it compiled
(In reply to Nathan from comment #9) This also is because of some bug in Tor: with and without autoreconf should build the same.
(In reply to Yuri Victorovich from comment #10) No idea. but it worked for me is all I can say.
They might use an outdated system to generate the configure script.
https://trac.torproject.org/projects/tor/ticket/27901
A commit references this bug: Author: yuri Date: Sun Sep 30 01:55:04 UTC 2018 New revision: 480932 URL: https://svnweb.freebsd.org/changeset/ports/480932 Log: security/tor: Fix build with mips64, powerpc64 and sparc64 Port changes: * Add USES=compiler:c11 * Add USE_CSTD=gnu99 Situation with MIPS isn't clear, Nathan <ndowens@yahoo.com> says that it works only after adding USES=autoreconf. The Tor Project should resolve this discrepancy that autoreconf alters the outcome: https://trac.torproject.org/projects/tor/ticket/27901 PR: 231779 Submitted by: Piotr Kubaj <pkubaj@anongoth.pl> (initial version) Changes: head/security/tor/Makefile
A commit references this bug: Author: yuri Date: Sun Sep 30 01:56:16 UTC 2018 New revision: 480933 URL: https://svnweb.freebsd.org/changeset/ports/480933 Log: security/tor-devel: Fix build with mips64, powerpc64 and sparc64 Port changes: * Add USES=compiler:c11 * Add USE_CSTD=gnu99 PR: 231779 Submitted by: Piotr Kubaj <pkubaj@anongoth.pl> (initial version) Changes: head/security/tor-devel/Makefile
Committed, thanks.