davisp / emonk

Emonk!
http://github.com/davisp/emonk/
Other
42 stars 7 forks source link

can't build in ubuntu lucid #1

Closed benoitc closed 14 years ago

benoitc commented 14 years ago

Tried to build on ubuntu lucid with xulrunner 1.9.2.2 and got :

$ make make all-recursive make[1]: Entering directory /home/benoitc/work/emonk' Making all in src/emonk make[2]: Entering directory/home/benoitc/work/emonk/src/emonk' Making all in priv make[3]: Entering directory /home/benoitc/work/emonk/src/emonk/priv' /bin/bash ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../.. -D_XOPEN_SOURCE -L/usr/lib/xulrunner-1.9.2.2 -L/usr/local/lib -L/opt/local/lib -I/usr/local/lib/erlang/usr/include -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include -I/opt/local/lib/erlang/usr/include -I/usr/include/xulrunner-1.9.2.2 -DXP_UNIX -g -O2 -MT emonk.lo -MD -MP -MF .deps/emonk.Tpo -c -o emonk.lo emonk.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. -D_XOPEN_SOURCE -L/usr/lib/xulrunner-1.9.2.2 -L/usr/local/lib -L/opt/local/lib -I/usr/local/lib/erlang/usr/include -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include -I/opt/local/lib/erlang/usr/include -I/usr/include/xulrunner-1.9.2.2 -DXP_UNIX -g -O2 -MT emonk.lo -MD -MP -MF .deps/emonk.Tpo -c emonk.c -fPIC -DPIC -o .libs/emonk.o In file included from emonk.h:8, from emonk.c:4: emonk_util.h:13: error: expected specifier-qualifier-list before ‘uint’ emonk.c: In function ‘init_vm’: emonk.c:30: error: ‘emonk_settings_t’ has no member named ‘rt_max_bytes’ emonk.c:33: error: ‘emonk_settings_t’ has no member named ‘gc_max_bytes’ emonk.c:34: error: ‘emonk_settings_t’ has no member named ‘gc_max_malloc’ emonk.c:36: error: ‘emonk_settings_t’ has no member named ‘context_stack’ make[3]: *** [emonk.lo] Error 1 make[3]: Leaving directory/home/benoitc/work/emonk/src/emonk/priv' make[2]: * [all-recursive] Error 1 make[2]: Leaving directory `/home/benoitc/work/emonk/src/emonk' make[1]: * [all-recursive] Error 1 make[1]: Leaving directory`/home/benoitc/work/emonk' make: *\ [all] Error 2 benoitc@benoitc-de

davisp commented 14 years ago

Does something like this work?

diff --git a/src/emonk/priv/emonk_util.h b/src/emonk/priv/emonk_util.h index 9a50776..f2d36cf 100644 --- a/src/emonk/priv/emonk_util.h +++ b/src/emonk/priv/emonk_util.h @@ -2,6 +2,10 @@

ifndef EMONK_UTIL_H

define EMONK_UTIL_H

+#ifndef uint +typedef unsigned int uint; +#endif +

define RT_MAX_BYTES 1048576

define GC_MAX_BYTES 8388608

define GC_MAX_MALLOC 8388608

@@ -18,4 +22,4 @@ typedef struct _emonk_settings_t

int parse_settings(char* cmd, emonk_settings_t* settings);

-#endif // Included util.h \ No newline at end of file +#endif // Included util.h

davisp commented 14 years ago

Lets try that again:

diff --git a/src/emonk/priv/emonk_util.h b/src/emonk/priv/emonk_util.h
index 9a50776..f2d36cf 100644
--- a/src/emonk/priv/emonk_util.h
+++ b/src/emonk/priv/emonk_util.h
@@ -2,6 +2,10 @@
 #ifndef EMONK_UTIL_H
 #define EMONK_UTIL_H

+#ifndef uint
+typedef unsigned int uint;
+#endif
+
 #define RT_MAX_BYTES 1048576
 #define GC_MAX_BYTES 8388608
 #define GC_MAX_MALLOC 8388608
@@ -18,4 +22,4 @@ typedef struct _emonk_settings_t

 int parse_settings(char* cmd, emonk_settings_t* settings);

-#endif // Included util.h
\ No newline at end of file
+#endif // Included util.h
benoitc commented 14 years ago

better that my pull request. It fixes build anyway.

davisp commented 14 years ago

This should be fixed on HEAD. Let me know if there are any other build issues.