sleirsgoevy/ps4jb

Parser error

Closed this issue · 13 comments

[WARN] parse.c:2184: ps4jb/src/8cc/8cc/include/stdarg.h:1:1: type specifier missing, assuming int

[ERROR] parse.c:2214: ps4jb/src/8cc/8cc/include/stdarg.h:1:4: ';' or ',' are expected, but got /

Anyways, it crash more when loading mira

Parser errors are normal. If your code actually has errors then it's not a bug. Try compiling with gcc to see if there are any.
EDIT: as it errors out inside a system header I suppose that you're doing something wrong right before #include. Anyway I would be glad if you run the build with KEEPTEMP=1 and submit the pp.c file.

I mean, i haven't touched anything, i cloned the repo and run make

Then run the build with KEEPTEMP=1 and upload the /tmp/tmp.*/pp.c file (or check in MacOS-specific temp folders).

I'm building it with WSL

Then it's /tmp/tmp.*/pp.c inside the VM. Please upload that file here so I can investigate the issue.

Interestingly enough this pp.c compiles fine for me. Does the error still appear? Are you sure you uploaded the right file?

You may also try replacing cpp with gcc -E, maybe that will give some more clue.

Ow, my fault i've uploaded another file
here it's good: https://pastebin.com/KAeBwr4q

This is probably a bug with WSL. At line 4 you can see that the preprocessor read the file freebsd-headers/stdint.h as sys/stdint.h, while actually it is a symlink pointing there. So it basically read the link's path instead of the referred file.
Using WSL2 instead should solve the issue, as that uses a real Linux kernel under the hood.

I'm using wsl2 i think

Okay, removing and creating the symlinks works for me.

Reopen if the issue remains.