Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jörg Krause" <joerg.krause@embedded.rocks>
To: buildroot@busybox.net
Subject: [Buildroot] [v4 3/4] package/nodejs: Fixes for node-pre-gyp
Date: Sat, 04 Jul 2015 08:51:16 +0200	[thread overview]
Message-ID: <1435992676.2845.4.camel@embedded.rocks> (raw)
In-Reply-To: <20150702215402.GJ3838@free.fr>

Hi Yann, Martin, all,

On Do, 2015-07-02 at 23:54 +0200, Yann E. MORIN wrote:
> Martin, All,
> 
> On 2015-07-02 10:43 +0100, Martin Bark spake thusly:
> > Many packages use node-pre-gyp as a way of deploying precompiled 
> > binary
> > dependencies with fall back to compilation for other targets. 
> >  Currently
> > installing node modules that use node-pre-gyp can fail to use the 
> > correct
> > binary for the target.  This patch fixes this issue by correctly
> > configuring node-pre-gyp.
> > 
> > Firstly, node-gyp uses the option --arch to determine its target
> > architecture (which is already set correctly), however, node-pre
> > -gyp uses
> > --target-arch.  Without this set node.js packages that uses node
> > -pre-gyp
> > will pick the wrong target architecture.
> > 
> > Secondly, the use of precompiled binary packages is not desirable 
> > due to
> > potential security and licensing issues.  To solve this we use the
> > --build-from-source option to force node-pre-gyp to always build 
> > the C++
> > code.
> > 
> > This patch passes npm_config_target_arch and 
> > npm_config_build_from_source
> > to npm which causes --target-arch and --build-from-source to be 
> > passed to
> > node-pre-gyp.
> > 
> > I have tested this using the node.js package serialport which now
> > successfully builds and runs.
> > 
> > Signed-off-by: Martin Bark <martin@barkynet.com>
> 
> I'm not much of a nodejs guy, so I'd like some feedback from other
> nodejs users. J?rg, maybe?
> 
> Otherwise, the build-form-source chunk looks way better, thanks! :-)
> 
> [really only a code review]
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 

I'm quite a bit busy now and it is beyond me. Perhaps I can give
feedback in a week.

Best regards
J?rg Krause

  reply	other threads:[~2015-07-04  6:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02  9:43 [Buildroot] [v4 1/4] package/nodejs: Add node.js v0.12.5 and set as the default version Martin Bark
2015-07-02  9:43 ` [Buildroot] [v4 2/4] package/nodejs: symlink /usr/lib/node_modules/.bin/* to /usr/bin Martin Bark
2015-07-02  9:43 ` [Buildroot] [v4 3/4] package/nodejs: Fixes for node-pre-gyp Martin Bark
2015-07-02 21:54   ` Yann E. MORIN
2015-07-04  6:51     ` Jörg Krause [this message]
2015-07-02  9:43 ` [Buildroot] [v4 4/4] package/nodejs: Define NPM command for other packages to use Martin Bark
2015-07-02 21:51 ` [Buildroot] [v4 1/4] package/nodejs: Add node.js v0.12.5 and set as the default version Yann E. MORIN
2015-07-04 12:56 ` Thomas Petazzoni
2015-07-05 19:07   ` Martin Bark
2015-10-11 19:25 ` Yann E. MORIN
2015-10-12  8:48   ` Martin Bark
2015-10-12 16:51     ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435992676.2845.4.camel@embedded.rocks \
    --to=joerg.krause@embedded.rocks \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox