CodeAsm / teeny-linux

An tiny linux kernel with initramfs for Qemu based on Mitch Galgs linux tutorials.
6 stars 1 forks source link

GCC include paths fault? #4

Closed CodeAsm closed 1 year ago

CodeAsm commented 3 years ago
hello.c:1:10: fatal error: stdio.h: No such file or directory
    1 | #include <stdio.h>
      |          ^~~~~~~~~
compilation terminated.

but

gcc -o hello hello.c -I /include/

works fine

CodeAsm commented 3 years ago

https://stackoverflow.com/questions/17939930/finding-out-what-the-gcc-include-path-isHelped solve this issue Specifically echo | gcc -E -Wp,-v - Wich shows wich include paths are traversed and I deciced to make a symbolic link to the root include folder.

ln -s /include usr/include/i386-linux-gnu Would "fix" the gcc musl isue.

CodeAsm commented 1 year ago

Issue still here, but should be fixed with:

mkdir -pv $TARGET/usr/local/
ln -s /include usr/local/include