Wednesday, June 8, 2011

Ubuntu 10.04: Failed to compile rebar files! (redefining macro "DEPRECATED")

Update July 2011:
Install Erlang R14B03 and use the latest rebar from github. It now works.
(Thanks enri for commenting.)


Ignore old stuff below:

I was getting this error trying to compile rebar for Erlang project management:

Recompile: src/rebar
include/rebar.hrl:17: redefining macro ''DEPRECATED''
Failed to compile rebar files!

The only google result was http://www.zelfendo.tk/blog/?p=433 in Chinese.

The summary of how to fix:
  1. Don't use https://github.com/basho/rebar; do use: hg clone https://bitbucket.org/basho/rebar
  2. sudo apt-get install erlang m4 fop xsltproc unixodbc libssl-dev unixodbc-dev openjdk-6-jdk freeglut3-dev libwxgtk2.8-dev libncurses5-dev build-essential

1 comment:

  1. The problem is in the file include/rebar.hrl
    I've removed the second definition of DEPRECATED (arity 4) and then it compiled.

    ReplyDelete