Open Ella-0 opened 4 years ago
This is not a complete bug report. And I cannot reproduce this on either Debian 10.5 or the latest Termux. So help me help you. What distro are you using? What is your libc? What yacc are you using to build? What version of lex are you using?
A quick googling suggests that this is a bug in flex.
I'm using my own distro, I'm using musl libc, byacc and sabotage-linux lex which is based off heirloom lex.
And yes I do think lex is the issue. It built fine in the baseutils tree.
Right I've finally gotten around to fixing this (kinda), I made the following really hacky patch to allow me to build this without flex so I can build flex with this. This is by no means the quality required to be merged but I think it's useful to have it here for people who try to do a similar thing to me.
--- om4-6.7/expr.c
+++ om4-6.7.old/expr.c
@@ -23,7 +23,18 @@
int32_t end_result;
const char *copy_toeval;
-extern void yy_scan_string(const char *);
+extern void yylex();
+extern FILE *yyin;
+
+void yy_scan_string(const char *str) {
+ yyin = fopen("/tmp/yyin", "rw");
+ fputs(str, yyin);
+ fclose(yyin);
+ yyin = fopen("/tmp/yyin", "ro");
+ yylex();
+ fclose(yyin)
+}
+
extern int yyparse(void);
int
My deepest apologies for the way I created this issue it was not very professional of me and sorry for leaving this open for so long.
I get a linker error when building on Linux.