I would like to run OpenEMM on 64-bit Gentoo. Following the install instructions, I downloaded the source package and tried to compile it. The compilation ran into many errors, starting like this:
[mkdir] Created dir: /home/pmw/openemm/build/OpenEMM-2011-bin/webapps/openemm/WEB-INF/classes
[javac] /home/pmw/openemm/OpenEMM-2011-src/openemm_build.xml:55: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last;
set to false for repeatable builds
[javac] Compiling 575 source files to /home/pmw/openemm/build/OpenEMM-2011-bin/webapps/openemm/WEB-INF/classes
[javac] /home/pmw/openemm/src/OpenEMM-2011-src/src/java/org/agnitas/actions/ActionOperation.java:26: package org.springframework.context does not
exist
[javac] import org.springframework.context.ApplicationContext;
[javac] ^
[javac] /home/pmw/openemm/src/OpenEMM-2011-src/src/java/org/agnitas/actions/ActionOperation.java:34: cannot find symbol
[javac] symbol : class ApplicationContext
[javac] location: class org.agnitas.actions.ActionOperation
[javac] public abstract boolean executeOperation(ApplicationContext con, int companyID, HashMap params);
[javac] ^
[javac] /home/pmw/openemm/src/OpenEMM-2011-src/src/java/org/agnitas/actions/EmmAction.java:29: package org.springframework.context does not exist
[javac] import org.springframework.context.ApplicationContext;
[javac] ^
[javac] /home/pmw/openemm/src/OpenEMM-2011-src/src/java/org/agnitas/actions/EmmAction.java:52: cannot find symbol
[javac] symbol : class ApplicationContext
[javac] location: interface org.agnitas.actions.EmmAction
[javac] boolean executeActions(ApplicationContext con, HashMap params);
[javac] ^
[javac] /home/pmw/openemm/src/OpenEMM-2011-src/src/java/org/agnitas/actions/impl/EmmActionImpl.java:31: package org.springframework.context does not exist
[javac] import org.springframework.context.ApplicationContext;
[javac] ^
I compile OpenEMM 2013 R2, everything seems to be ok. But it occurs an issue as follow,
===
[exec] gcc -I../lib -I/home/oe/include -pthread -c -o bav.o bav.c
[exec] In file included from bav.h:25:0,
[exec] from bav.c:30:
[exec] ../lib/agn.h:139:2: error: expected identifier before numeric constant
[exec] make: *** [bav.o] Error 1
[exec] Result: 2
BUILD FAILED
/home/oe/src/OpenEMM-2013_R2-src/openemm_build.xml:148: Warning: Could not find resource file "/home/oe/src/OpenEMM-2013_R2-src/src/c/bav/bav" to copy.
===
When opening file agn.h, line 139, I see this. I dont know why. I compile on ubuntu 12.04 64bit.
===
typedef enum { /*{{{*/
false,
true
/*}}}*/
} bool_t;
===
Looks like some other include file already defines "false", 'true" or "bool_t". So please try these steps:
- Change to the source directory for bav.c
- Start the command: gcc -E -I../lib -I/home/oe/include -pthread -c -o bav.i bav.c
- Look into the file "bav.i" for the occurrence of bool_t to see where and how it is defined.