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

Can't build a project on Windows with go-git:v5.5.2 due to gcc #666

Closed
mih-kopylov opened this issue Jan 19, 2023 · 4 comments
Closed

Can't build a project on Windows with go-git:v5.5.2 due to gcc #666

mih-kopylov opened this issue Jan 19, 2023 · 4 comments

Comments

@mih-kopylov
Copy link

mih-kopylov commented Jan 19, 2023

Environment:

> go install -x .
cd C:\Project
git status --porcelain
cd C:\Project
git -c log.showsignature=false show -s --format=%H:%ct
WORK=C:\Users\MIKHAI~1.KOP\AppData\Local\Temp\go-build3376227082
mkdir -p $WORK\b252\
cd C:\Users\mikhail.kopylov\go\pkg\mod\github.com\pjbgf\sha1cd@v0.2.3\cgo
TERM='dumb' CGO_LDFLAGS='"-g" "-O2"' "C:\\Program Files\\Go\\pkg\\tool\\windows_amd64\\cgo.exe" -objdir "$WORK\\b252\\" -importpath github.com/pjbgf/sha1cd/cgo -- -I "$WORK\\b252\\" -g -O2 "C:\\Users\\mikhail.kopylov\\go\\pkg\\mod\\github.com\\pjbgf\\sha1cd@v0.2.3\\cgo\\sha1.go" "C:\\Users\\mikhail.kopylov\\go\\pkg\\mod\\github.com\\pjbgf\\sha1cd@v0.2.3\\cgo\\ubc_check.go"
go build github.com/pjbgf/sha1cd/cgo: C:\Program Files\Go\pkg\tool\windows_amd64\cgo.exe: exit status 2

It is probably related to #624, but none of the recommendations there help.

A couple questions

  1. What am I doing wrong?
  2. Can go-git please exclude github.com/pjbgf/sha1cd@v0.2.3 dependency to avoid all these dancings with gcc etc?
@mih-kopylov mih-kopylov changed the title Can't build my project on Windows with go-git:v5.5.2 due to gcc Can't build a project on Windows with go-git:v5.5.2 due to gcc Jan 20, 2023
@mih-kopylov
Copy link
Author

Found out #637 that answers question 2, so looking forward to seeing it implemented and merged to master.

Unfortunately it's still not clear what could be wrong with "exit status 2"

@yangzhen0512
Copy link

I downgrade to v5.4.2 and there is no cgo.

@mih-kopylov
Copy link
Author

Yeah, I had to do the same.

@hiddeco
Copy link
Member

hiddeco commented Mar 3, 2023

Should be solved with https://github.com/go-git/go-git/releases/tag/v5.6.0

@hiddeco hiddeco closed this as completed Mar 3, 2023
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