I'm attempting to build rstsflx from the sources here on a Raspberry Pi running:
Linux PiDP11 6.6.31+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux
There are several compiler warnings as well as a link failure. I'll attach a complete transcript, but the particular warnings / errors are:
rtime.c: In function ‘cvtdate’:
rtime.c:21:17: warning: ‘memcpy’ reading 12 bytes from a region of size 10 [-Wstringop-overread]
21 | memcpy (buf, " none ", DATELEN);
| ^~~~~~~~~~
scancmd.c: In function ‘initialize_readline’:
scancmd.c:484:9: warning: ‘CPPFunction’ is deprecated [-Wdeprecated-declarations]
484 | rl_attempted_completion_function = (CPPFunction *)flx_completion;
| ^~~~~~~~
/usr/bin/ld: doclean.o:/opt/pidp11/systems/rsts101/rstsflx/doclean.c:73: multiple definition of files'; dolist.o:/opt/pidp11/systems/rsts101/rstsflx/dolist.c:16: first defined here /usr/bin/ld: doclean.o:/opt/pidp11/systems/rsts101/rstsflx/doclean.c:68: multiple definition ofcurprog'; dolist.o:/opt/pidp11/systems/rsts101/rstsflx/dolist.c:17: first defined here
/usr/bin/ld: doclean.o:/opt/pidp11/systems/rsts101/rstsflx/doclean.c:68: multiple definition of `curproj'; dolist.o:/opt/pidp11/systems/rsts101/rstsflx/dolist.c:17: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:58: flx] Error 1
A few other nits that wouldn't otherwise affect the build, but should also be fixed:
pi@PiDP11:/opt/pidp11/systems/rsts101/rstsflx# make depend
gcc -MM rstsflx.c fip.c rtime.c filename.c doget.c dolist.c doalloc.c docomp.c dotype.c doput.c dodump.c dodelete.c dorename.c dorts.c doprot.c dodir.c doident.c doinit.c dohook.c scancmd.c doclean.c fileio.c diskio.c unxabsio.c > flx.dep
make: *** No rule to make target 'depend'. Stop.
In the Makefile, "$(CC)"
rstsflx-bug.txt
is used properly except in the flx.dep: target, where there's a hard-coded "gcc".
This builds properly under FreeBSD 13.4 with an old gcc34 I've been dragging along to deal with recalcitrant programs like this.
I'm attempting to build rstsflx from the sources here on a Raspberry Pi running: Linux PiDP11 6.6.31+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux
There are several compiler warnings as well as a link failure. I'll attach a complete transcript, but the particular warnings / errors are:
rtime.c: In function ‘cvtdate’: rtime.c:21:17: warning: ‘memcpy’ reading 12 bytes from a region of size 10 [-Wstringop-overread] 21 | memcpy (buf, " none ", DATELEN); | ^
~~~~~~~~~scancmd.c: In function ‘initialize_readline’: scancmd.c:484:9: warning: ‘CPPFunction’ is deprecated [-Wdeprecated-declarations] 484 | rl_attempted_completion_function = (CPPFunction *)flx_completion; | ^
~~~~~~~/usr/bin/ld: doclean.o:/opt/pidp11/systems/rsts101/rstsflx/doclean.c:73: multiple definition of
files'; dolist.o:/opt/pidp11/systems/rsts101/rstsflx/dolist.c:16: first defined here /usr/bin/ld: doclean.o:/opt/pidp11/systems/rsts101/rstsflx/doclean.c:68: multiple definition of
curprog'; dolist.o:/opt/pidp11/systems/rsts101/rstsflx/dolist.c:17: first defined here /usr/bin/ld: doclean.o:/opt/pidp11/systems/rsts101/rstsflx/doclean.c:68: multiple definition of `curproj'; dolist.o:/opt/pidp11/systems/rsts101/rstsflx/dolist.c:17: first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:58: flx] Error 1A few other nits that wouldn't otherwise affect the build, but should also be fixed:
pi@PiDP11:/opt/pidp11/systems/rsts101/rstsflx# make depend gcc -MM rstsflx.c fip.c rtime.c filename.c doget.c dolist.c doalloc.c docomp.c dotype.c doput.c dodump.c dodelete.c dorename.c dorts.c doprot.c dodir.c doident.c doinit.c dohook.c scancmd.c doclean.c fileio.c diskio.c unxabsio.c > flx.dep make: *** No rule to make target 'depend'. Stop.
In the Makefile, "$(CC)" rstsflx-bug.txt is used properly except in the flx.dep: target, where there's a hard-coded "gcc".
This builds properly under FreeBSD 13.4 with an old gcc34 I've been dragging along to deal with recalcitrant programs like this.