I was trying to build the whio addion on Ubuntu 10.04 LTS and ran into
the following error.
I can probably suppress this error and try to build the code, but this
looks like bug in the source.
whio_amalgamation.c:18055: error: assuming signed overflow does not
occur when assuming that (X + c) < X is always false
if( (__typeof__(origin->inode->openCount)) (origin->inode-
Thanks, I'm sure that will work.
This also might work. (It's a pain since C doesn't have a portable way
to represent the max and min values for types. such as (maxof() and
minof()
> if( origin->inode->openCount == (uint8_t)( -1))
Also I'm trying to compile V8Convert to ARM. It appears that the make
files search for a compiler to use. I think these are the lines in
common.make that define the tool chain to use. Is this correct?
ShakeNMake.BINS.AR := $(call ShakeNMake.CALL.FIND_BIN,$(AR))
ShakeNMake.BINS.GCC := $(call ShakeNMake.CALL.FIND_BIN,gcc)
Matt
> if( origin->inode->openCount == (uint8_t)( -1))
ShakeNMake.BINS.AR := $(call ShakeNMake.CALL.FIND_BIN,$(AR))
ShakeNMake.BINS.GCC := $(call ShakeNMake.CALL.FIND_BIN,gcc)
I tried setting CC and CXX to my compiler and no love. I'll poke
more. Using my hack I was able to compile but then I get this.
MySQL is enabled, so we are NOT building a static library.
make[1]: Entering directory
`/home/dasfoo/workspace/JavascriptV8/cvv8/cvv8/addons/jspdo'
/armdev/G20/factory/build_armv5l-timesys-linux-uclibcgnueabi/toolchain/bin/armv5l-timesys-linux-uclibcgnueabi-gcc
-o js2c js2c.c
./js2c jspdoInitCode < jspdo-init.js > jspdo-init.cpp
/bin/bash: ./js2c: cannot execute binary file
I beleive what is going on is that js2c is a utility program. Which
normally gets compiled then run to do a build task. Problem is here
that it gets cross compiled then the build bombs out when it runs.
I beleive this is sort of reason Python is a pain to cross compile.
Anyways, heads up. I'll look into this.
Matt
./js2c jspdoInitCode < jspdo-init.js > jspdo-init.cpp
/bin/bash: ./js2c: cannot execute binary file
I beleive what is going on is that js2c is a utility program. Which
normally gets compiled then run to do a build task. Problem is here
that it gets cross compiled then the build bombs out when it runs.
Anyways, heads up. I'll look into this.
On Fri, Feb 24, 2012 at 10:09 AM, Matt Harper <mha...@tehamawireless.com> wrote:
./js2c jspdoInitCode < jspdo-init.js > jspdo-init.cpp
/bin/bash: ./js2c: cannot execute binary file
...
Your analysis is correct: js2c simply creates a C string from JS code. Parts of JSPDO are much easier to implement in JS, so part of the class-binding/setup is to execute the JS code (jspdo-init.js) which gets compiled into the binary at build-time.
> Your analysis is correct: js2c simply creates a C string from JS code. Parts
> of JSPDO are much easier to implement in JS, so part of the
> class-binding/setup is to execute the JS code (jspdo-init.js) which gets
> compiled into the binary at build-time.
Would it be okay to use a python script instead? I'm assuming to
build v8 you need python already so it aught to be installed.
> i unfortunately can't help much with cross-compilation problems - i have
> zero experience with cross-compiling. i am of course willing to make
> portability changes where it helps cross-compilation.
I do mostly embedded stuff so almost everything is cross compiled. In
general with gcc it's exactly the same, just a different tool chain.
I'll try hacking a python script js2c.py and see what happens
Matt
I wrote this little python script (attached) it assumes the data is
text and spits out a string constant. See attached. I read it in
with a test program and spit out the result and did a diff, no
changes. So I think works. I haven't be able to quite test it yet as
I need to rebuild my tool chains to support mysql.
Matt
Would it be okay to use a python script instead? I'm assuming to
build v8 you need python already so it aught to be installed.