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'
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.
I shifted to gyp, and wrote binding.gyp, but still when i copy over the *.node file to Hardware which is successfully created in my ubuntu cause me the following error,
module.js:480 process.dlopen(filename, module.exports); ^ Error: /home/root/Release-2/build/Release/lib.target/hu.node: undefined symbol: init at Object.Module._extensions..node (module.js:480:11) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17) at require (module.js:378:17) at Object.<anonymous> (/home/root/Release-2/build/Release/lib.target/ARM.js:1:78) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12)
module.js:480 process.dlopen(filename, module.exports); ^ Error: /home/root/Release-2/build/Release/lib.target/hu.node: undefined symbol: init at Object.Module._extensions..node (module.js:480:11) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:362:17) at require (module.js:378:17) at Object.<anonymous> (/home/root/Release-2/build/Release/lib.target/ARM.js:1:78) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12)
Please find below the *.cc code, #include <v8.h> #include <node.h>
#include "aq_api.h"
using namespace node; using namespace v8;
/** * Checks that the passed V8 Object is of type Function and casts it * to a Function with the specified name. * * @param I Object to be cast to a Function. * @param VAR Name of the local Function variable to be created and set * to I. */ #define REQ_FUN_ARG(I, VAR) \ if (args.Length() <= (I) || !args[I]->IsFunction()) \ return ThrowException(Exception::TypeError( \ String::New("Argument " #I " must be a function"))); \ Local<Function> VAR = Local<Function>::Cast(args[I]);
/** * Node.js V8 addon wrapper class for the Audio Manager. */ class NJSAQ : ObjectWrap { private: static const int SET_PHONE_CALL_PERMISSION =2; aq _aq;
I removed the static from all the places from the above code, and i still get the same error. Also do you mean NODE_SET_METHOD, since i am using NODE_MODULE to call init function.
On Wednesday, August 29, 2012 at 11:51, Pavi wrote:
> Hi,
> I shifted to gyp, and wrote binding.gyp, but still when i copy over the *.node file to Hardware which is successfully created in my ubuntu cause me the following error,
> [11893.676924] Alignment trap: not handling instruction e1923f9f at [<ffff0fc4>]
> [11893.686520] Unhandled fault: alignment exception (0x011) at 0x0001ba4d
> Illegal instruction
On Thu, Aug 30, 2012 at 1:59 AM, Pavi <manicka...@gmail.com> wrote:
> Hi Ben,
> I removed the static from all the places from the above code, and i still
> get the same error.
> Also do you mean NODE_SET_METHOD, since i am using NODE_MODULE to call init
> function.
Sorry, for some reason my mail reader didn't show the last two lines
of your email. What does `nm yourmodule.node | grep -E 'init|_module'`
print?
I removed the static from all the places from the above code, and i still get the same error.Also do you mean NODE_SET_METHOD, since i am using NODE_MODULE to call init function.
On Thursday, August 30, 2012 4:54:21 AM UTC-7, Ben Noordhuis wrote:
> On Thu, Aug 30, 2012 at 1:59 AM, Pavi <manic...@gmail.com <javascript:>> > wrote: > > Hi Ben,
> > I removed the static from all the places from the above code, and i > still > > get the same error. > > Also do you mean NODE_SET_METHOD, since i am using NODE_MODULE to call > init > > function.
> Sorry, for some reason my mail reader didn't show the last two lines > of your email. What does `nm yourmodule.node | grep -E 'init|_module'` > print?
On Wednesday, August 29, 2012 6:23:30 PM UTC-7, Skyler Brungardt wrote:
> 4
> -- > Skyler Brungardt
> On Wednesday, August 29, 2012 at 11:51, Pavi wrote:
> Hi,
> I shifted to gyp, and wrote binding.gyp, but still when i copy over the > *.node file to Hardware which is successfully created in my ubuntu cause me > the following error,
On Thursday, August 30, 2012 at 10:33 AM, Pavi wrote:
> Hi Skyler,
> For some reason i am not able to view your mess , it just shows "4 --".
> Can you please reply back.
> On Wednesday, August 29, 2012 6:23:30 PM UTC-7, Skyler Brungardt wrote:
> > 4
> > -- > > Skyler Brungardt
> > On Wednesday, August 29, 2012 at 11:51, Pavi wrote:
> > > Hi,
> > > I shifted to gyp, and wrote binding.gyp, but still when i copy over the *.node file to Hardware which is successfully created in my ubuntu cause me the following error,
> > > [11893.676924] Alignment trap: not handling instruction e1923f9f at [<ffff0fc4>]
> > > [11893.686520] Unhandled fault: alignment exception (0x011) at 0x0001ba4d
> > > Illegal instruction
> > > On Tuesday, August 28, 2012 3:40:24 PM UTC-7, mscdex wrote:
> > > > On Aug 28, 6:34 pm, Pavi <pavinc...@gmail.com> wrote: > > > > > Please find below the code of wscript:
> > > > First thing you should do is switch to gyp. > > > -- > > > 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 nod...@googlegroups.com (javascript:)
> > > To unsubscribe from this group, send email to
> > > nodejs+un...@googlegroups.com (javascript:)
> > > For more options, visit this group at
> > > http://groups.google.com/group/nodejs?hl=en?hl=en