Skip to content

Trouble building on Mac OS X El Capitan #83

@anirudhSK

Description

@anirudhSK

I am having some trouble building on Mac OS X.

  1. It complains of yellow and yylval not being defined. For instance,

CXX tools/ir-generator/ir-generator.o
In file included from ../tools/ir-generator/ir-generator.ypp:120:
:857:1: error: use of undeclared identifier 'yylloc'
YY_RULE_SETUP
^
:760:2: note: expanded from macro 'YY_RULE_SETUP'
YY_USER_ACTION
^
../tools/ir-generator/ir-generator-lex.l:5:7: note: expanded from macro 'YY_USER_ACTION'
yylloc = Util::SourceInfo(tmp, Util::InputSources::instance->getCurrentPosition()); }

1. I "fixed" this by adding two extern declarations at the top of tools/ir-generator/ir-generator-lex.l

extern YYSTYPE yylval;
extern YYLTYPE yylloc;

Not sure if this was correct, but it moved on.

  1. Then, I ran into this. It seems like a value is being substituted for a template parameter, where it is expecting a type.

In file included from ../ir/ir.h:42:
../ir/nodemap.h:22:10: error: declaration of anonymous class must be a definition
template<class KEY, class VALUE,
^
../ir/nodemap.h:22:32: error: a non-type template parameter cannot have type 'class VALUE'
template<class KEY, class VALUE,
^
../ir/nodemap.h:25:55: error: expected a type
class ALLOC = std::allocator<std::pair<const KEY * const, const VALUE *>>>
^
frontends/p4/p4-parse.cpp:161:13: note: expanded from macro 'KEY'

define KEY 290

        ^

There are more errors, possibly resulting from the same cause, attached in the file here.
err.txt

  1. I seem to run into these where I use g++ or clang++ on Mac (specified using CXX="..." ./boostrap.sh).

Not sure if this is important, but I use ports, not brew for installing bison, flex, boost, and auto tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions