OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

Trouble building LEF parser for macOS/Windows

Open nmoroze opened this issue 3 years ago • 1 comments

I noticed a couple errors in CI for the SiliconCompiler project when trying to build the si2 LEF parser out of src/odb/src/lef after updating to a recent version of OpenROAD. On macOS, the error is:

    /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-req-build-84dlzdxd/third_party/tools/openroad/tools/OpenROAD/src/odb/src/lef/lef/lefrReader.cpp:319:14: error: use of undeclared identifier 'lefyyparse'
        status = lefyyparse();

source

This seems to be related to this change, adding back the extern lefyyparse declaration fixes the error for me locally on my Macbook. Was there any reason for getting rid of this?

I figure since the build succeeds on macOS in OpenROAD CI, there's likely some problem in our machine configuration, but any insight you could provide would be appreciated.

On Windows we're getting a linker error I have not yet had time to to dig into. I know this isn't a supported platform, but I'd appreciate if you have any insight there as well:

    lef.lib(lef_keywords.cpp.obj) : error LNK2019: unresolved external symbol "union LefDefParser::YYSTYPE LefDefParser::lefyylval" (?lefyylval@LefDefParser@@3TYYSTYPE@1@A) referenced in function "int __cdecl LefDefParser::lefamper_lookup(char *)" (?lefamper_lookup@LefDefParser@@YAHPEAD@Z)

source

Thank you!

nmoroze avatar Mar 09 '22 21:03 nmoroze

What bison/flex are you using? I build using the homebrew versions with # flex/bison override apple version export PATH="/opt/homebrew/opt/bison/bin:$PATH" export PATH="/opt/homebrew/opt/flex/bin:$PATH"

to ignore the broken ones in /usr/bin installed by xcode.

jjcherry56 avatar Apr 04 '22 16:04 jjcherry56

Thank you! This does the trick. Sorry for not following up!

nmoroze avatar Feb 10 '23 19:02 nmoroze