termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.13k stars 3.01k forks source link

(some) golang packages cannot be built #6803

Closed Grimler91 closed 2 years ago

Grimler91 commented 3 years ago

Problem description

Some golang packages cannot be built anymore, supposedly after a golang update. They give an error looking something like:

no required module provides package foobar: go.mod file not found in current directory or any parent directory; see 'go help modules'

So far I have had problems with these packages:

gbt
gotty
keybase
rush
shell2http

but there are probably more.

Steps to reproduce

Try to build any of the packages above in the docker image.

Expected behavior

Packages should be buildable.

kcubeterm commented 3 years ago

go mod init $PKG_name go mod tidy Helped me to build rush successfully in ubuntu. Didn't test in docker.

Grimler91 commented 3 years ago

go mod init $PKG_name seem to be the fix indeed, thanks

Grimler91 commented 3 years ago

With go mod init keybase; go mod tidy, keybase still fails with

go: keybase/go/kbfs/libkbfs imports
    github.com/vividcortex/ewma: github.com/vividcortex/ewma@v1.2.0: parsing go.mod:
    module declares its path as: github.com/VividCortex/ewma
            but was required as: github.com/vividcortex/ewma

but the others work.

thunder-coding commented 3 years ago

Facing similiar errors while building proton-bridge. go mod tidy fixed it

stale[bot] commented 2 years ago

This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Grimler91 commented 2 years ago

Closing, most packages have been fixed.