Hi ,
I have cross compiled the node binary and it work fine with the version
nodev.0.8.
Now i have a c++ api whcih has to interfaced with Java.
So i wrote a *.cc and a wscript file.
now running "node-waf configure build" does not throw any error and i get a
new *.node file created inside the ./build/Release/.
Which i copied *.node file from Ubuntu to the Hardware throws the following
error
*root@bosch-nemid:~/Release-2# node ARM.js*
*[ 2971.577489] Alignment trap: not handling instruction e1923f9f at
[<ffff0fc4>]*
*[ 2971.586303] Unhandled fault: alignment exception (0x011) at 0x0001bad5*
*Illegal instruction*
Please find below the wscript i use
srcdir = '.'
blddir = 'build'
VERSION = '0.1'
def set_options(opt):
opt.tool_options("compiler_cxx")
def configure(conf):
conf.check_tool("compiler_cxx")
conf.check_tool("node_addon")
def build(bld):
arch = ""
if bld.env['DEST_CPU'] == 'x86_64':
arch = "arch=x64"
print "x86"
elif bld.env['DEST_CPU'] == 'x86':
arch = "arch=x86"
print "x86"
elif bld.env['DEST_CPU'] == 'arm':
arch = "arch=arm"
print "arm_1"
elif bld.env['DEST_CPU'] == 'mips':
arch = "arch=mips"
print "arm_2"
else:
raise Exception(bld.env['DEST_CPU'], "is not one of these supported
architectures: x86, x86_64, arm, mips")
print "Working fine with arm"
arch = "arch=arm"
cross_arch = True
bld.env['AR'] =
'/opt/tooling/mvista/MV_20110822/symphony-ivi-2.6.34/tools/tools/arm-gnueabi/bin/arm-montavista-linux-gnueabi-ar'
bld.env['CC'] =
'/opt/tooling/mvista/MV_20110822/symphony-ivi-2.6.34/tools/tools/arm-gnueabi/bin/arm-montavista-linux-gnueabi-gcc'
bld.env['LINK_CC'] =
'/opt/tooling/mvista/MV_20110822/symphony-ivi-2.6.34/tools/tools/arm-gnueabi/bin/arm-montavista-linux-gnueabi-gcc'
bld.env['LIBDIR'] = '/home/pavincoll/Desktop/ARMRFS3/usr/lib'
obj = bld.new_task_gen("cxx", "shlib", "node_addon")
obj.target = "aqARM"
obj.source = "NJSAQ.cc"
obj.includes = ["/home/pavincoll/Desktop/ARMRFS3/usr/include",
"/home/pavincoll/Desktop/ARMRFS3/usr/include/alsa",
"/home/pavincoll/Desktop/ARMRFS3/usr/include/curl",
"/opt/tooling/mvista/MV_20110822/symphony-ivi-2.6.34/tools/tools/arm-gnueabi/arm-montavista-linux-gnueabi/target-toolchain/arm-montavista-linux-gnueabi/libc/usr/bin"
, "/home/pavincoll/Desktop/ARMRFS3/usr/lib",
"/home/pavincoll/workspace/aqstub/src" ]
obj.lib = ["pthread","aqARM", "sqARM_1", "spARM"]
I have also set the system env variable to point to the rite location.
I have a folder in my ubuntu which contains the root file system of my
Hardware, so the Lib path are refered to that location
And the Compiler i use is not the normal gcc its the montavista compiler
CC,CPP,AR,RANLIB and other variables are set to the rite path where the
montavista binaries are avaiable.
I run a script before doing node-waf which sets all there variable value.
Please help me to get this problem solved asap.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en