[stork-users] Issues faced when building for Armv7l
Slawek Figiel
slawek at isc.org
Fri Nov 29 16:57:37 UTC 2024
Hello Brian,
Thank you so much for your feedback and this step-by-step guide.
I'm glad to hear that you were able to solve your problem. I'm sorry for
all these missing parts in the documentation. Your comments allow us to
improve it.
I opened https://gitlab.isc.org/isc-projects/stork/-/issues/1635 to
discuss your proposals with our team.
I cannot guarantee that we will introduce support for the ARM 32-bit
architecture. Our CI and build systems currently lack the capabilities
to test the source code, binaries, and packages on this architecture,
which is not officially supported. Stork uses the architecture-dependent
integer data type in many places. It causes you to observe some issues
for big Kea or BIND 9 configurations (for example, due to integer
overflow). Stork was never tested on any 32-bit architecture. You use it
at your own risk.
Also, installing Stork using the `rake install:*` commands are not
officially supported. This feature is experimental and was used mainly
for testing purposes, so it is not described in the documentation.
The recommended approach to building the Stork packages is to execute
the `rake build:server_pkg` or `rake build:agent_pkg` commands and
install the output packages. The packages include scripts that set up a
dedicated user and grant permissions.
To avoid problems with missing build dependencies for the ARM 32-bit
architecture, I recommend you cross-compile Stork. You should build the
Stork binaries/packages on the 64-bit operating system (ARM or not) and
provide proper values in the "STORK_GOOS," "STORK_GOARCH," and
"STORK_GOARM" environment variables. They accept the same values as the
standard "GOOS", "GOARCH", "GOARM" Golang environment variables. You can
list the supported values by "rake utils:list_go_supported_platforms".
See these links for references:
- https://go.dev/wiki/GoArm
- https://stork.readthedocs.io/en/latest/install.html#cross-compilation
Best regards,
Slawek Figiel
On 29/11/2024 14:09, Brian Mulder wrote:
> I was requested to install Stork on a 32-bit Armv7l CPU running Arch Linux.
> This is a three node cluster all running Bind and Kea, and Stork on one
> of them.
> In hopes that it may help someone, let me document some of the
> challenges faced:
>
> 1) There are no 32-bit Armv7l images available.
> So I decided to build from the source.
> I used the following packages:
> base-devel git gcc ruby rack go npm python3 openssh wget jdk-openjdk
> unzip entr protobuf
>
> 2) rakelib/00_init.rake does not support Armv7l so I had to add it.
> ...
> when "armv7l"
> ARCH="arm32"
> ...
> when "arm32"
> go_suffix = "linux-armv6l"
> protoc_suffix = "linux-aarch"
> node_suffix = "linux-armv7l"
> golangcilint_suffix = "linux-arm"
> goswagger_suffix = "linux_arm"
> shellcheck_suffix = "linux.aarch"
> ...
>
> --> Could support for Armv7l be included in 00_init.rake?
>
> 3) I had trouble downloading the Go source code.
> As above I added the pre-built go package.
>
> 4) I had trouble downloading the protocol buffers source code.
> As above I added the pre-built package protobuf, commented out the
> source download, and copied /usr/bin/protoc to the protoc folder.
>
> --> Could 00_init.rake first check for protoc and only try to download
> if it is not available?
>
> 5) rakelib/40_dist.rake fails while trying to copy files to /lib because
> it is symlinked to usr/lib.
> See #1584
> https://gitlab.isc.org/isc-projects/stork/-/issues/1584 <https://
> gitlab.isc.org/isc-projects/stork/-/issues/1584>
>
> --> I hope this can be improved.
>
> 6) Also mentioned in #1584, the permissions are changed for /etc, /lib,
> and /usr when performing an install:agent and install:server.
> Performed this manually:
> $ sudo cp -r dist/{agent,server}/etc /
> $ sudo cp -r dist/{agent,server}/lib /usr
> $ sudo cp -r dist/{agent,server}/usr /
>
> --> Services would not start after a reboot. I eventually discovered
> that it was due to permission changes on these directories.
>
> 7) Perhaps because of the manual installation, I also needed to create a
> stork-server and stork-agent users.
> $ sudo useradd --system --base-dir /var/lib/ stork-server
> $ sudo useradd --system --base-dir /var/lib/ stork-agent
>
> --> Please add something about this to the documentation.
>
> 8) I found that I needed to adjust other permissions stork-agent to run.
> $ sudo chmod o+x /var/named
> $ sudo chmod o+r /etc/named.conf
>
> --> Please add something about this to the documentation.
>
> I am still running some tests, but so far everything seems to be running
> fine.
> I hope some of these above challenges can be improved to allow easier
> building going forward.
>
> Best regards -- Ben
>
More information about the Stork-users
mailing list