zerotier / zerotier/ZeroTierOne

build on debian ppc64

Open
#2,144 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
17.1k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

Trying to build zerotier 1.12.2 on a PowerMac G5 running debian trixie/sid.
from debian-ports, (ppc64 version, bigendian, 64bit)

system@deb-ppc-g5:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux trixie/sid
Release: n/a
Codename: trixie

system@deb-ppc-g5:~$ cat /proc/cpuinfo
processor : 0
cpu : PPC970FX, altivec supported
clock : 1899.999000MHz
revision : 3.0 (pvr 003c 0300)

timebase : 33333333
platform : PowerMac
model : PowerMac12,1
machine : PowerMac12,1
motherboard : PowerMac12,1 MacRISC4 Power Macintosh
detected as : 337 (iMac G5 (iSight))
pmac flags : 00000000
L2 cache : 512K unified
pmac-generation : NewWorld

The problem arises when make-linux.mk runs gcc -dumpmachine and gets:
powerpc64-linux-gnu
Several flavours of ppc are tested but not powerpc64.
powerpc is bigendian but I guess it is 32bit.
I added some lines make-linux.mk changing powerpc with powerpc64.
Here is the diff:

--- make-linux.mk.ori 2023-10-05 13:12:35.849134323 -0300
+++ make-linux.mk 2023-10-05 13:13:06.277771703 -0300
@@ -143,6 +143,11 @@
override DEFS+=-DZT_NO_TYPE_PUNNING
override DEFS+=-DZT_NO_CAPABILITIES
endif
+ifeq ($(CC_MACH),powerpc64)

  • ZT_ARCHITECTURE=8
  • override DEFS+=-DZT_NO_TYPE_PUNNING
  • override DEFS+=-DZT_NO_CAPABILITIES
    +endif
    ifeq ($(CC_MACH),ppc64le)
    ZT_ARCHITECTURE=8
    endif

After this change the build was successful and it is running fine.

I'm also attaching the output of zerotier-selftest.

Maybe someone also tries to build ZeroTierOne on an old Mac running debian

ztest.txt
diff.txt

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 in make-linux.mk and compare the existing architecture checks with the attached diff.txt, focusing on the powerpc64 result from gcc -dumpmachine. Reproduce the build on Debian ppc64 if available, then confirm that ZeroTier builds successfully and that zerotier-selftest passes as reported in ztest.txt.

Written by the indexing model from the issue text.

Assessment

Tech stack
debian, linux
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.