go.mod specifies invalid Go version format '1.23.0' causing build failures in OpenWrt #1881

Closed
opened 2025-11-20 06:08:28 -05:00 by saavagebueno · 8 comments
Owner

Originally created by @ikergcalvino on GitHub (May 12, 2025).

Describe the problem

When attempting to compile NetBird from source using the official Makefile in OpenWrt, the build fails due to an invalid Go version format in go.mod file. Specifically, the go.mod file contains go 1.23.0 when it should use the format go 1.23 (without the patch version).

To Reproduce

Steps to reproduce the behavior:

  1. Set up an OpenWrt build environment
  2. Download the netbird repo for OpenWrt
  3. Attempt to compile it
  4. Observe the following error in the logs:
netbird-builder  | Finding targets
netbird-builder  | go: errors parsing go.mod:
netbird-builder  | /opt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/netbird-0.43.3/go.mod:3: invalid go version '1.23.0': must match format 1.23
netbird-builder  | 
netbird-builder  | Building targets
netbird-builder  | go: errors parsing go.mod:
netbird-builder  | /opt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/netbird-0.43.3/go.mod:3: invalid go version '1.23.0': must match format 1.23

Expected behavior

The go.mod file should specify the Go version in the correct format (go 1.23) to allow successful compilation in the OpenWrt build system and other environments using Go tools.

Are you using NetBird Cloud?

Not applicable - this is a build system issue.

NetBird version

v0.43.3

Is any other VPN software installed?

Not applicable

Debug output

The error is related to the build process, not the runtime operation of NetBird.

Additional context

This issue appears to have been introduced in commit d35a79d3b5 where the go.mod version was changed.

Have you tried these troubleshooting steps?

  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @ikergcalvino on GitHub (May 12, 2025). **Describe the problem** When attempting to compile NetBird from source using the official Makefile in OpenWrt, the build fails due to an invalid Go version format in go.mod file. Specifically, the go.mod file contains `go 1.23.0` when it should use the format `go 1.23` (without the patch version). **To Reproduce** Steps to reproduce the behavior: 1. Set up an OpenWrt build environment 2. Download the netbird repo for OpenWrt 3. Attempt to compile it 4. Observe the following error in the logs: ``` bash netbird-builder | Finding targets netbird-builder | go: errors parsing go.mod: netbird-builder | /opt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/netbird-0.43.3/go.mod:3: invalid go version '1.23.0': must match format 1.23 netbird-builder | netbird-builder | Building targets netbird-builder | go: errors parsing go.mod: netbird-builder | /opt/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/netbird-0.43.3/go.mod:3: invalid go version '1.23.0': must match format 1.23 ``` **Expected behavior** The go.mod file should specify the Go version in the correct format (`go 1.23`) to allow successful compilation in the OpenWrt build system and other environments using Go tools. **Are you using NetBird Cloud?** Not applicable - this is a build system issue. **NetBird version** `v0.43.3` **Is any other VPN software installed?** Not applicable **Debug output** The error is related to the build process, not the runtime operation of NetBird. **Additional context** This issue appears to have been introduced in commit d35a79d3b580c2430a4e7ad5ce7dfa8b2f92f5b6 where the go.mod version was changed. **Have you tried these troubleshooting steps?** - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [ ] Restarted the NetBird client - [ ] Disabled other VPN software - [ ] Checked firewall settings
saavagebueno added the clienttriage-neededgo labels 2025-11-20 06:08:28 -05:00
Author
Owner

@wehagy commented on GitHub (May 12, 2025):

Which version of OpenWrt are you trying to use to build netbird?

@wehagy commented on GitHub (May 12, 2025): Which version of `OpenWrt` are you trying to use to build `netbird`?
Author
Owner

@ikergcalvino commented on GitHub (May 13, 2025):

I'm using OpenWrt v21.02.0 in a Dockerized build environment (Ubuntu 20.04) to create a package for a Teltonika router.

@ikergcalvino commented on GitHub (May 13, 2025): I'm using OpenWrt v21.02.0 in a Dockerized build environment (Ubuntu 20.04) to create a package for a Teltonika router.
Author
Owner

@mlsmaycon commented on GitHub (May 13, 2025):

@ikergcalvino can you share your Go version? This version format was adjusted by Goland, but it is under Go's documented acceptance version; see https://go.dev/ref/mod#go-mod-file-go

@mlsmaycon commented on GitHub (May 13, 2025): @ikergcalvino can you share your Go version? This version format was adjusted by Goland, but it is under Go's documented acceptance version; see https://go.dev/ref/mod#go-mod-file-go
Author
Owner

@ikergcalvino commented on GitHub (May 13, 2025):

Go 1.17, which is used by OpenWrt v21.02.0 (specifically GO_VERSION_MAJOR_MINOR:=1.17 as defined in feeds/packages/lang/golang/golang/Makefile).

@ikergcalvino commented on GitHub (May 13, 2025): Go 1.17, which is used by OpenWrt v21.02.0 (specifically GO_VERSION_MAJOR_MINOR:=1.17 as defined in feeds/packages/lang/golang/golang/Makefile).
Author
Owner

@wehagy commented on GitHub (May 13, 2025):

Older versions of OpenWrt are unable to build the latest version of netbird due to the available golang version. For reference, OpenWrt 23.05 can build netbird up to version 0.29.1.
Since you are compiling netbird yourself, you might consider compiling it for the OpenWrt snapshot, I'm not entirely certain, but you may need to change the package format to opkg using menuconfig, alternatively, you could simply compile netbird for OpenWrt 24.10, which already uses opkg, this should likely work.

@wehagy commented on GitHub (May 13, 2025): Older versions of `OpenWrt` are unable to build the latest version of `netbird` due to the available `golang` version. For reference, `OpenWrt 23.05` can build `netbird` up to version `0.29.1`. Since you are compiling `netbird` yourself, you might consider compiling it for the `OpenWrt snapshot`, I'm not entirely certain, but you may need to change the package format to `opkg` using `menuconfig`, alternatively, you could simply compile `netbird` for `OpenWrt 24.10`, which already uses `opkg`, this should likely work.
Author
Owner

@ikergcalvino commented on GitHub (May 17, 2025):

Unfortunately, I cannot upgrade to a newer OpenWrt version as this work is part of my master's thesis project, which focuses on router network decentralization using NetBird as the solution. I'm specifically working with Teltonika routers available for my project, which require this specific version and architecture.

As an alternative approach, I created a Makefile that packages the pre-compiled ARMv6 binary (although the Teltonika routers use ARMv7 architecture) and successfully deployed it. The package functions, but I'm experiencing IPv6 connectivity issues similar to those described in issues #1808 and #2736.

Given these limitations, I now need to explore alternative paths: either wait for these issues to be resolved, hope that Teltonika or another developer creates a valid package using their SDK, or implement my own bare-metal solution directly on the routers. For now, I'm keeping this workaround on hold while looking for a better solution.

I appreciate the assistance provided. Thank you for your suggestions.

@ikergcalvino commented on GitHub (May 17, 2025): Unfortunately, I cannot upgrade to a newer OpenWrt version as this work is part of my master's thesis project, which focuses on router network decentralization using NetBird as the solution. I'm specifically working with Teltonika routers available for my project, which require this specific version and architecture. As an alternative approach, I created a Makefile that packages the pre-compiled ARMv6 binary (although the Teltonika routers use ARMv7 architecture) and successfully deployed it. The package functions, but I'm experiencing IPv6 connectivity issues similar to those described in issues #1808 and #2736. Given these limitations, I now need to explore alternative paths: either wait for these issues to be resolved, hope that Teltonika or another developer creates a valid package using their SDK, or implement my own bare-metal solution directly on the routers. For now, I'm keeping this workaround on hold while looking for a better solution. I appreciate the assistance provided. Thank you for your suggestions.
Author
Owner

@mlsmaycon commented on GitHub (May 17, 2025):

@ikergcalvino have you checked the binaries we are building already?

https://github.com/netbirdio/netbird/releases/download/v0.44.0/netbird_0.44.0_linux_armv6.tar.gz

These are built on every release.

Regarding the IPv6 issues, can you share your issue in those tickets?

Lastly, if you think this one can be closed, please do so. We can't lower the Go version as we are actually preparing to upgrade it in the next week or so.

@mlsmaycon commented on GitHub (May 17, 2025): @ikergcalvino have you checked the binaries we are building already? https://github.com/netbirdio/netbird/releases/download/v0.44.0/netbird_0.44.0_linux_armv6.tar.gz These are built on every release. Regarding the IPv6 issues, can you share your issue in those tickets? Lastly, if you think this one can be closed, please do so. We can't lower the Go version as we are actually preparing to upgrade it in the next week or so.
Author
Owner

@ikergcalvino commented on GitHub (Jun 5, 2025):

Thank you for pointing me to the official pre-compiled binaries. I am actually using that same binary in my workaround Makefile for OpenWrt packaging.

The main issue I'm facing is with IPv6 connectivity, which appears to be identical to the problems already described in tickets #2736 and #1808. I'll add my logs to both issues to provide additional data that might help resolve them.

I understand that this issue about Go versioning was my misunderstanding, so no need to consider downgrading Go. I'll close this issue and focus on contributing to the IPv6-related tickets as they're more relevant to my current challenges.

Sorry for my delayed response - I've been busy with work and temporarily lost access to the router for testing.

Thanks again for your assistance.

@ikergcalvino commented on GitHub (Jun 5, 2025): Thank you for pointing me to the official pre-compiled binaries. I am actually using that same binary in my workaround Makefile for OpenWrt packaging. The main issue I'm facing is with IPv6 connectivity, which appears to be identical to the problems already described in tickets #2736 and #1808. I'll add my logs to both issues to provide additional data that might help resolve them. I understand that this issue about Go versioning was my misunderstanding, so no need to consider downgrading Go. I'll close this issue and focus on contributing to the IPv6-related tickets as they're more relevant to my current challenges. Sorry for my delayed response - I've been busy with work and temporarily lost access to the router for testing. Thanks again for your assistance.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1881