Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes between go1.14.7 and go1.15 increase the number of symbols on windows to be exported causing build to fail #41013

Closed
techknowlogick opened this issue Aug 24, 2020 · 2 comments

Comments

@techknowlogick
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.15 windows/amd64

Does this issue reproduce with the latest release?

Yes, specifically the error is with the latest release

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\runneradmin\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\hostedtoolcache\windows\go\1.15.0\x64
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\hostedtoolcache\windows\go\1.15.0\x64\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\RUNNER~1\AppData\Local\Temp\go-build706358170=/tmp/go-build -gno-record-gcc-switches

What did you do?

A github actions pipeline showing the build on both versions of golang

on: [push, pull_request]
name: build-gitea-on-windows
jobs:
  test:
    strategy:
      matrix:
        go-version: [1.14.x, 1.15.x]
        os: [windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - name: Install Go
      uses: actions/setup-go@v2
      with:
        go-version: ${{ matrix.go-version }}
    - name: go version
      run: go version
    - name: go env
      run: go env
    - name: pull and build
      env:
          TAGS: "bindata sqlite sqlite_unlock_notify"
      run: |
        git clone --depth 1 https://github.com/go-gitea/gitea.git ./
        make backend

If you wish to do this on a local windows machine you can do the following:

set TAGS="bindata sqlite sqlite_unlock_notify"
git clone --depth 1 https://github.com/go-gitea/gitea.git
cd gitea
make backend

What did you expect to see?

With go1.14.7 (and previous version of 1.14.x) the binary builds, however when switching to go1.15 the amount of symbols exported is too large (by a significant amount more than 1.14)

What did you see instead?

C:\hostedtoolcache\windows\go\1.15.0\x64\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
C:/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: Error: export ordinal too large: 96056
collect2.exe: error: ld returned 1 exit status
@ianlancetaylor
Copy link
Contributor

Dup of #40795?

@techknowlogick
Copy link
Author

@ianlancetaylor, yup. closing now. Thanks :)

@golang golang locked and limited conversation to collaborators Aug 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants