Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Dec 2019 19:22:37 +1100
From:      Scott Aitken <freebsd-lists-5@thismonkey.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Cross-compiling with go for arm on amd64.  Possible?
Message-ID:  <20191208082237.GA80246@thismonkey.com>
In-Reply-To: <mailman.65.1575720001.36005.freebsd-questions@freebsd.org>
References:  <mailman.65.1575720001.36005.freebsd-questions@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> Scott Aitken <freebsd-lists-5@thismonkey.com> writes:
> 
> > Hi,
> >
> > So I wanted to install dns/dnscrypt-proxy2 on my Raspberry Pi running FreeBSD 
> > 12.0-RELEASE r341666 GENERIC arm.
> >
> > There's no package version, so I tried compiling. Unfortunately that didn't 
> > work as the Go dependency ran out of RAM compiling. And there's no package 
> > for Go...
> >
> > So I fired up a VM and installed ports-mgmt/poudriere. Set it all up and 
> > added dns/dnscrypt-proxy2 to my shopping list...
> >
> > Unfortunately it skipped lang/go:
> >
> > Code:
> > [00:01:14] [01] [00:00:00] Building lang/go | go-1.13.4,1
> > [00:01:16] [01] [00:00:02] Finished lang/go | go-1.13.4,1: Ignored: fails to 
> > build with qemu-user-static
> > [00:01:16] [01] [00:00:02] Skipping dns/dnscrypt-proxy2 | 
> > dnscrypt-proxy2-2.0.31_1: Dependent port lang/go | go-1.13.4,1 ignored
> >
> > Apparently Go 1.3 won't compile under the emulator (see PR 221297 for some 
> > background.
> >
> > Is it possible for go to cross-compile for arm on amd64?
> 
> I don't know about cross-compiling, but I have built go from source on a
> Raspberry Pi 2.  In my case I was running 12.1-RELEASE, and I built
> go-1.13.1,1 about 2 weeks ago.  My typescript file doesn't show any
> errors, and time showed a 28 minute build time and another 15 minutes to
> create a binary package.  That was after installing the go14 binary
> package.
> 
> -- 
> Carl Johnson		carlj@peak.org
>
Hi Carl,

I had no luck as I said.  I killed every daemon I could and simply saw the 
memory in top approach zero after about 3 minutes into the build, and then
the core dump.

Other than OS and compiler options (of which I'm using the default) I can't 
think of why you had success whereas I didn't.  

This is my dmesg - are you using the same platform?

FreeBSD 12.0-RELEASE r341666 GENERIC arm
FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
VT: init without driver.
CPU: ARM Cortex-A7 r0p5 (ECO: 0x00000000)
CPU Features:
  Multiprocessing, Thumb2, Security, Virtualization, Generic Timer, VMSAv7,
  PXN, LPAE, Coherent Walk
Optional instructions:
  SDIV/UDIV, UMULL, SMULL, SIMD(ext)
LoUU:2 LoC:3 LoUIS:2
Cache level 1:
 32KB/64B 4-way data cache WB Read-Alloc Write-Alloc
 32KB/32B 2-way instruction cache Read-Alloc
Cache level 2:
 512KB/64B 8-way unified cache WB Read-Alloc Write-Alloc
real memory  = 0 (0 MB)
avail memory = 957149184 (912 MB)
No PSCI/SMCCC call function found
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs

Thanks,
Scott



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191208082237.GA80246>