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 broke on FreeBSD 13.0-RELEASE amd64 + go 1.17 #184

Closed
dch opened this issue Sep 1, 2021 · 11 comments
Closed

build broke on FreeBSD 13.0-RELEASE amd64 + go 1.17 #184

dch opened this issue Sep 1, 2021 · 11 comments
Labels
bug Something isn't working packaging Related to packaging and distribution of GoToSocial

Comments

@dch
Copy link

dch commented Sep 1, 2021

drive-by bug report on @igalic behalf from mastodon.

env:

  • FreeBSD 13.0-RELEASE amd64
  • go 1.17
  • commit #7d193de fails to build
$ ./build.sh
package github.com/superseriousbusiness/gotosocial/cmd/gotosocial
	imports github.com/superseriousbusiness/gotosocial/internal/cliactions/admin/account
	imports github.com/superseriousbusiness/gotosocial/internal/db/bundb
	imports modernc.org/sqlite
	imports modernc.org/libc
	imports modernc.org/libc/errno: build constraints exclude all Go files in /repos/gotosocial/vendor/modernc.org/libc/errno
package github.com/superseriousbusiness/gotosocial/cmd/gotosocial
	imports github.com/superseriousbusiness/gotosocial/internal/cliactions/admin/account
	imports github.com/superseriousbusiness/gotosocial/internal/db/bundb
	imports modernc.org/sqlite
	imports modernc.org/libc
	imports modernc.org/libc/signal: build constraints exclude all Go files in /repos/gotosocial/vendor/modernc.org/libc/signal
package github.com/superseriousbusiness/gotosocial/cmd/gotosocial
	imports github.com/superseriousbusiness/gotosocial/internal/cliactions/admin/account
	imports github.com/superseriousbusiness/gotosocial/internal/db/bundb
	imports modernc.org/sqlite
	imports modernc.org/libc/sys/types: build constraints exclude all Go files in /repos/gotosocial/vendor/modernc.org/libc/sys/types
package github.com/superseriousbusiness/gotosocial/cmd/gotosocial
	imports github.com/superseriousbusiness/gotosocial/internal/cliactions/admin/account
	imports github.com/superseriousbusiness/gotosocial/internal/db/bundb
	imports modernc.org/sqlite
	imports modernc.org/libc
	imports modernc.org/libc/time: build constraints exclude all Go files in /repos/gotosocial/vendor/modernc.org/libc/time
package github.com/superseriousbusiness/gotosocial/cmd/gotosocial
	imports github.com/superseriousbusiness/gotosocial/internal/cliactions/admin/account
	imports github.com/superseriousbusiness/gotosocial/internal/db/bundb
	imports modernc.org/sqlite
	imports modernc.org/libc
	imports modernc.org/libc/unistd: build constraints exclude all Go files in /repos/gotosocial/vendor/modernc.org/libc/unistd

😞 😿 😭

#87328b6 just worked, with ./build.sh prior to the vendoring update and modernc stuff.

Hope that's enough for somebody to identify a fix?

@NyaaaWhatsUpDoc
Copy link
Member

Do you require SQLite? It seems maybe this library doesn't support FreeBSD :( in which case a quick fix for now could be a check for Linux before importing the SQLite library

@igalic
Copy link
Contributor

igalic commented Sep 2, 2021

I've created an issue in modernc about FreeBSD support.

regarding SQLite: I Absolutely want/need SQLite. I already wear enough hats, because I refuse to become a DBA, too.
Alternatively: I don't wanna pay AWS, Azure, GCP to somewhat reliably run a database for me, when that database could be a file.

@NyaaaWhatsUpDoc
Copy link
Member

NyaaaWhatsUpDoc commented Sep 2, 2021

I might take a quick look into the requirements for getting FreeBSD support working because it does look interesting 😅. I can't promise I'll get anywhere but just know it also has my interest / attention!

(also, thank you for making the issue over there!)

@igalic
Copy link
Contributor

igalic commented Sep 2, 2021

updates: ccgo issue is now solved
That one's prerequisite to the modernc issue which is still being worked on

SQLite might still need work, once that is in place.

meanwhile we've opened golang/go#48148 and golang/go#48160
to cleanup some issue in golang.org/x/sys/unix

@tsmethurst tsmethurst added bug Something isn't working packaging Related to packaging and distribution of GoToSocial labels Sep 3, 2021
@igalic
Copy link
Contributor

igalic commented Sep 8, 2021

with all of these packages now having received updates, I've tried to build it
but since they are vendored, I had to update them first, which wasn't successful: https://gitlab.com/cznic/ccgo/-/issues/17

not 100% sure it's a ccgo bug tho, could just be that we're vendoring a waaay too old version?

@igalic
Copy link
Contributor

igalic commented Sep 8, 2021

after updating correctly, it compiles and it runs:

meena@bsdix ~/s/gotosocial (main)> ./gotosocial --db-type sqlite --host localhost server start
time="2021-09-08T15:21:04Z" level="info" msg="connected to database"
time="2021-09-08T15:21:04Z" level="info" msg="instance entry already exists"

n.b.: Given that the diff is 26981 lines long, i don't think it makes sense for me to submit the patch.
it'd feel like cheating my way into the top contributors list ;)

@tsmethurst
Copy link
Contributor

tsmethurst commented Sep 8, 2021

it'd feel like cheating my way into the top contributors list ;)

Haha :D 'top contributors list' means nothing around here, don't worry, feel free to submit a patch if you like :) If not, i'll have a crack at it later. Can you list the packages you had to update?

EDIT: ah it looks like everything is in the issue you linked, perfect :)

@NyaaaWhatsUpDoc
Copy link
Member

Just put in a PR for this at #198

@NyaaaWhatsUpDoc
Copy link
Member

@igalic @dch would you be able to confirm that main can build for you now? please bear in mind there are db changes that need migrating in main so maybe don't switch to it just yet, just attempt a build :')

@igalic
Copy link
Contributor

igalic commented Sep 10, 2021

lookin good:

meena@bsdix ~/src> rm -rf gotosocial/
meena@bsdix ~/src> git clone https://github.com/superseriousbusiness/gotosocial
Cloning into 'gotosocial'...
remote: Enumerating objects: 9676, done.
remote: Counting objects: 100% (3098/3098), done.
remote: Compressing objects: 100% (1739/1739), done.
remote: Total 9676 (delta 2008), reused 1568 (delta 1331), pack-reused 6578
Receiving objects: 100% (9676/9676), 38.59 MiB | 2.38 MiB/s, done.
Resolving deltas: 100% (4720/4720), done.
Updating files: 100% (4183/4183), done.
meena@bsdix ~/src> cd gotosocial/
meena@bsdix ~/s/gotosocial (main)> ./build.sh
meena@bsdix ~/s/gotosocial (main)> ./gotosocial --db-type sqlite --host localhost server start
time="2021-09-10T09:50:02Z" level="info" msg="connected to database"
time="2021-09-10T09:50:02Z" level="info" msg="created instance instance localhost with id 01JF06H4GPBBJQC6XG4TEM89M0"

@NyaaaWhatsUpDoc
Copy link
Member

woohoo!

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

No branches or pull requests

4 participants