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

Docker build dependency? #10805

Open
stratacast opened this issue Dec 24, 2024 · 6 comments
Open

Docker build dependency? #10805

stratacast opened this issue Dec 24, 2024 · 6 comments
Labels

Comments

@stratacast
Copy link

I tried building ocis from the repo, but I found it strange that I need both docker and docker-compose as build dependencies. Why is this a hard build dependency when ocis can run without requiring docker? This prohibits running ocis on alternate operating systems.

@kobergj
Copy link
Collaborator

kobergj commented Dec 24, 2024

Can you explain how you tried to build ocis? The generic make build should bot require docker or docker-compose

@stratacast
Copy link
Author

I ran the make generate command as specified in the Use the ocis Repo as Source section of the README. This is where the build errors out with a hard docker requirement:

/home/admin/go/bin/pigeon-v1.2.1 -optimize-grammar -optimize-parser -o ../../ocis-pkg/kql/dictionary_gen.go ../../ocis-pkg/kql/dictionary.peg
gmake[1]: Leaving directory '/home/admin/ocis/services/search'
gmake[1]: Entering directory '/home/admin/ocis/services/settings'
(re)installing /home/admin/go/bin/buf-v1.39.0
# github.com/docker/docker/dockerversion
../../go/pkg/mod/github.com/docker/[email protected]+incompatible/dockerversion/useragent.go:50:35: undefined: kernel.GetKernelVersion
# github.com/docker/docker/layer
../../go/pkg/mod/github.com/docker/[email protected]+incompatible/layer/layer_store.go:531:18: ls.mountID undefined (type *layerStore has no field or method mountID)
gmake[1]: *** [../../.bingo/Variables.mk:30: /home/admin/go/bin/buf-v1.39.0] Error 1
gmake[1]: Leaving directory '/home/admin/ocis/services/settings'
gmake: *** [Makefile:145: generate] Error 1

@kobergj
Copy link
Collaborator

kobergj commented Dec 27, 2024

Ok. Seems the protobuf dependency we are using is having a hard docker requirement. It is this one: https://github.com/bufbuild/buf

We are on an old version, maybe bumping it would fix the issue but I am not sure.
As a workaround you could try to not make generate or do make generate only in the web service.

@stratacast
Copy link
Author

On illumos (SmartOS distro) I run into a different issue running make -C ocis build. I see where the issue is.

make: Entering directory '/home/admin/ocis/ocis'
go build -v -tags 'disable_crypt' -ldflags '-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn -s -w -X "github.com/owncloud/ocis/v2/ocis-pkg/version.String=860e1ad9ea" -X "github.com/owncloud/ocis/v2/ocis-pkg/version.Tag=" -X "github.com/owncloud/ocis/v2/ocis-pkg/version.Date=20241227"' -o bin/ocis ./cmd/ocis
package github.com/owncloud/ocis/v2/ocis/cmd/ocis
        imports github.com/owncloud/ocis/v2/ocis/pkg/command
        imports github.com/owncloud/ocis/v2/ocis/pkg/runtime
        imports github.com/owncloud/ocis/v2/ocis/pkg/runtime/service
        imports github.com/owncloud/ocis/v2/services/nats/pkg/command
        imports github.com/owncloud/ocis/v2/services/nats/pkg/server/nats
        imports github.com/nats-io/nats-server/v2/server
        imports github.com/nats-io/nats-server/v2/server/sysmem: build constraints exclude all Go files in /home/admin/ocis/vendor/github.com/nats-io/nats-server/v2/server/sysmem
make: *** [../.make/go.mk:102: bin/ocis] Error 1
make: Leaving directory '/home/admin/ocis/ocis'

https://github.com/nats-io/nats-server/tree/main/server/sysmem

sysmem supports bsd, darwin, linux, etc..., no illumos. So, that dependency would need to have a pull request submitted to support illumos. I'm sure illumos might be considered outside the scope of ocis (but I hope not!). It appears though that it would take some work and code commits in ocis dependencies to support an illumos distro

@kobergj
Copy link
Collaborator

kobergj commented Jan 3, 2025

Ah ok. Yes that makes sense. Should we open a ticket in nats-server repo? We can't really tackle that as no one of us is using illumos and therefore we cannot test it.
We can however update the nats dependency as soon as the fix has landed in nats-server.

@stratacast
Copy link
Author

stratacast commented Jan 3, 2025

I see there is a stale issue here

nats-io/nats-server#3018

The user suggested getting the info from x/sys/unix. I only got a few minutes to poke around with that package, but haven't gotten into it much. I've only done a little Go, but their sysmem stuff looks very simple. So if I can find the acceptable way to get mem info with that package or some other way I could submit a PR, maybe. If x/sys/unix actually works, it should be something they would accept. They already use x/sys/windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants