TomWetmore / DeadEnds

Genealogical Software
2 stars 2 forks source link

Errors compiling DeadEnds on Xubuntu 22.04 LTS #2

Open ahomansikka opened 2 months ago

ahomansikka commented 2 months ago

This is probably not an DeadEnds error...

I had to remove file Parser/grammar.y before I could compile DeadEnds. It seems make in Xubuntu calls yacc even if it is not on makefile... See line 5.

clang -c -g -Wall -I. -I./Includes -I../DataTypes/Includes -I../Gedcom/Includes -I../Interp/Includes -I../Database/Includes -I../Utils/Includes parse.c clang -c -g -Wall -I. -I./Includes -I../DataTypes/Includes -I../Gedcom/Includes -I../Interp/Includes -I../Database/Includes -I../Utils/Includes lexer.c yacc grammar.y mv -f y.tab.c grammar.c clang -c -g -Wall -I. -I./Includes -I../DataTypes/Includes -I../Gedcom/Includes -I../Interp/Includes -I../Database/Includes -I../Utils/Includes grammar.c y.tab.c:143:5: error: expected identifier ICONS = 258, / ICONS / ^ ./y.tab.h:1:15: note: expanded from macro 'ICONS'

define ICONS 257

          ^

y.tab.c:144:5: error: expected identifier FCONS = 259, / FCONS / ^ ./y.tab.h:2:15: note: expanded from macro 'FCONS'

define FCONS 258

          ^

y.tab.c:145:5: error: expected identifier SCONS = 260, / SCONS / ^ ./y.tab.h:3:15: note: expanded from macro 'SCONS'

define SCONS 259

          ^

y.tab.c:146:5: error: expected identifier IDEN = 261, / IDEN / ^ ./y.tab.h:4:14: note: expanded from macro 'IDEN'

define IDEN 260

         ^

y.tab.c:147:5: error: expected identifier PROC = 262, / PROC / ^ ./y.tab.h:5:14: note: expanded from macro 'PROC'

define PROC 261

         ^

y.tab.c:148:5: error: expected identifier FUNC_TOK = 263, / FUNC_TOK / ^ ./y.tab.h:6:18: note: expanded from macro 'FUNC_TOK'

define FUNC_TOK 262

             ^

y.tab.c:149:5: error: expected identifier CHILDREN = 264, / CHILDREN / ^ ./y.tab.h:7:18: note: expanded from macro 'CHILDREN'

define CHILDREN 263

             ^

y.tab.c:150:5: error: expected identifier SPOUSES = 265, / SPOUSES / ^ ./y.tab.h:8:17: note: expanded from macro 'SPOUSES'

define SPOUSES 264

            ^

y.tab.c:151:5: error: expected identifier IF = 266, / IF / ^ ./y.tab.h:9:12: note: expanded from macro 'IF'

define IF 265

       ^

y.tab.c:152:5: error: expected identifier ELSE = 267, / ELSE / ^ ./y.tab.h:10:14: note: expanded from macro 'ELSE'

define ELSE 266

         ^

y.tab.c:153:5: error: expected identifier ELSIF = 268, / ELSIF / ^ ./y.tab.h:11:15: note: expanded from macro 'ELSIF'

define ELSIF 267

          ^

y.tab.c:154:5: error: expected identifier FAMILIES = 269, / FAMILIES / ^ ./y.tab.h:12:18: note: expanded from macro 'FAMILIES'

define FAMILIES 268

             ^

y.tab.c:155:5: error: expected identifier WHILE = 270, / WHILE / ^ ./y.tab.h:13:15: note: expanded from macro 'WHILE'

define WHILE 269

          ^

y.tab.c:156:5: error: expected identifier CALL = 271, / CALL / ^ ./y.tab.h:14:14: note: expanded from macro 'CALL'

define CALL 270

         ^

y.tab.c:157:5: error: expected identifier FORINDISET = 272, / FORINDISET / ^ ./y.tab.h:15:20: note: expanded from macro 'FORINDISET'

define FORINDISET 271

               ^

y.tab.c:158:5: error: expected identifier FORINDI = 273, / FORINDI / ^ ./y.tab.h:16:17: note: expanded from macro 'FORINDI'

define FORINDI 272

            ^

y.tab.c:159:5: error: expected identifier FORNOTES = 274, / FORNOTES / ^ ./y.tab.h:17:18: note: expanded from macro 'FORNOTES'

define FORNOTES 273

             ^

y.tab.c:160:5: error: expected identifier TRAVERSE = 275, / TRAVERSE / ^ ./y.tab.h:18:18: note: expanded from macro 'TRAVERSE'

define TRAVERSE 274

             ^

y.tab.c:161:5: error: expected identifier FORNODES = 276, / FORNODES / ^ ./y.tab.h:19:18: note: expanded from macro 'FORNODES'

define FORNODES 275

             ^

fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated.

ahomansikka commented 2 months ago

Google found a solution https://stackoverflow.com/questions/68006247/makefile-automatically-call-yacc

You are being bitten by one of make's built-in rules:

%.c: %.y

recipe to execute (built-in):

     $(YACC.y) $<
     mv -f y.tab.c $@

You'll have to cancel the built-in rule by declaring it without any recipe like this:

%.c: %.y

TomWetmore commented 2 months ago

Thanks for tracking that down. I'll update the makefile on next submission.