keybase / keybase/client

Enabling building for other architectures

Open
#8,889 12 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
9.2k
Forks
1.3k
Avg merge
12h 58m
Merged PRs (30d)
56

Description

Hey keybase devs, and any others who are interested.

I would like to start working towards enabling armhf and arm64 builds of the keybase client.

I'm not entirely sure of all the steps that will be required but so far the only thing that seems to be absolutely required will be to add some bits to

client/packaging/linux/build_binaries.sh

but in doing so, will need to modify it just a bit.

Currently it has

if [ -z "${KEYBASE_SKIP_64_BIT:-}" ] ; then
  export GOARCH=amd64
  export debian_arch=amd64
  export electron_arch=x64
  build_one_architecture
else
  echo SKIPPING 64-bit build
fi

if [ -z "${KEYBASE_SKIP_32_BIT:-}" ] ; then
  export GOARCH=386
  export debian_arch=i386
  export electron_arch=ia32
  build_one_architecture
else
  echo SKIPPING 32-bit build
fi

The KEYBASE_SKIP_*_BIT would probably need to be renamed - and I was thinking of doing it something like

if [ -z "${KEYBASE_SKIP_AMD64:-}" ] ; then
  export GOARCH=amd64
  export debian_arch=amd64
  export electron_arch=x64
  build_one_architecture
else
  echo SKIPPING amd64 build
fi

if [ -z "${KEYBASE_SKIP_X86:-}" ] ; then
  export GOARCH=386
  export debian_arch=i386
  export electron_arch=ia32
  build_one_architecture
else
  echo SKIPPING x86 build
fi
if [ -z "${KEYBASE_SKIP_ARMHF:-}" ] ; then
  export GOARCH=arm
  # Specify GOARM to enable hardfloat support
  # Not strictly needed since GOARCH=arm without GOARM defaults to enabling hardfloat 
  export GOARM=7
  export debian_arch=armhf
  export electron_arch=armv7l
  build_one_architecture
else
  echo SKIPPING armhf build
fi

if [ -z "${KEYBASE_SKIP_ARMEL:-}" ] ; then
  export GOARCH=arm
  # Specify GOARM to disable hardfloat support
  export GOARM=5
  export debian_arch=armel
  export electron_arch=arm
  build_one_architecture
else
  echo SKIPPING armel build
fi

if [ -z "${KEYBASE_SKIP_ARM64:-}" ] ; then
  export GOARCH=arm64
  export debian_arch=arm64
  export electron_arch=arm64
  build_one_architecture
else
  echo SKIPPING arm64 build
fi

Does that seem reasonable?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with client/packaging/linux/build_binaries.sh and trace how GOARCH, debian_arch, electron_arch, and the KEYBASE_SKIP_*_BIT variables are used. Check the existing 64-bit and 32-bit paths before determining the required architecture mappings. Done means the packaging script can build the requested armhf and arm64 targets without breaking the existing architectures.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, go
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.