Re: [AMBER] Probmlems compiling under macOS

From: David A Case <david.case.rutgers.edu>
Date: Sun, 10 Jan 2021 08:46:50 -0500

On Sun, Jan 10, 2021, Gustaf Olsson wrote:
>
> /Users/xxx/amber20_src/build/AmberTools/src/leap/src/leap/y.tab.c:1852:3: error: implicit declaration of function 'yyerror' is invalid in C99
> [-Werror,-Wimplicit-function-declaration]
> yyerror (YY_("memory exhausted"));

Have you installed some non-standard version of bison or yacc? I've never
done anything but use the programs in /usr/bin, and have not seen the error
you report, on either Catalina or Big Sur.

Look at your y.tab.c file, and search for "yyerror". You should see a line
like this:

static int yyerror( char *sStr );

In my code, it's at line 235, but I see the line cited above at line 1854,
not 1852, so our line numbers might be off.

The declaration of yyerror() comes from parser.y, at line 199.

You continue to find novel problems! :-) On Catalina, I use either XCode
11.3 -> Apple clang version 11.0.0 (clang-1100.0.33.16) or
gcc -> gcc-mp-9 (MacPorts gcc9 9.3.0_4) 9.3.0.

>I tried building with gcc-9 only though I received some error with
>memgen/memembed complaining about architecture and more.

Another problem that doesn't arise for me.

...not sure this is any help, unless it turns out to be a bison/yacc
problem. I'm attaching my (Catalina) version of y.tab.c, so you can make a
comparison.

...good luck...dac



_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber

Received on Sun Jan 10 2021 - 06:00:04 PST
Custom Search