2

I have a build on Launchpad that is failing for reasons that escape me.

The package clearly lists the build dependencies as:

Merged Build-Depends: ..., golang (>= 1:1.4~) | gccgo-5, ...
Filtered Build-Depends: ..., golang (>= 1:1.4~) | gccgo-5, ...

Unless I am missing something, this means either a version of golang >= 1.4 must be installed or gccgo-5 must be installed.

But APT does neither of those things. Further down, we see:

The following NEW packages will be installed:
  ... golang-go ...
0 upgraded, 29 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.5 MB of archives.
After this operation, 139 MB of additional disk space will be used.
...
Get:27 [...] trusty/universe golang-go i386 2:1.2.1-2ubuntu1 [7148 kB]

How on earth does golang 1.2 satisfy the build dependency? What's going on here? What am I doing wrong?


Edit: as pointed out in the comments, the problem revolves around the epoch numbers. My question now becomes: what can I do to work around this?

Nathan Osman
  • 32,155

1 Answers1

1

Once epoch numbers come into play, you cannot meaningfully request anything other than exact version from an older epoch as a depedency. >= 1:1.4 will be satisfied by any package from a newer epoch, even 2:0.1. You could use exact matches (== 1:1.4), but I doubt that's what you want.

Since all currently supported versions of Ubuntu have golang packages versioned with the new epoch, it's time you moved to it as well. Debian also uses the new epoch. So, at the moment, it looks like only unofficial sources will even have a 1:-versioned golang package.

muru
  • 197,895
  • 55
  • 485
  • 740
  • I finally ended up doing exactly what you described and changed the 1 to a 2 in the Build-Depends field. Works now. – Nathan Osman Mar 29 '16 at 22:54