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

Errors compiling cross-devel #3

Open
jockm opened this issue Sep 17, 2023 · 2 comments
Open

Errors compiling cross-devel #3

jockm opened this issue Sep 17, 2023 · 2 comments

Comments

@jockm
Copy link

jockm commented Sep 17, 2023

When I go into the cross-devel directory and issue a make (as per the instructions), I get the following errors found below.

According to this SO post it seems to be related to the -m32 compiler flag. Allows all but ccom and cpp to compile. The former needs implicit-int disabled and the latter needs misleading-indentation disabled.

There may be others, I am just getting started.

Compiling on Debian 12, x86-64, gcc 12.2.0

make
for i in cc pcc c2 ccom cpp as ld; do make DESTDIR=/usr/local -C $i; done
make[1]: Entering directory '/home/jock/pdp11/os/foozle11unix/cross-devel/cc'
gcc -m32 -Werror -O -Wall -DDESTDIR=\"/usr/local\"   -c -o pcc.o pcc.c
pcc.c:8:10: fatal error: sys/param.h: No such file or directory
    8 | #include <sys/param.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [<builtin>: pcc.o] Error 1
make[1]: Leaving directory '/home/jock/pdp11/os/foozle11unix/cross-devel/cc'
make[1]: Entering directory '/home/jock/pdp11/os/foozle11unix/cross-devel/pcc'
rm -f pcclocal.h
cat pcc.h localdefs.h | egrep '^#[ 	]*(define[ 	][ 	]*PCC(F|T|TM|OM)?_|ifdef|ifndef|endif)' | sed -e 's/PCC[A-Z]*_//' > pcclocal.h
rm -f pcctokens
cat pcc.h localdefs.h | egrep '^#[ 	]*define[ 	][ 	]*PCC_' | sed -e 's/^#[ 	]*define[ 	][ 	]*PCC_/%term	/' > pcctokens
cat pcctokens ../mip/cgram.y > gram.in
byacc gram.in
make[1]: byacc: No such file or directory
make[1]: *** [Makefile:73: cgram.c] Error 127
make[1]: Leaving directory '/home/jock/pdp11/os/foozle11unix/cross-devel/pcc'
make[1]: Entering directory '/home/jock/pdp11/os/foozle11unix/cross-devel/c2'
gcc -m32 -Werror -O -g -Wall   -c -o c20.o c20.c
In file included from c2.h:12,
                 from c20.c:8:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
   27 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [<builtin>: c20.o] Error 1
make[1]: Leaving directory '/home/jock/pdp11/os/foozle11unix/cross-devel/c2'
make[1]: Entering directory '/home/jock/pdp11/os/foozle11unix/cross-devel/ccom'
gcc -m32 -O -g -Wall -DDESTDIR=\"/usr/local\"   -c -o c00.o c00.c
In file included from c00.c:12:
/usr/include/stdlib.h:26:10: fatal error: bits/libc-header-start.h: No such file or directory
   26 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [<builtin>: c00.o] Error 1
make[1]: Leaving directory '/home/jock/pdp11/os/foozle11unix/cross-devel/ccom'
make[1]: Entering directory '/home/jock/pdp11/os/foozle11unix/cross-devel/cpp'
gcc -m32 -Werror -O -g -Wall -DFLEXNAMES   -c -o cpp.o cpp.c
In file included from cpp.c:16:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
   27 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [<builtin>: cpp.o] Error 1
make[1]: Leaving directory '/home/jock/pdp11/os/foozle11unix/cross-devel/cpp'
make[1]: Entering directory '/home/jock/pdp11/os/foozle11unix/cross-devel/as'
gcc -m32 -Werror -g -Wall -DDESTDIR=\"/usr/local\"   -c -o as11.o as11.c
In file included from as11.c:8:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
   27 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [<builtin>: as11.o] Error 1
make[1]: Leaving directory '/home/jock/pdp11/os/foozle11unix/cross-devel/as'
make[1]: Entering directory '/home/jock/pdp11/os/foozle11unix/cross-devel/ld'
gcc -m32 -Werror -O -g -Wall   -c -o size.o size.c
In file included from size.c:8:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory
   27 | #include <bits/libc-header-start.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [<builtin>: size.o] Error 1
make[1]: Leaving directory '/home/jock/pdp11/os/foozle11unix/cross-devel/ld'
@leobru
Copy link
Collaborator

leobru commented Nov 22, 2023

Code rot has crept in. If you have a fix, please let us know.

@weiqist
Copy link

weiqist commented Apr 3, 2024

byacc has not been installed on the system (must be) and CC option without -Werror in cpp/Makefile dirty hack for skip it

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