k7
k7 copied to clipboard
lib/core/extend/extend.cpp:18: error: ‘EXTEND_JS’ was not declared in this scope
Traceback (most recent call last):
File "tools/js2h", line 25, in <module>
for c in jsmin.jsmin(f.read()):
AttributeError: 'module' object has no attribute 'jsmin'
g++ -DK7_VERSION=20100617 -g -DSTATIC -DWITH_LIBTASK -DWITH_LIBNODE -DEV_MULTIPLICITY=0 -Ideps/v8/include -Isrc -Ideps -Ideps/node -Ideps/node/src -Ideps/node/deps/coupling -Ideps/node/deps/evcom -Ideps/node/deps/http_parser -Ideps/node/deps/libeio -Ideps/node/deps/libev -Ideps/node/deps/udns -Ideps/node/build/default/src -Ibuild/include/core/extend/ -c lib/core/extend/extend.cpp -o build/core/extend/extend.o
lib/core/extend/extend.cpp: In function ‘v8::Handle<v8::Object> core_extend(v8::Handle<v8::Object>)’:
lib/core/extend/extend.cpp:18: error: ‘EXTEND_JS’ was not declared in this scope
make: *** [build/core/extend/extend.o] Error 1
This issue seems to be caused by k7's dependency on the bleeding edge branch of v8. The http://v8.googlecode.com/svn/branches/bleeding_edge/tools/jsmin.py module changed in r2959 to remove the jsmin function. The patch which fixes this for me is this:
diff --git a/tools/js2h b/tools/js2h
index f0e0c91..a644d6c 100755
--- a/tools/js2h
+++ b/tools/js2h
@@ -22,7 +22,8 @@ else:
name = os.path.basename(source).replace(".","_").upper()
f = file(source,'r')
r = []
- for c in jsmin.jsmin(f.read()):
+ minifier = jsmin.JavaScriptMinifier()
+ for c in minifier.JSMinify(f.read()):
if c == "'":
r.append("'\\''")
else: