FS#74739 - [gcc-go] regression `go version` doesn't report any version number

Attached to Project: Arch Linux
Opened by Ruben Kelevra (RubenKelevra) - Saturday, 14 May 2022, 13:44 GMT
Last edited by freswa (frederik) - Saturday, 23 July 2022, 21:42 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To freswa (frederik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
`go version` just reports "go version unknown linux/amd64" which breaks version checks

Additional info:
* package version(s) 12.1.0-1
* config and/or log files etc.

```

$ pacman -F /usr/bin/go
usr/bin/go is owned by core/gcc-go 11.2.0-4
usr/bin/go is owned by community/go 2:1.18.1-1
$ pacman -Qi gcc-go
Name : gcc-go
Version : 12.1.0-1
Description : Go front-end for GCC
Architecture : x86_64
URL : https://gcc.gnu.org
Licenses : GPL3 LGPL FDL custom
Groups : None
Provides : go=1.18 gcc-go-multilib
Depends On : gcc=12.1.0-1 libisl.so=23-64
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : go
Replaces : gcc-go-multilib
Installed Size : 185.16 MiB
Packager : Frederik Schwan <freswa@archlinux.org>
Build Date : Fri 06 May 2022 06:34:05 PM CEST
Install Date : Sat 14 May 2022 03:07:40 PM CEST
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
$ paccheck --sha256 gcc-go
gcc-go: all files match mtree sha256sums
$ /usr/bin/go version
go version unknown linux/amd64
```

This is a regression, as older versions correctly reported the version number:

```
pacman -Qo /usr/bin/go
/usr/bin/go is owned by gcc-go 10.2.0-6
$ pacman -Qi gcc-go
Name : gcc-go
Version : 10.2.0-6
Description : Go front-end for GCC
Architecture : x86_64
URL : https://gcc.gnu.org
Licenses : GPL LGPL FDL custom
Groups : None
Provides : go=1.12.2 gcc-go-multilib
Depends On : gcc=10.2.0-6
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : go
Replaces : gcc-go-multilib
Installed Size : 161.11 MiB
Packager : Allan McRae <allan@archlinux.org>
Build Date : Thu 04 Feb 2021 02:37:17 PM CET
Install Date : Sat 14 May 2022 03:30:14 PM CEST
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
$ paccheck --sha256 gcc-go
gcc-go: all files match mtree sha256sums
$ /usr/bin/go version
go version go1.14.4 gccgo (GCC) 10.2.0 linux/amd64
```

```
$ pacman -Qo /usr/bin/go
/usr/bin/go is owned by gcc-go 11.2.0-4
$ pacman -Qi gcc-go
Name : gcc-go
Version : 11.2.0-4
Description : Go front-end for GCC
Architecture : x86_64
URL : https://gcc.gnu.org
Licenses : GPL LGPL FDL custom
Groups : None
Provides : go=1.12.2 gcc-go-multilib
Depends On : gcc=11.2.0-4 libisl.so=23-64
Optional Deps : None
Required By : None
Optional For : None
Conflicts With : go
Replaces : gcc-go-multilib
Installed Size : 174.02 MiB
Packager : Frederik Schwan <freswa@archlinux.org>
Build Date : Sat 26 Feb 2022 11:31:44 PM CET
Install Date : Sat 14 May 2022 03:38:47 PM CEST
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
$ paccheck gcc-go
gcc-go: all dependencies satisfied
gcc-go: all files match database
$ /usr/bin/go version
go version go1.16.5 gccgo (GCC) 11.2.0 linux/amd64
```

Maybe related:

https://github.com/golang/go/issues/51850

Steps to reproduce:
- Install package
- Run `go version`


If I try to build a program with gcc-go:

With gcc-go 11.2.0-4:

```
$ make build
go version go1.16.5 gccgo (GCC) 11.2.0 linux/amd64
bin/check_go_version 1.17
fatal: go version '1.16.5' should be at least '1.17'
=> Please take a look at https://golang.org/doc/install to install or upgrade go.
make: *** [mk/golang.mk:80: check_go_version] Error 1
```

With gcc-go 12.1.0-1:

```
$ make build
go version unknown linux/amd64
bin/check_go_version 1.17
fatal: Invalid 'go version' output: go version unknown linux/amd64
make: *** [mk/golang.mk:80: check_go_version] Error 1
```
This task depends upon

Closed by  freswa (frederik)
Saturday, 23 July 2022, 21:42 GMT
Reason for closing:  Upstream
Comment by freswa (frederik) - Saturday, 14 May 2022, 14:17 GMT
Please report upstream to the gcc maintainers, as I doubt it's a packaging issue. `libgo/VERSION` has the correct version set.
I wouldn't recommend building projects with gcc-go that are meant to be build with the golang compiler.

Loading...