Hi,

I have successfully cross compiled the node binary for version0.8. and 
running the same in the hardware.
Now i wrote *.cc and wscript file which helps in interfacing the C++ with 
the Java.
When i compile and build the same as "node-waf configure build" the 
compilation steps are successful, and i get a *.node file inside 
./build/Release folder.
I copied the same from the ubuntu to the Target, but i get the below 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 code of wscript:
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"]


Note:

I have a folder in my Ubuntu which replicated my Target Root file system,
And i have made sure i point to that as the Library Directory path.
Also i am not using the Default Gcc compiler instead i am using the 
MontaVista C++ compiler.
I set system env like CC,CPP,AR,RANLIB Variables to point to the rite 
Montavista binary path.

can some one help.
thanks in advance.

Pavi


-- 
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

Reply via email to