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

在引入 clang-unwrapped 情况下,go运行错误 #122

Open
shelken opened this issue Apr 18, 2024 · 4 comments
Open

在引入 clang-unwrapped 情况下,go运行错误 #122

shelken opened this issue Apr 18, 2024 · 4 comments

Comments

@shelken
Copy link
Contributor

shelken commented Apr 18, 2024

虽然我跟您的配置不完全一致,但是在只引入该包的情况下,在我的电脑上(darwin),直接运行 go run . 发现以下错误:

# runtime/cgo
cgo-builtin-prolog:1:10: fatal error: 'stddef.h' file not found
#include <stddef.h>
         ^~~~~~~~~~
1 error generated

去掉就正常了。不知道你是否能复现?

@ryan4yin
Copy link
Owner

+1 成功复现...

@ryan4yin
Copy link
Owner

ryan4yin commented Apr 18, 2024

有可能是 unstable 的 clang 有不兼容变更,然后我 darwin 用的是 nixpkgs-23.11-darwin 不是 unstable 从而导致问题。
但 unstable + darwin 坏掉的东西太多了,只能先注释掉,然后等 24.05 发布后再试试了

@imxyy1soope1
Copy link

imxyy1soope1 commented Apr 26, 2024

大概是因为llvmPackages.clang-unwrapped,并且clang-unwrapped把原本的cc覆盖掉了,导致编译时找不到include path,可以换用clang-tools

@ryan4yin
Copy link
Owner

@imxyy1soope1 嗯应该是这样

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