drh / lcc

The lcc retargetable ANSI C compiler

Home Page:https://drh.github.io/lcc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem to build under linux

bensuperpc opened this issue · comments

I can't build lcc under linux (Archlinux and Manjaro), I followed the tutorial:
https://htmlpreview.github.io/?https://raw.githubusercontent.com/drh/lcc/master/doc/install.html#rcc
And try to use this script : https://groups.google.com/g/comp.compilers.lcc/c/HJ5TeSuP3gY/m/jEiwz-J_dpoJ

i still have problems compiling a simple program, i tested under debian buster and alpine linux.

Under debian:

Step 12/25 : RUN lcc hello.c -target=x86/linux
 ---> Running in ed78d5579c39
cpp: /usr/include/stdio.h:27 hello.c:1 Could not find include file <bits/libc-header-start.h>
cpp: /usr/include/stdio.h:33 hello.c:1 Could not find include file <stddef.h>
cpp: /usr/include/stdio.h:38 hello.c:1 Could not find include file <bits/types.h>
cpp: /usr/include/stdio.h:39 hello.c:1 Could not find include file <bits/types/__fpos_t.h>
cpp: /usr/include/stdio.h:40 hello.c:1 Could not find include file <bits/types/__fpos64_t.h>
cpp: /usr/include/stdio.h:41 hello.c:1 Could not find include file <bits/types/__FILE.h>
cpp: /usr/include/stdio.h:42 hello.c:1 Could not find include file <bits/types/FILE.h>
cpp: /usr/include/stdio.h:43 hello.c:1 Could not find include file <bits/types/struct_FILE.h>
cpp: /usr/include/stdio.h:133 hello.c:1 Could not find include file <bits/stdio_lim.h>
cpp: /usr/include/stdio.h:290 hello.c:1 Syntax error in #if/#elsif
cpp: /usr/include/stdio.h:363 hello.c:1 Syntax error in #if/#elsif
cpp: /usr/include/stdio.h:405 hello.c:1 Syntax error in #if/#elsif
cpp: /usr/include/stdio.h:567 hello.c:1 Syntax error in #if/#elsif
cpp: /usr/include/stdio.h:592 hello.c:1 Syntax error in #if/#elsif
cpp: /usr/include/stdio.h:781 hello.c:1 Could not find include file <bits/sys_errlist.h>
The command '/bin/sh -c lcc hello.c -target=x86/linux' returned a non-zero code: 1

Under alpine linux:

Step 11/24 : RUN lcc hello.c
 ---> Running in 3f1e0f061c10
hello.c: /usr/include/bits/alltypes.h:326: syntax error; found `va_list' expecting `;'
The command '/bin/sh -c lcc hello.c' returned a non-zero code: 1

If you want to see Dockerfile : https://github.com/bensuperpc/docker-lcc/blob/main/Dockerfile