Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
port a node addon from node-waf to node-gyp
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
NodeNinja  
View profile  
 More options Sep 26 2012, 12:01 pm
From: NodeNinja <aeon6f...@gmail.com>
Date: Wed, 26 Sep 2012 09:01:00 -0700 (PDT)
Subject: port a node addon from node-waf to node-gyp

I am trying to build this  https://github.com/substack/node-bigint module
on linux
I was previously built with node-waf but I am trying to build it with
node-gyp to use in on the most recent versions of node.

I have a bindings.gyp file as under.

{
  "targets": [
{
  "target_name": "bigint",
  "sources": [ "bigint.cc" ]

}
]
}

However with this file the module builds successfuly but I don't think it
is linked to libgmp that it needs to function correctly.
How do link libgmp to that module.

I have installed gmp5.0.5 on my linux system but I don't seem to find it in
usr/bin; usr/local/bin etc.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Noordhuis  
View profile  
 More options Sep 26 2012, 12:13 pm
From: Ben Noordhuis <i...@bnoordhuis.nl>
Date: Wed, 26 Sep 2012 18:13:46 +0200
Local: Wed, Sep 26 2012 12:13 pm
Subject: Re: [nodejs] port a node addon from node-waf to node-gyp

'libraries': ['-lgmp'] should do it.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
NodeNinja  
View profile  
 More options Sep 26 2012, 12:54 pm
From: NodeNinja <aeon6f...@gmail.com>
Date: Wed, 26 Sep 2012 09:54:23 -0700 (PDT)
Local: Wed, Sep 26 2012 12:54 pm
Subject: Re: [nodejs] port a node addon from node-waf to node-gyp

> 'libraries': ['-lgmp'] should do it.

That seems to work out my updated binding.gyp is as under

{
  "targets": [
{
  "target_name": "bigint",
  "sources": [ "bigint.cc" ],
                  "libraries": ["-lgmp"]

}
]
}

However when I check the size of the final compiled "bigint.node" file it
is showing much lower size that previous builds

node-waf linux      - 204kb with libgmp
node-gyp on win   - 274kb   with mpir instead of libgmp
node-gyp on linux - 58Kb with libgmp

Is libgmp being dynamically linked to bigint or am I messing up somewhere
else?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mscdex  
View profile  
 More options Sep 26 2012, 2:41 pm
From: mscdex <msc...@gmail.com>
Date: Wed, 26 Sep 2012 11:40:57 -0700 (PDT)
Local: Wed, Sep 26 2012 2:40 pm
Subject: Re: port a node addon from node-waf to node-gyp
On Sep 26, 12:54 pm, NodeNinja <aeon6f...@gmail.com> wrote:

> Is libgmp being dynamically linked to bigint or am I messing up somewhere
> else?

Yes it should be dynamically linked now. You can double check by doing
`ldd /path/to/binding.node`.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
NodeNinja  
View profile  
 More options Sep 26 2012, 3:11 pm
From: NodeNinja <aeon6f...@gmail.com>
Date: Wed, 26 Sep 2012 12:11:22 -0700 (PDT)
Local: Wed, Sep 26 2012 3:11 pm
Subject: Re: port a node addon from node-waf to node-gyp

On Thursday, September 27, 2012 12:11:08 AM UTC+5:30, mscdex wrote:

> Yes it should be dynamically linked now. You can double check by doing
> `ldd /path/to/binding.node`.

I think you meant `ldd /path/to/bigint.node`.

and it prints out:

linux-gate.so.1 (0xb779f000)
libgmp.so.10 => /usr/lib/libgmp.so.10 (0xb7722000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb763a000)
libm.so.6 => /usr/lib/libm.so.6 (0xb75fa000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xb75dd000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0xb75c2000)
libc.so.6 => /usr/lib/libc.so.6 (0xb7416000)
/usr/lib/ld-linux.so.2 (0xb77a0000)

Not that I understand what this means but since its printing out libgmp at
some places seems like its linked to it.
Don't understand what the so.1 or so.6 is though...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mscdex  
View profile  
 More options Sep 26 2012, 4:57 pm
From: mscdex <msc...@gmail.com>
Date: Wed, 26 Sep 2012 13:56:50 -0700 (PDT)
Local: Wed, Sep 26 2012 4:56 pm
Subject: Re: port a node addon from node-waf to node-gyp
On Sep 26, 3:11 pm, NodeNinja <aeon6f...@gmail.com> wrote:

> libgmp.so.10 => /usr/lib/libgmp.so.10 (0xb7722000)

This means it is dynamically linking to libgmp. So you should be good
to go.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »