Skip to content

Unable to rebar compile on Mac OS - Erlang OTP R17 #38

Description

@mtourne

The command rebar -v compile will fail this way

INFO:  sh info:
    cwd: "/Users/mtourne/dev/yawndb/deps/ecirca"
    cmd: $CC $ERL_CFLAGS -P -D BITNESS=12 -E priv/ecirca.c  > c_src/ecirca_small.c
priv/ecirca.c:4:10: fatal error: 'erl_nif.h' file not found
#include "erl_nif.h"

Running rebar -vv compile I can see that ERL_FLAGS is set this way :

{"ERL_CFLAGS",
                   " -I\"/usr/local/Cellar/erlang/17.3.4/lib/erlang/lib/erl_interface-3.7.19/include\" -I\"/usr/local/Cellar/erlang/17.3.4/lib/erlang/erts-6.2.1/include\"  "},

Where it gets bizarre, is I can get passed this error if I set ERL_FLAGS manually to this :

ERL_CFLAGS=-I/usr/local/Cellar/erlang/17.3.4/lib/erlang/erts-6.2.1/include rebar -v compile

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions