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

打成Linux可执行文件出现异常 #34

Closed
1 task done
zouopen opened this issue Jan 8, 2024 · 2 comments
Closed
1 task done

打成Linux可执行文件出现异常 #34

zouopen opened this issue Jan 8, 2024 · 2 comments
Assignees

Comments

@zouopen
Copy link

zouopen commented Jan 8, 2024

你遇到了什么样的麻烦?

image 请问一下为什么打包的时候会出现这个异常,打包命令如下: CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++ go build -o main

在Linux环境下打包也是同样的问题。

如何复现这个问题?

使用该命令打包的时候会出现:
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=x86_64-linux-musl-gcc CXX=x86_64-linux-musl-g++ go build -o main

应用版本

Mac System 12.6
go version : 1.20

搜索

  • 在提交这个表格之前,我已经进行了相关问题搜索,没有找到相关的问题或解决方案。

补充描述

No response

@zouopen
Copy link
Author

zouopen commented Jan 10, 2024

这个需要把v8go 版本降为0.8.0 才可以 具体来自这里 rogchap/v8go#398 大概是gcc版本问题

@zouopen zouopen closed this as completed Jan 10, 2024
@soulteary
Copy link
Owner

或许可以试试一律在容器内构建,构建完毕 cp 到本地使用,干净又卫生 :D @zouopen

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

2 participants