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

How to properly build go binary that uses v8go inside docker? #390

Open
begmaroman opened this issue Aug 17, 2023 · 0 comments
Open

How to properly build go binary that uses v8go inside docker? #390

begmaroman opened this issue Aug 17, 2023 · 0 comments

Comments

@begmaroman
Copy link

RUN CGO_ENABLED=1 GOOS=linux go build -ldflags="-X 'main.BranchName=' -X 'main.SHA='" -a -tags musl -o nerif-app ./main.go:
#20 60.58 # command-line-arguments
#20 60.58 /usr/local/go/pkg/tool/linux_amd64/link: running g++ failed: exit status 1
#20 60.58 /usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/rogchap.com/v8go@v0.9.0/deps/linux_x86_64/libv8.a(platform-posix.o): in function `v8::base::OS::VPrint(char const*, __va_list_tag*)':
#20 60.58 platform-posix.cc:(.text._ZN2v84base2OS6VPrintEPKcP13__va_list_tag+0x1a): undefined reference to `__vfprintf_chk'
#20 60.58 /usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /go/pkg/mod/rogchap.com/v8go@v0.9.0/deps/linux_x86_64/libv8.a(platform-posix.o): in function `v8::base::OS::VFPrint(_IO_FILE*, char const*, __va_list_tag*)':

How to properly setup an environment inside docker container in order to successfully build the image?

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

1 participant