On Thu, Nov 8, 2012 at 11:13 PM, Pavi <pavinc...@gmail.com> wrote:
> Hi i wrote my binding.cc and binding.gyp for my ARM library,
> I compiled and i always see the below error,
> bash-4.1$ sudo
> /home/pavincoll/Downloads/node-v0.8.0/deps/npm/bin/node-gyp-bin/node-gyp
> configure build
> [sudo] password for pavincoll:
> gyp info it worked if it ends with ok
> gyp info using node-gyp@0.5.2
> gyp info using node@0.8.0
> gyp info spawn python
> gyp info spawn args [ '/home/pavincoll/.node-gyp/0.8.0/tools/gyp_addon',
> gyp info spawn args   'binding.gyp',
> gyp info spawn args
> '-I/home/pavincoll/workspace/aqstub/src/build/config.gypi',
> gyp info spawn args   '-f',
> gyp info spawn args   'make' ]
> gyp info spawn make
> gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
> make: Entering directory `/home/pavincoll/workspace/aqstub/src/build'
>   CXX(target) Release/obj.target/aqARM/NJSAQ.o
>   SOLINK_MODULE(target) Release/obj.target/aqARM.node
> /usr/local/lib/libaqARM.so: could not read symbols: File in wrong format
> collect2: ld returned 1 exit status
> make: *** [Release/obj.target/aqARM.node] Error 1
> make: Leaving directory `/home/pavincoll/workspace/aqstub/src/build'
> gyp ERR! build error Error: `make` failed with exit code: 2
> gyp ERR! build error     at ChildProcess.onExit
> (/home/pavincoll/Downloads/node-v0.8.0/deps/npm/node_modules/node-gyp/lib/build.js:214:23)
> gyp ERR! build error     at ChildProcess.EventEmitter.emit (events.js:91:17)
> gyp ERR! build error     at Process._handle.onexit (child_process.js:674:10)
> gyp ERR! not ok
>
>
> But the Library is a ARM compatible binary.
> The config.gyp is always ,
>   "target_defaults": {
>     "cflags": [],
>     "default_configuration": "Release",
>     "defines": [],
>     "include_dirs": [],
>     "libraries": []
>   },
>   "variables": {
>     "host_arch": "ia32",
>     "node_install_npm": "true",
>     "node_install_waf": "true",
>     "node_prefix": "",
>     "node_shared_openssl": "false",
>     "node_shared_v8": "false",
>     "node_shared_zlib": "false",
>     "node_use_dtrace": "false",
>     "node_use_etw": "false",
>     "node_use_openssl": "true",
>     "strict_aliasing": "true",
>     "target_arch": "ia32",
>     "v8_use_snapshot": "false",
>     "nodedir": "/home/pavincoll/.node-gyp/0.8.0",
>     "copy_dev_lib": "true"
>   }
> Were you can see Target_arch as "ia32"
> Please let me know how should i cross compile node-gyp for an ARM processor

Run node-gyp like this:

  $ node-gyp --arch arm configure build # or just 'rebuild'

You shouldn't have to run it as root, by the way.

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to