Skip to content

libvroomjs fails to build on linux #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sladiri opened this issue Nov 27, 2015 · 3 comments
Closed

libvroomjs fails to build on linux #202

sladiri opened this issue Nov 27, 2015 · 3 comments

Comments

@sladiri
Copy link

sladiri commented Nov 27, 2015

I followed the guide to use ReactJS on Linux, http://reactjs.net/guides/mono.html
I checked out V8 tag/3.17.16.2 and built it.

Building libvroomjs failed, attached is the console output from the command
g++ jscontext.cpp jsengine.cpp managedref.cpp bridge.cpp jsscript.cpp -o libVroomJsNative.so -shared -L /home/sladjan/ReactJS/v8-3.17/out/native/lib.target/ -I /home/sladjan/ReactJS/v8-3.17/include/ -fPIC -Wl,--no-as-needed -L:/usr/local/lib/libv8.so.3.17.16.2 2> err.txt
The error:

jsengine.cpp:260:34: error: ‘memset’ was not declared in this scope
  memset(error, 0, sizeof(jserror));
                                  ^

I added #include <cstring> which allowed me to build libVroomJsNative.so.
err.txt

@Daniel15
Copy link
Member

So you were able to compile it once you added #include <cstring>? If so, I can update the code and/or the instructions.

@sladiri
Copy link
Author

sladiri commented Nov 28, 2015

Yes, I was. It compiled fine, the output file was there.

diff --git a/libvroomjs/jsengine.cpp b/libvroomjs/jsengine.cpp
index 96160f0..40009d6 100644
--- a/libvroomjs/jsengine.cpp
+++ b/libvroomjs/jsengine.cpp
@@ -1,6 +1,7 @@

 #include <iostream>
 #include "vroomjs.h"
+#include <cstring>

 long js_mem_debug_engine_count;

@Daniel15
Copy link
Member

Thanks, I've added the missing #include <cstring> and also updated the instructions on the site to explicitly check out V8 version 3.17.16.2. Let me know if you see any other issues. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants