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

Compile failed: running gcc failed: exit status 1 #63

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 priva 8000 cy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zhangcicely opened this issue May 24, 2019 · 4 comments
Closed

Compile failed: running gcc failed: exit status 1 #63

zhangcicely opened this issue May 24, 2019 · 4 comments

Comments

@zhangcicely
Copy link

Please answer these questions before submitting your issue. Thanks!

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

go version go1.11 windows/amd64

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

Windows 10

go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\ciczhang\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\NextGenPO\GoWorkplace
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
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\ciczhang\AppData\Local\Temp\go-build594543906=/tmp/go-build -gno-record-gcc-switches

What did you do?

Building in windows 10 failed

C:\Users\ciczhang\AppData\Local\Temp\go-link-108982731\000004.o: In function COVER_buildDictionary': /cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/cover.c:678: undefined reference to __getreent'
/cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/cover.c:678: undefined reference to __getreent' /cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/cover.c:710: undefined reference to __getreent'
/cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/cover.c:710: undefined reference to __getreent' /cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/cover.c:714: undefined reference to __getreent'
C:\Users\ciczhang\AppData\Local\Temp\go-link-108982731\000004.o:/cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/cover.c:714: more undefined references to __getreent' follow C:\Users\ciczhang\AppData\Local\Temp\go-link-108982731\000006.o: In function ss_mintrosort':
/cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/divsufsort.c:444: undefined reference to __assert_func' /cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/divsufsort.c:517: undefined reference to __assert_func'
/cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/divsufsort.c:516: undefined reference to __assert_func' /cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/divsufsort.c:503: undefined reference to __assert_func'
/cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/divsufsort.c:502: undefined reference to __assert_func' C:\Users\ciczhang\AppData\Local\Temp\go-link-108982731\000006.o:/cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/divsufsort.c:499: more undefined references to __assert_func' follow
C:\Users\ciczhang\AppData\Local\Temp\go-link-108982731\000009.o: In function FASTCOVER_buildDictionary': /cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/fastcover.c:395: undefined reference to __getreent'
/cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/fastcover.c:395: undefined reference to __getreent' /cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/fastcover.c:434: undefined reference to __getreent'
/cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/fastcover.c:434: undefined reference to __getreent' /cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/fastcover.c:430: undefined reference to __getreent'
C:\Users\ciczhang\AppData\Local\Temp\go-link-108982731\000009.o:/cygdrive/c/NextGenPO/GoWorkplace/src/bitbucket-eng-sjc1.cisco.com/bitbucket/nextg/lds-microservice/vendor/github.com/DataDog/zstd/fastcover.c:430: 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

@Viq111
Copy link
Collaborator
Viq111 commented May 24, 2019

Hi @zhangcicely !

I'm sorry I'm not an expert on Windows compilation but from your log it looks like you might have both cygwin (from the /cygdrive/ path you have in the log) as well as mingw (the compiler provided by TDM-GCC-64)
From looking at this stackoverflow thread, it looks like MinGW and Cygwin might not be playing well together especially for linking.
Would you mind checking if you can remove one or the other from the equation and try to recompile with only one ?

@zhangcicely
Copy link
Author

Hi @Viq111

Thanks for replying, I removed cygwin, but I still got the same error, I think somewhere it is not cleaned. Just wonder if you may have seen similar issue before?
I removed MinGW also, but I ran into another issue. Another thread mentioned that cgo is not compatible with cgwin, and asked to use MinGW

Thanks,

@lidan2000
Copy link

zstd 1.41 build: Fix MinGW-W64 build by @myzhang1029 (#1600)

@Viq111
Copy link
Collaborator
Viq111 commented Aug 16, 2019

Indeed facebook/zstd#1600
This seems to have been merged on April 25th.
The current included zstd version is 1.4.1: https://github.com/facebook/zstd/releases/tag/v1.4.1 which was released on July 19th so it should have this fix already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0