Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 771129 - [tracker] go packages that do not build with go 1.16 due to being unable to find the main module
Summary: [tracker] go packages that do not build with go 1.16 due to being unable to f...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords: Tracker
Depends on: 771009 771033 771048 771051 771060 771063 771066 771072 772860 771042 771054 771081 771084 771087 771105 771567 771606 773316
Blocks:
  Show dependency tree
 
Reported: 2021-02-17 16:54 UTC by William Hubbs
Modified: 2022-08-25 04:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Hubbs gentoo-dev 2021-02-17 16:54:54 UTC
This is a tracker, so as usual, no talking here.

If a go package has not been converted to modules, it will fail to build with go
1.16 with an error stating that it cannot find the main module.

This is because module aware mode is on by default with this new version
of go. The ideal fix for this is for the package to convert to using go
modules. In the meantime, it is possible to force go 1.16 to build with
module aware mode off by setting the GO111MODULE environment variable to
off during the build.
Comment 1 Joonas Niilola gentoo-dev 2021-02-17 18:11:18 UTC
If these keep on piling up, I suggest masking go-1.16 and running a tinderbox against all of its rdeps. I think you can ask toralf, or do it yourself. Would be nice to give maintainers time to port, or just time for you to fix them once all have been found.
Comment 2 Larry the Git Cow gentoo-dev 2021-02-17 19:23:08 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fca1042eea4b41d746cb0b460892f45779f5497

commit 0fca1042eea4b41d746cb0b460892f45779f5497
Author:     William Hubbs <williamh@gentoo.org>
AuthorDate: 2021-02-17 19:18:31 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2021-02-17 19:20:41 +0000

    golang-base.eclass: keep GO111MODULE in auto mode
    
    Go 1.16 forces module-aware mode on by default but this breaks builds.
    
    Bug: https://bugs.gentoo.org/771129
    
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 eclass/golang-base.eclass | 3 +++
 1 file changed, 3 insertions(+)
Comment 3 Toralf Förster gentoo-dev 2021-03-25 15:56:21 UTC
I do assume this message is similar root cause:

>>> Compiling source in /var/tmp/portage/dev-libs/go-fuse-0_p20150422/work/go-fuse-0_p20150422 ...
WORK=/var/tmp/portage/dev-libs/go-fuse-0_p20150422/temp/go-build3994059070
no required module provides package github.com/hanwen/go-fuse/fuse: go.mod file not found in current directory or any parent directory; see 'go help modules'
 * ERROR: dev-libs/go-fuse-0_p20150422::gentoo failed (compile phase):
 *   (no error message)
 *