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

rstsflx compile / link error on modern Linux #21

Open
Terry-Kennedy opened this issue Sep 5, 2024 · 1 comment
Open

rstsflx compile / link error on modern Linux #21

Terry-Kennedy opened this issue Sep 5, 2024 · 1 comment

Comments

@Terry-Kennedy
Copy link

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 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.

@Terry-Kennedy
Copy link
Author

I have no idea why GitHub decided to insert a link to my attachment in the middle of a sentence, but there it is.

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

1 participant