你好,世界无法编译。
Hello world does not compile

原始链接: https://github.com/anthropics/claudes-c-compiler/issues/1

在 Fedora 43 容器、Ubuntu 26.04 容器以及常规 Fedora 42 安装中测试,出现相同错误。 直接使用了 README.md 中的示例。 GCC 存在并且可以正常编译代码: root:/claudes-c-compiler# cat > hello.c << 'EOF' #include int main(void) { printf("Hello from CCC!\n"); return 0; } EOF root:/claudes-c-compiler# ./target/release/ccc -o hello hello.c /usr/include/stdio.h:34:10: error: stddef.h: No such file or directory /usr/include/stdio.h:37:10: error: stdarg.h: No such file or directory ccc: error: 2 preprocessor error(s) in hello.c root:/claudes-c-compiler# gcc -o hello hello.c root:/claudes-c-compiler# ./hello Hello from CCC! root@1b5343a2f014:/claudes-c-compiler#

最近,有人尝试使用AI构建的C编译器(Claude的C编译器)编译“Hello, world”程序,引发了Hacker News上的讨论。最初被认为是失败,但问题在于标准库路径配置不正确——编译器本身*是*可以工作的。 这一事件引发了关于AI能力炒作的争论。一些人认为,这凸显了当前模型的局限性,并反驳了自动化软件工程的说法。另一些人强调了正在取得的快速进展,并警告不要轻易否定这项技术,承认我们对其潜力缺乏充分的了解。 评论员还注意到了一种模式:那些从炒作中获益的人夸大AI的能力,而那些担心失业的人则表现出抵触情绪。许多人同意需要更冷静和现实的讨论,而一些人则指出人类天生喜欢幸灾乐祸。最终,这一事件提醒我们,即使是令人印象深刻的AI工具仍然存在局限性。
相关文章

原文

Tested inside fedora 43 container, ubuntu 26.04 container and on regular fedora 42 installation, same error
Took example directly from README.md
GCC is present and can compile code just fine:

root:/claudes-c-compiler# cat > hello.c << 'EOF'
#include <stdio.h>
int main(void) {
    printf("Hello from CCC!\n");
    return 0;
}
EOF
root:/claudes-c-compiler# ./target/release/ccc -o hello hello.c
/usr/include/stdio.h:34:10: error: stddef.h: No such file or directory
/usr/include/stdio.h:37:10: error: stdarg.h: No such file or directory
ccc: error: 2 preprocessor error(s) in hello.c
root:/claudes-c-compiler# gcc -o hello hello.c
root:/claudes-c-compiler# ./hello
Hello from CCC!
root@1b5343a2f014:/claudes-c-compiler#```
联系我们 contact @ memedata.com