Archie Cobbs wrote:
Jean-frederic Clere wrote:
Archie Cobbs wrote:
For anyone who wants to play with the JCHEVM contribution, the code in
https://svn.apache.org/repos/asf/incubator/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm
should now be buildable and runnable (on x86 machines only).
I have probably done something wrong:
+++
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I./native -I./arch
-I/opt/SMAWPlus/openssl/include -I/opt/SMAWPlus/include -g -O2 -g -O3
-pipe -Wall -Waggregate-return -Wcast-align -Wchar-subscripts
-Wcomment -Wformat -Wimplicit -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wno-long-long -Wparentheses
-Wpointer-arith -Wredundant-decls -Wreturn-type -Wswitch -Wtrigraphs
-Wuninitialized -Wunused -Wwrite-strings
-D_AC_INCLUDEDIR=\"/usr/local/include\"
-D_AC_DATADIR=\"/usr/local/share\" -D_AC_LIBDIR=\"/usr/local/lib\"
-D_AC_SYSCONFDIR=\"/usr/local/etc\"
-D_JC_CLASSPATH_HOME=\"/usr/local/classpath\"
-D_JC_BOOTSTRAP_JAVA=\"/home/jfclere/JAVA/j2sdk1.4.2_06/bin/java\"
-D_JC_GNU_COMPILER=\"/usr/bin/gcc\" -g -O2 -MT vm.lo -MD -MP -MF
.deps/vm.Tpo -c vm.c -fPIC -DPIC -o .libs/vm.o
vm.c:22:30: java_lang_Thread.h: No such file or directory
vm.c: In function `_jc_create_vm':
vm.c:215: `java_lang_Thread_MIN_PRIORITY' undeclared (first use in
this function)
vm.c:215: (Each undeclared identifier is reported only once
vm.c:215: for each function it appears in.)
vm.c:216: `java_lang_Thread_MAX_PRIORITY' undeclared (first use in
this function)
vm.c:217: `java_lang_Thread_NORM_PRIORITY' undeclared (first use in
this function)
make[2]: *** [vm.lo] Error 1
make[2]: Leaving directory
`/home/jfclere/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/jfclere/harmony/enhanced/trunk/sandbox/contribs/jchevm/jchevm/libjc'
make: *** [all-recursive] Error 1
+++
Any hints?
Yes.. you are trying to build from the SVN checkout rather than
creating a distribution first and building from that.. see instructions
in APACHE.README for how to build the distribution first, etc.
Oops I used etc/regen.sh instead of etc/makedist.sh... Big fingers.
A -ldl is missing somewhere I have used:
+++
sudo sh etc/makedist.sh
./configure --with-classpath=/usr/local/classpath
CPPFLAGS="-I/opt/SMAWPlus/openssl/include -I/opt/SMAWPlus/include"
LDFLAGS="-L/opt/SMAWPlus/openssl/lib -L/opt/SMAWPlus/lib -ldl"
make
+++
And it works ;-)))
This is a result of the fact that in order to avoid stale/redundant info,
some files required for build are not checked in, e.g., the jcjavah
generated native header files (which is what is causing the above
failure).
-Archie
__________________________________________________________________________
Archie Cobbs * CTO, Awarix *
http://www.awarix.com