Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 711640 - go-module.eclass: "mod flag may be set only once" error for ebuilds using EGO_VENDOR
Summary: go-module.eclass: "mod flag may be set only once" error for ebuilds using EGO...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-05 21:51 UTC by Toralf Förster
Modified: 2020-03-11 02:06 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,17.31 KB, text/plain)
2020-03-05 21:51 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,187.59 KB, text/plain)
2020-03-05 21:51 UTC, Toralf Förster
Details
environment (environment,77.88 KB, text/plain)
2020-03-05 21:51 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,20.68 KB, application/x-bzip)
2020-03-05 21:51 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,9.55 KB, application/x-bzip)
2020-03-05 21:51 UTC, Toralf Förster
Details
net-p2p:syncthing-1.3.4:20200305-115015.log (net-p2p:syncthing-1.3.4:20200305-115015.log,221.91 KB, text/plain)
2020-03-05 21:51 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-03-05 21:51:24 UTC
 * ERROR: net-p2p/syncthing-1.3.4::gentoo failed (compile phase):
 *   build failed
 * 

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma-test-20200228-231731

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

clang:
clang version 9.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
llvm:
9.0.1
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.6
  [3]   python3.7 (fallback)
  [4]   python2.7 (fallback)

Available Rust versions:
  [1]   rust-1.41.1 *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.14.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm
ghc:
The Glorious Glasgow Haskell Compilation System, version 8.0.2

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Thu, 05 Mar 2020 09:37:30 +0000

emerge -qpvO net-p2p/syncthing
[ebuild  N    ] net-p2p/syncthing-1.3.4  USE="(-selinux) -tools"
Comment 1 Toralf Förster gentoo-dev 2020-03-05 21:51:27 UTC
Created attachment 617228 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-05 21:51:29 UTC
Created attachment 617230 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-03-05 21:51:32 UTC
Created attachment 617232 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-03-05 21:51:35 UTC
Created attachment 617234 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-03-05 21:51:38 UTC
Created attachment 617236 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-03-05 21:51:41 UTC
Created attachment 617238 [details]
net-p2p:syncthing-1.3.4:20200305-115015.log
Comment 7 Marek Szuba archtester gentoo-dev 2020-03-07 17:51:17 UTC
Seems related to recent changes to go-module.eclass... Seeing as williamh has recently announced he intends to update ebuilds using that eclass soon, let's wait and see if that helps.
Comment 8 Edgar Dragon 2020-03-09 11:18:38 UTC
I poked it with strace, the syncthing merge fails at:

```
execve("/usr/bin/go", ["go", "test", "-short", "-run", "Metalint", "./meta"], ["GOFLAGS=-v -x -mod=readonly -mod=vendor", "PORTAGE_INST_UID=0"]
```

Used to work with:

```
execve("/usr/bin/go", ["go", "test", "-short", "-run", "Metalint", "./meta"], ["GOFLAGS=-mod=vendor -v -x"]
```

Issue being the `-mod=readonly` added to GOFLAGS somewhere in layers above.
Comment 9 Marek Szuba archtester gentoo-dev 2020-03-09 11:58:09 UTC
This is done in lines 80-81 in go-module.eclass. Seeing as EGO_VENDOR should be merely deprecated rather than banned, this looks like a bug in the eclass.
Comment 10 Larry the Git Cow gentoo-dev 2020-03-09 12:43:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99a8cd3309a44c63837d5e62df67f78276836945

commit 99a8cd3309a44c63837d5e62df67f78276836945
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2020-03-09 12:34:27 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2020-03-09 12:43:17 +0000

    net-p2p/syncthing: migrate 1.3.4 to EGO_SUM
    
    Done ahead of the mass migration planned by williamh in order to work
    around the "mod flag may be set only once" error in go-module.eclass.
    
    Revbump because some of the dependencies might have changed - in the
    past if a vendored module offered a recent-enough release I would use
    it, now the ebuild uses verbatim whatever tags have been specified in
    the syncthing go.sum file.
    
    Bug: https://bugs.gentoo.org/711640
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 net-p2p/syncthing/Manifest                  | 262 ++++++++++++++++++++
 net-p2p/syncthing/syncthing-1.3.4-r1.ebuild | 360 ++++++++++++++++++++++++++++
 2 files changed, 622 insertions(+)
Comment 11 William Hubbs gentoo-dev 2020-03-11 02:06:31 UTC
This is now fixed in the eclass.