Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failure on illumos (OmniOS r151050) #2952

Closed
cmchittom opened this issue Jun 1, 2024 · 7 comments
Closed

build failure on illumos (OmniOS r151050) #2952

cmchittom opened this issue Jun 1, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@cmchittom
Copy link

Describe the bug with a clear and concise description of what the bug is.

GoToSocial 0.15.0 fails to build on OmniOS, and the build exits with an error.

I realize that illumos isn't listed as a supported platform, so I wasn't necessarily expecting this to actually work. This report is more for the record (and hey, maybe it'll pique somebody's curiosity).

  • OS: OmniOS Community Edition v11 r151050d (shouldn't matter, but for the record, it's an lipkg zone)
  • Arch: i86pc (i.e., amd64)
  • Go version: go version go1.22.2 illumos/amd64

What's your GoToSocial Version?

0.15.0

GoToSocial Arch

source

What happened?

When attempting to build GoToSocial, I get the following output.

root@bolivar:~/gotosocial# ./scripts/build.sh
$ env CGO_ENABLED=0 go build -trimpath -v -tags  netgo osusergo static_build kvformat timetzdata -ldflags= -s -w -extldflags '-static' -X 'main.Version=v0.15.0' -gcflags= ./cmd/gotosocial
modernc.org/libc
# modernc.org/libc
vendor/modernc.org/libc/libc_unix.go:1316:34: (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_gmtoff undefined (type *struct{Ftm_sec int32; Ftm_min int32; Ftm_hour int32; Ftm_mday int32; Ftm_mon int32; Ftm_year int32; Ftm_wday int32; Ftm_yday int32; Ftm_isdst int32} has no field or method Ftm_gmtoff)
vendor/modernc.org/libc/libc_unix.go:1317:34: (*ctime.Tm)(unsafe.Pointer(tm)).Ftm_zone undefined (type *struct{Ftm_sec int32; Ftm_min int32; Ftm_hour int32; Ftm_mday int32; Ftm_mon int32; Ftm_year int32; Ftm_wday int32; Ftm_yday int32; Ftm_isdst int32} has no field or method Ftm_zone)
root@bolivar:~/gotosocial#

It appears from https://gitlab.com/cznic/libc/-/issues/26 that "libc" just doesn't (fully?) support illumos as of this writing. Presumably, until/unless that happens, GoToSocial won't either.

What you expected to happen?

No response

How to reproduce it?

No response

Anything else we need to know?

No response

@cmchittom cmchittom added the bug Something isn't working label Jun 1, 2024
@tsmethurst
Copy link
Contributor

tsmethurst commented Jun 1, 2024

Just out of interest, could you try building from the current main branch with GO_BUILDTAGS=wasmsqlite3 ./scripts/build.sh and see if that works?

@cmchittom
Copy link
Author

Yep, that does work. The build completed successfully, and (after setting some minimum stuff in config.yaml) runs, listens on the right port, and gives me a web page. Thanks!

@tsmethurst
Copy link
Contributor

Neat :)

I'm gonna close this as resolved since we'll be moving to that wasm build permanently in future (and it's already available in a tag). In the meantime, as you say, there's now a record of this in the issues. Thanks for opening!

@daenney
Copy link
Member

daenney commented Jun 4, 2024

@cmchittom For the WASM port, on anything other than Linux you have to run with db-sqlite-journal-mode: "TRUNCATE" or you risk corruption of your DB. This will have a slight performance impact compared to WAL mode under heavy load, but shouldn't cause problems for personal or small community instances in practice.

@cmchittom
Copy link
Author

Thanks for the heads-up! I haven't gotten around to doing anything more than the minimum I said above; so it's definitely timely to learn it before I do anything more.

@daenney
Copy link
Member

daenney commented Jun 4, 2024

Slight misunderstanding on my part; not a corruption issue just a terrible performance issue. To the point where the server probably wouldn't even start. So it's safe to run with WAL, just unusable in practice 😛.

@ncruces
Copy link

ncruces commented Jun 4, 2024

This will improve with the next release: ncruces/go-sqlite3#90
It says BSD, but it applies to illumos as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants