From owner-freebsd-arm@freebsd.org Fri Dec 13 20:49:43 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 73CE31D67E4 for ; Fri, 13 Dec 2019 20:49:43 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from gromit.dlib.vt.edu (gromit.dlib.vt.edu [128.173.49.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "gromit.dlib.vt.edu", Issuer "Chumby Certificate Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 47ZN864jckz4V8K for ; Fri, 13 Dec 2019 20:49:42 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from mather.gromit23.net (c-98-244-101-97.hsd1.va.comcast.net [98.244.101.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gromit.dlib.vt.edu (Postfix) with ESMTPSA id A0E125B6; Fri, 13 Dec 2019 15:49:36 -0500 (EST) Content-Type: text/plain; charset=us-ascii; delsp=yes; format=flowed Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Building rclone on aarch64 From: Paul Mather In-Reply-To: Date: Fri, 13 Dec 2019 15:49:40 -0500 Cc: freebsd-arm Content-Transfer-Encoding: 7bit Message-Id: References: To: Brian Bostwick X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 47ZN864jckz4V8K X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=vt.edu (policy=none); spf=none (mx1.freebsd.org: domain of paul@gromit.dlib.vt.edu has no SPF policy when checking 128.173.49.70) smtp.mailfrom=paul@gromit.dlib.vt.edu X-Spamd-Result: default: False [-2.08 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[vt.edu : No valid SPF, No valid DKIM,none]; RECEIVED_SPAMHAUS_PBL(0.00)[97.101.244.98.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; IP_SCORE(-0.58)[ip: (-1.45), ipnet: 128.173.0.0/16(-0.72), asn: 1312(-0.67), country: US(-0.05)]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:1312, ipnet:128.173.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2019 20:49:43 -0000 On Dec 13, 2019, at 3:16 PM, Brian Bostwick wrote: > Hi, I am trying to compile rclone on a RPI 3 B+ via ports because a bin > does not exist on this platform, which looks normal as of now via rclone's > website as they too don't provide one. > > My error: > > Killed > *** Error code 137 > > Stop. > make[1]: stopped in /usr/ports/lang/go-devel > *** Error code 1 > > Stop. > make: stopped in /usr/ports/net/rclone > root@generic:/usr/ports/net/rclone # go build cmd/compile/internal/ssa: > /usr/ports/lang/go-devel/work/go-498eaee461/pkg/tool/freebsd_arm64/compile: > signal: killed > > Pretty generic, not sure where I can find more detailed information on why > it failed. The release version of Go does not support "arm64" as a supported architecture for GOOS=freebsd. At least that is the case according to https://golang.org/doc/install/source#environment Contemporary Go (1.5+) supports cross-compilation for other supported OS and ARCHes by setting the GOOS and GOARCH environment variables. Here's what happens when I try to build for FreeBSD/arm64 on macOS: ===== mather ~% env GOOS=freebsd GOARCH=arm64 go build -v test.go cmd/go: unsupported GOOS/GOARCH pair freebsd/arm64 mather ~% go version go version go1.13.4 darwin/amd64 ===== I have had luck cross-compiling for FreeBSD/arm. For example, I built restic from source under macOS (https://restic.readthedocs.io/en/latest/020_installation.html#from-source) and was able to copy and run the static binary that resulted on my FreeBSD/arm 12-STABLE system just fine. Looking at https://golang.org/doc/install/source#environment it appears aarch64 is currently only supported on GOOS=android, darwin, linux, and openbsd. Maybe the lang/go-devel port actually does support freebsd/arm64, but given that the port failed to build for you, I'm doubtful. Having said that, perhaps resource limits caused the port to fail to build on your Raspberry Pi 3 B+? Lack of RAM has been a problem in building ports natively on Raspberry Pi. > Besides this, is it possible to run 32 bit arm bins on aarch64? I really > would like to use this program for syncing some things to the cloud. I > tried myself, but got an ELF error. That would be good to know. I'm in the same boat as you, in that I would like to run Go binaries on my FreeBSD/arm64 12-STABLE Raspberry Pi 3 B+ system. It would be nice to know when Go is supported (well) on that platform... Cheers, Paul.