Re: [AMBER] Probmlems compiling under macOS

From: Gustaf Olsson <>
Date: Mon, 8 Feb 2021 10:26:48 +0000

After feeling confident in confirming the compilation process, I updated my workstation to macOS Catalina 10.15.7 and Xcode Version 12.4 (12D4e)

Following the same procedure as on my personal mac, the process initially failed. I proceeded to rebuild my package install base and tried again without success. I am again arriving at this error:

    amber20_src/build/AmberTools/src/leap/src/leap/ error: implicit declaration of
          function 'yylex' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          yychar = YYLEX;
    amber20_src/build/AmberTools/src/leap/src/leap/ note: expanded from macro 'YYLEX'
    # define YYLEX yylex ()
    amber20_src/build/AmberTools/src/leap/src/leap/ error: implicit declaration of
          function 'yyerror' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          yyerror (YY_("syntax error"));
    amber20_src/build/AmberTools/src/leap/src/leap/ error: implicit declaration of
          function 'yyerror' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
      yyerror (YY_("memory exhausted"));
    3 errors generated.
    make[2]: *** [AmberTools/src/leap/src/leap/CMakeFiles/leap_leap_obj.dir/] Error 1
    make[1]: *** [AmberTools/src/leap/src/leap/CMakeFiles/leap_leap_obj.dir/all] Error 2
    make: *** [all] Error 2

I remember that this seemed to indicate something with bison/yacc/lex causing some problem, I have removed most packages not directly needed and as far as I can see I am using apple built in versions (bison/yacc/lex/flex) also allowing conda to install all the appropriate dependencies.

I am stumped, rebooting did not solve the issue and as far as I can see I am up to date on everything except my OS and using apple default/built in software except for gfortran where I am at version 9.3.0. Any suggestions on how to proceed or what could cause this is appreciated.

Best regards
// Gustaf

On 14 Jan 2021, at 07:32, Gustaf Olsson <<>> wrote:

I rebuilt my entire package system and now I managed to compile serial using clang/clang++ and gfortran-9 from homebrew.

I have not been able to identify the root cause for the problems I was having though it was definitely caused by something related to homebrew.

Best regards
// Gustaf
Från: David A Case <<>>
Skickat: den 11 januari 2021 14:11:29
Till: AMBER Mailing List
Ämne: Re: [AMBER] Probmlems compiling under macOS

On Sun, Jan 10, 2021, Gustaf Olsson wrote:
> find . -name "parser.y"
> ./AmberTools/src/leap/src/leap/parser.y
> ls -la /AmberTools/src/leap/src/leap/parser.y

You left out the "."


AMBER mailing list<>

AMBER mailing list
Received on Mon Feb 08 2021 - 02:30:02 PST
Custom Search