Build fails on FreeBSD #14

Closed
opened 2025-11-01 20:44:05 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @jacquesh on GitHub (Sep 18, 2021).

I'd be interested in trying out vikunja hosted on my TrueNAS server at home, to replace Kanboard (which doesn't look nearly as pretty as vikunja!).

Since there are no binary downloads for FreeBSD my only option is to build it from source, however when I try to do so, it fails with a rather unhelpful error message (I'm running FreeBSD 12.2):

# mage -v build:build
Running target: Build:Build
Running dependency: initVars
Error getting packages: exit status 1
Originally created by @jacquesh on GitHub (Sep 18, 2021). I'd be interested in trying out vikunja hosted on my [TrueNAS](https://www.truenas.com/) server at home, to replace Kanboard (which doesn't look nearly as pretty as vikunja!). Since there are no binary downloads for FreeBSD my only option is to build it from source, however when I try to do so, it fails with a rather unhelpful error message (I'm running FreeBSD 12.2): ``` # mage -v build:build Running target: Build:Build Running dependency: initVars Error getting packages: exit status 1 ```
GiteaMirror added the bug label 2025-11-01 20:44:05 -05:00
Author
Owner

@kolaente commented on GitHub (Sep 21, 2021):

I've seen this before but I'm not sure what is causing it. The build should work though with go build .. Could you test that?

@kolaente commented on GitHub (Sep 21, 2021): I've seen this before but I'm not sure what is causing it. The build should work though with `go build .`. Could you test that?
Author
Owner

@jacquesh commented on GitHub (Sep 22, 2021):

Confirmed: go build . does indeed build successfully as expected \o/

Also I can confirm that it appears to work correctly, in the sense that I can point the frontend at it and it functions, in case there was a concern about missing config or something

@jacquesh commented on GitHub (Sep 22, 2021): Confirmed: `go build .` does indeed build successfully as expected \o/ Also I can confirm that it appears to work correctly, in the sense that I can point the frontend at it and it functions, in case there was a concern about missing config or something
Author
Owner

@kolaente commented on GitHub (Sep 24, 2021):

I've just pushed a change in bb086eb9f8 which should give us better error messages. Can you try that and send me the output? It probably still won't work but at least we should know why.

@kolaente commented on GitHub (Sep 24, 2021): I've just pushed a change in bb086eb9f87669f844c283d42ea9ca9f3f5a7877 which should give us better error messages. Can you try that and send me the output? It probably still won't work but at least we should know why.
Author
Owner

@jacquesh commented on GitHub (Sep 28, 2021):

As expected it still doesn't work but now produces significantly more information:

root@vikunja:~/api # mage -v build:build
Running target: Build:Build
Running dependency: initVars
Error getting packages: error running command: package modernc.org/libc/errno: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/libc@v1.8.0/errno
package modernc.org/libc/signal: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/libc@v1.8.0/signal
package modernc.org/libc/sys/types: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/libc@v1.8.0/sys/types
package modernc.org/libc/time: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/libc@v1.8.0/time
package modernc.org/libc/unistd: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/libc@v1.8.0/unistd
package modernc.org/tcl/lib: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/tcl@v1.5.0/lib
, exit status 1
root@vikunja:~/api #

Hopefully that helps?

@jacquesh commented on GitHub (Sep 28, 2021): As expected it still doesn't work but now produces significantly more information: ``` root@vikunja:~/api # mage -v build:build Running target: Build:Build Running dependency: initVars Error getting packages: error running command: package modernc.org/libc/errno: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/libc@v1.8.0/errno package modernc.org/libc/signal: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/libc@v1.8.0/signal package modernc.org/libc/sys/types: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/libc@v1.8.0/sys/types package modernc.org/libc/time: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/libc@v1.8.0/time package modernc.org/libc/unistd: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/libc@v1.8.0/unistd package modernc.org/tcl/lib: build constraints exclude all Go files in /root/go/pkg/mod/modernc.org/tcl@v1.5.0/lib , exit status 1 root@vikunja:~/api # ``` Hopefully that helps?
Author
Owner

@kolaente commented on GitHub (Sep 29, 2021):

Looks like this is the root cause: https://gitlab.com/cznic/libc/-/issues/11 (Vikunja is using that library, though not directly)

I'm not sure what to do about it other than to ping the dev in the issue. Open for ideas.

@kolaente commented on GitHub (Sep 29, 2021): Looks like this is the root cause: https://gitlab.com/cznic/libc/-/issues/11 (Vikunja is using that library, though not directly) I'm not sure what to do about it other than to ping the dev in the issue. Open for ideas.
Author
Owner

@jacquesh commented on GitHub (Sep 30, 2021):

Is the call to list go packages required if one is just building? I'm not particularly familiar with mage but it looks like the results of that command are only used for tests? If that could only be run when running tests then I expect the build would at least complete successfully? If I comment out the line that calls setApiPackages then it builds as expected.

On a related note, what would it take to get FreeBSD added to the list of pre-built binaries? I don't see anything in the repo that obviously handles CI/builds.

@jacquesh commented on GitHub (Sep 30, 2021): Is the call to list go packages required if one is just building? I'm not particularly familiar with mage but it looks like the results of that command are only used for tests? If that could only be run when running tests then I expect the build would at least complete successfully? If I comment out the line that calls `setApiPackages` then it builds as expected. On a related note, what would it take to get FreeBSD added to the list of pre-built binaries? I don't see anything in the repo that obviously handles CI/builds.
Author
Owner

@kolaente commented on GitHub (Oct 2, 2021):

It looks like it, yes. I've changed that in 73a99ebd92 so that the function is only called when testing. Please test.

@kolaente commented on GitHub (Oct 2, 2021): It looks like it, yes. I've changed that in https://github.com/go-vikunja/api/commit/73a99ebd92a5f804558530507f9f2d769ee56706 so that the function is only called when testing. Please test.
Author
Owner

@jacquesh commented on GitHub (Oct 2, 2021):

Awesome, looks like it builds just fine with mage now :) Thanks!

@jacquesh commented on GitHub (Oct 2, 2021): Awesome, looks like it builds just fine with mage now :) Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#14