Closed andresriancho closed 10 years ago
Just to quickly verify...
src/qt/lib/libQtWebKit.a
?nm -C src/qt/lib/libQtWebKit.a | grep QWebFrame::evaluateJavaScript
for your reference, I got this is RHEL:
0000000000000000 T QWebFrame::evaluateJavaScript(QString const&, QString const&)
does the build step compile src/qt/lib/libQtWebKit.a ?
No, find . -name libQtWebKit.a
returns nothing.
@neraliu Issue is reproducible in this travis job: https://travis-ci.org/yukinying/tpjs/builds/22235114
Tried to change the QMAKE_LFLAGS, as explained here https://github.com/ariya/phantomjs/issues/10635 and failed too:
--- a/src/qt/src/3rdparty/webkit/Source/common.pri
+++ b/src/qt/src/3rdparty/webkit/Source/common.pri
@@ -6,7 +6,7 @@ contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0
linux-g++ {
isEmpty($$(SBOX_DPKG_INST_ARCH)):exists(/usr/bin/ld.gold) {
message(Using gold linker)
- QMAKE_LFLAGS+=-fuse-ld=gold
+ #QMAKE_LFLAGS+=-fuse-ld=gold
}
}
Cause of it:
../../JavaScriptCore/runtime/JSGlobalData.cpp:148:5: error: size of array
‘dummysizeof_JSString_must_be_less_than_storage’ is negative
Seems it is compiling the 64 bit library and JSString size is larger than the asserted value. @neraliu , do we have the compiling instruction for 32 bit binary over a 64 bit environment?
Btw, we are working on moving our logic away from tamping the JSGlobalData. (See #4)
All right, so when #4 is fixed, it should build on 64bit?
Yes, absolutely.
just give u the quick solution first, we will move back the configuration in qmake later.
quick solution
Both files looked the same:
#define JSC_TAINTED_32 1
// #define JSC_TAINTED_64 1
Which match what you say "make sure JSC_TAINTED_32 is defined". Since I didn't change any files, I suspect you intended me to do the opposite. Changed to:
//#define JSC_TAINTED_32 1
#define JSC_TAINTED_64 1
Run ./build.sh
and now it works!
rodrigo@foobar:~/tpjs$ ./bin/phantomjs
phantomjs>
My box is
Linux foobar 3.2.0-60-generic #91-Ubuntu SMP Wed Feb 19 03:54:44 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Experience similar to that of Andres - was able to compile after changing 32 to 64 in several #defines:
diff --git a/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/config.h b/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/config.h
index 6a53b39..067b394 100644
--- a/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/config.h
+++ b/src/qt/src/3rdparty/webkit/Source/JavaScriptCore/config.h
@@ -134,14 +134,14 @@
#if !defined(JSC_TAINTED)
#define JSC_TAINTED 1
-#define JSC_TAINTED_32 1
+#define JSC_TAINTED_64 1
// #define JSC_TAINTED_64 1
// if I use 16 bits for storing the tainted number, i can identify 2^16 sources. it is enough for most of the use case.
/*
| 8 bits | 8 bits | 8 bits | 8 bits |
- the last 16 bits is used for carrying the tainted number for identifying how the sources and sinks.
*/
-#define JSC_TAINTED_BIT 32
+#define JSC_TAINTED_BIT 64
#define JSC_TAINTED_MAX 0xffff
// the debug flag of the hack
// #define JSC_TAINTED_DEBUG 1
diff --git a/src/qt/src/3rdparty/webkit/Source/WebCore/config.h b/src/qt/src/3rdparty/webkit/Source/WebCore/config.h
index ed0a951..ff8adfc 100644
--- a/src/qt/src/3rdparty/webkit/Source/WebCore/config.h
+++ b/src/qt/src/3rdparty/webkit/Source/WebCore/config.h
@@ -263,14 +263,14 @@ typedef float CGFloat;
#if !defined(JSC_TAINTED)
#define JSC_TAINTED 1
-#define JSC_TAINTED_32 1
+#define JSC_TAINTED_64 1
// #define JSC_TAINTED_64 1
// if I use 16 bits for storing the tainted number, i can identify 2^16 sources. it is enough for most of the use case.
/*
| 8 bits | 8 bits | 8 bits | 8 bits |
- the last 16 bits is used for carrying the tainted number for identifying how the sources and sinks.
*/
-#define JSC_TAINTED_BIT 32
+#define JSC_TAINTED_BIT 64
#define JSC_TAINTED_MAX 0xffff
// the debug flag of the hack
#define JSC_TAINTED_DEBUG 1
can u try this branch and see on 64 bit platform? https://github.com/neraliu/tpjs/tree/rhel64-64-devel
You guys should configure travis so that all your branches, including this one for 64bit experiments, are built. I don't see any builds for it here: https://travis-ci.org/yukinying/tpjs
With the latest changes in the rhel64-64-devel branch, it is building properly. Leaving this one open so you guys remember to:
yes. i will do it next
i am closing this issue as it is done, and have created the issue #13 and #14 to follow up
I'm on linux ubuntu 12.04 LTS, follow the instructions in http://phantomjs.org/build.html to install the build dependencies after a couple of minutes of building I get:
Any ideas on what's wrong?