8000 Windows 10 build failed: running gcc failed: exit status 1 · Issue #78 · DataDog/zstd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Windows 10 build failed: running gcc failed: exit status 1 #78
Closed
@flerka

Description

@flerka

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

go version go1.13.6 windows/amd64

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

Windows 10

set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\homepc\AppData\Local\go-build
set GOENV=C:\Users\homepc\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\homepc\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\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\homepc\AppData\Local\Temp\go-build692364802=/tmp/go-build -gno-record-gcc-switches

What did you do?

Build in windows 10 failed

C:\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1
C:\Users\homepc\AppData\Local\Temp\go-link-980381163\000004.o: In function `COVER_buildDictionary':
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/cover.c:678: undefined reference to `__getreent'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/cover.c:678: undefined reference to `__getreent'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/cover.c:714: undefined reference to `__getreent'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/cover.c:714: undefined reference to `__getreent'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/cover.c:710: undefined reference to `__getreent'
C:\Users\homepc\AppData\Local\Temp\go-link-980381163\000004.o:/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/cover.c:710: more undefined references to `__getreent' follow
C:\Users\homepc\AppData\Local\Temp\go-link-980381163\000006.o: In function `ss_mintrosort':
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/divsufsort.c:495: undefined reference to `__assert_func'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/divsufsort.c:494: undefined reference to `__assert_func'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/divsufsort.c:509: undefined reference to `__assert_func'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/divsufsort.c:499: undefined reference to `__assert_func'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/divsufsort.c:498: undefined reference to `__assert_func'
C:\Users\homepc\AppData\Local\Temp\go-link-980381163\000006.o:/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/divsufsort.c:513: more undefined references to `__assert_func' follow
C:\Users\homepc\AppData\Local\Temp\go-link-980381163\000009.o: In function `FASTCOVER_ctx_init':
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/fastcover.c:311: undefined reference to `__getreent'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/fastcover.c:311: undefined reference to `__getreent'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/fastcover.c:318: undefined reference to `__getreent'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/fastcover.c:318: undefined reference to `__getreent'
/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/fastcover.c:324: undefined reference to `__getreent'
C:\Users\homepc\AppData\Local\Temp\go-link-980381163\000009.o:/cygdrive/c/Users/homepc/go/pkg/mod/github.com/!data!dog/zstd@v1.4.4/fastcover.c:324: more undefined references to `__getreent' follow
collect2.exe: error: ld returned 1 exit status

What did you expect to see?

Should build successfully

What did you see instead?

I initially got gcc not found error, so I installed TDM-GCC-64 and add path C:\TDM-GCC-64\bin, then, I got above error

I think it's related to this issue #63

Basic example from cgo (https://golang.org/cmd/cgo/, where C code may call function pointers received ...) compiles and runs successfully, so I don't think there are some problems with my local installation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0