I wanted to compile ucblogo v6.2.5 without wxwidgets but with x11 enabled as emacs (yes, the 40+ year old editor) logo-mode requires the "terminal" version of ucblogo for bidirectional communication between the logo interpreter and the editor.
I was able to compile v6.2.4 with a previous gcc version years ago but miserably failed trying to compile v6.2.5 with gcc 15.2.1 and the configure options in the title on CachyOS Linux.
Error messages are:
term.c: In function 'term_init':
term.c:147:17: error: 'TIOCGETP' undeclared (first use in this function); did you mean 'TIOCGETD'?
147 | ioctl(0,TIOCGETP,(char *)(&tty_cooked));
| ^~~~~~~~
| TIOCGETD
term.c:147:17: note: each undeclared identifier is reported only once for each function it appears in
term.c:148:22: error: 'tty_cooked' has an incomplete type 'struct sgttyb'
148 | tty_cbreak = tty_cooked;
| ^~~~~~~~~~
term.c:148:20: error: 'tty_cbreak' has an incomplete type 'struct sgttyb'
148 | tty_cbreak = tty_cooked;
| ^
term.c:149:19: error: invalid use of undefined type 'struct sgttyb'
149 | tty_cbreak.sg_flags |= CBREAK;
| ^
term.c:149:32: error: 'CBREAK' undeclared (first use in this function); did you mean 'CBRK'?
149 | tty_cbreak.sg_flags |= CBREAK;
| ^~~~~~
| CBRK
term.c:150:19: error: invalid use of undefined type 'struct sgttyb'
150 | tty_cbreak.sg_flags &= ~ECHO;
| ^
term.c:150:33: error: 'ECHO' undeclared (first use in this function)
150 | tty_cbreak.sg_flags &= ~ECHO;
| ^~~~
term.c: In function 'charmode_on':
term.c:206:17: error: 'TIOCSETP' undeclared (first use in this function); did you mean 'TIOCSETD'?
206 | ioctl(0,TIOCSETP,(char *)(&tty_cbreak));
| ^~~~~~~~
| TIOCSETD
term.c: In function 'charmode_off':
term.c:222:17: error: 'TIOCSETP' undeclared (first use in this function); did you mean 'TIOCSETD'?
222 | ioctl(0,TIOCSETP,(char *)(&tty_cooked));
| ^~~~~~~~
| TIOCSETD
term.c: At top level:
term.c:88:15: error: storage size of 'tty_cooked' isn't known
88 | struct sgttyb tty_cooked, tty_cbreak;
| ^~~~~~~~~~
term.c:88:27: error: storage size of 'tty_cbreak' isn't known
88 | struct sgttyb tty_cooked, tty_cbreak;
| ^~~~~~~~~~
I found various hints that describe the error messages and how to get rid of them with AI support, but I took me hours of debugging resulting in new errors.
I also tried the "use_termios" branch of the github repository where - at least - I was able to compile the code unfortunately with tons of "undefined reference" errors.
Hence, my kind request for help. Anybody out there who knows what could be done here ?
Many thanks in advance,
wolfgang_pauli
I wanted to compile ucblogo v6.2.5 without wxwidgets but with x11 enabled as emacs (yes, the 40+ year old editor) logo-mode requires the "terminal" version of ucblogo for bidirectional communication between the logo interpreter and the editor.
I was able to compile v6.2.4 with a previous gcc version years ago but miserably failed trying to compile v6.2.5 with gcc 15.2.1 and the configure options in the title on CachyOS Linux.
Error messages are:
term.c: In function 'term_init':
term.c:147:17: error: 'TIOCGETP' undeclared (first use in this function); did you mean 'TIOCGETD'?
147 | ioctl(0,TIOCGETP,(char *)(&tty_cooked));
| ^~~~~~~~
| TIOCGETD
term.c:147:17: note: each undeclared identifier is reported only once for each function it appears in
term.c:148:22: error: 'tty_cooked' has an incomplete type 'struct sgttyb'
148 | tty_cbreak = tty_cooked;
| ^~~~~~~~~~
term.c:148:20: error: 'tty_cbreak' has an incomplete type 'struct sgttyb'
148 | tty_cbreak = tty_cooked;
| ^
term.c:149:19: error: invalid use of undefined type 'struct sgttyb'
149 | tty_cbreak.sg_flags |= CBREAK;
| ^
term.c:149:32: error: 'CBREAK' undeclared (first use in this function); did you mean 'CBRK'?
149 | tty_cbreak.sg_flags |= CBREAK;
| ^~~~~~
| CBRK
term.c:150:19: error: invalid use of undefined type 'struct sgttyb'
150 | tty_cbreak.sg_flags &= ~ECHO;
| ^
term.c:150:33: error: 'ECHO' undeclared (first use in this function)
150 | tty_cbreak.sg_flags &= ~ECHO;
| ^~~~
term.c: In function 'charmode_on':
term.c:206:17: error: 'TIOCSETP' undeclared (first use in this function); did you mean 'TIOCSETD'?
206 | ioctl(0,TIOCSETP,(char *)(&tty_cbreak));
| ^~~~~~~~
| TIOCSETD
term.c: In function 'charmode_off':
term.c:222:17: error: 'TIOCSETP' undeclared (first use in this function); did you mean 'TIOCSETD'?
222 | ioctl(0,TIOCSETP,(char *)(&tty_cooked));
| ^~~~~~~~
| TIOCSETD
term.c: At top level:
term.c:88:15: error: storage size of 'tty_cooked' isn't known
88 | struct sgttyb tty_cooked, tty_cbreak;
| ^~~~~~~~~~
term.c:88:27: error: storage size of 'tty_cbreak' isn't known
88 | struct sgttyb tty_cooked, tty_cbreak;
| ^~~~~~~~~~
I found various hints that describe the error messages and how to get rid of them with AI support, but I took me hours of debugging resulting in new errors.
I also tried the "use_termios" branch of the github repository where - at least - I was able to compile the code unfortunately with tons of "undefined reference" errors.
Hence, my kind request for help. Anybody out there who knows what could be done here ?
Many thanks in advance,
wolfgang_pauli