buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
From: Alexandru Ardelean <ardeleanalex@gmail.com>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: fontaine.fabrice@gmail.com, aduskett@gmail.com, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 00/13] package/nodejs: rework cross-building
Date: Tue, 9 Aug 2022 15:48:12 +0300	[thread overview]
Message-ID: <CA+U=DsrjDECTNWYsgH6VJg7r6kVaidT_Lt64B=YhxcwkwgbOng@mail.gmail.com> (raw)
In-Reply-To: <20220809134200.66762b0a@windsurf>

On Tue, Aug 9, 2022 at 2:42 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello Alexandru,
>
> First of all, thanks a lot for your work on NodeJS. It is obviously a
> complex package, which has already seen quite a lot of effort, so we
> need to be careful when changing it.
>
> On Tue,  9 Aug 2022 10:56:51 +0300
> Alexandru Ardelean <ardeleanalex@gmail.com> wrote:
>
> > I tried to build nodejs from Buildroot master, but I couldn't.
> > It could be that I did not setup something properly with regards to the
> > 'v8-qemu-wrapper' stuff. I kept getting execution errors, when trying to
> > run the nodejs build-tools scripts (see details in the patches).
> > Either the host-qemu stuff isn't working correctly, or it needs some extra
> > setup.
>
> I will give a test to your patch series and report back, but I'm
> fearing that PATCH 03/18 will break the build.
>
> > That eventually sent me down the rabbit-hole of trying to get nodejs to
> > build for ARM64 (where I wanted it). It seems that nodejs cross-building
> > can be done via their own infra-structure, which isn't perfect, but it
> > seems usable; and it also looks like a good idea.
> >
> > Using their cross-building stuff, has some issues/considerations:
> > * it's easiest when building a 32/64-bit target on a (same bit-width)
> >   32/64-bit host; the host-{c-ares,icu,libuv,zlib} tools can be used
> >   for nodejs' host tools (in their cross-build infrastructure/tools)
> > * when building a 32-bit target on a 64-bit host, the nodejs cross-building
> >   logic will add the -m32 CFLAG, which will mean that the
> >   host-{c-ares,icu,libuv,zlib} tools will be unusable (they got compiled
> >   for 64-bit and are un-linkable to 32-bit binaries)
> >   This requires that the user install on their system the
> >   host-{c-ares,icu,libuv,zlib} 32 bit versions. I suspect that the
> >   BR2_HOSTARCH_NEEDS_IA32_{LIBS,COMPILER} symbols are intented for this
> > * I haven't tried to build 64-bit targets on 32-bit hosts, though I'd
> >   guess this is a rare corner case.
>
> No, unfortunately it is not. A solution that doesn't support building a
> 64-bit target on a 32-bit host is not going to be acceptable for
> Buildroot at this point I'm afraid.

There may be a chance that this could automagically work (64 bit
target to 32 bit host).
I did not test it. I will try to make some time for testing it in a
32-bit x86 docker image.

I figured this may be unacceptable.
The least I was hoping to get here, is someone to tell me what I am
doing wrong with that v8-qemu-wrapper stuff.

>
> I will try to have a look in more details, even though I must say I'm
> pretty hermetic to the overall NodeJS build system :-/
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-08-09 12:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09  7:56 [Buildroot] [PATCH 00/13] package/nodejs: rework cross-building Alexandru Ardelean
2022-08-09  7:56 ` [Buildroot] [PATCH 01/13] package/libuv: add host-build Alexandru Ardelean
2022-08-09  7:56 ` [Buildroot] [PATCH 02/13] package/nghttp2: " Alexandru Ardelean
2022-08-09  7:56 ` [Buildroot] [PATCH 03/13] nodejs: remove v8-qemu-wrapper stuff Alexandru Ardelean
2022-08-09 11:49   ` Thomas Petazzoni via buildroot
2022-08-09 12:52     ` Alexandru Ardelean
2022-08-09  7:56 ` [Buildroot] [PATCH 04/13] nodejs: fix 'Duplicate v8 target errors when cross-compiling' error Alexandru Ardelean
2022-08-09  7:56 ` [Buildroot] [PATCH 05/13] package/nodejs: add host-{c-ares, libuv, nghttp2} to deps Alexandru Ardelean
2022-08-09  7:56 ` [Buildroot] [PATCH 06/13] package/nodejs: provide {CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS}_host env vars to target-build Alexandru Ardelean
2022-08-09  7:56 ` [Buildroot] [PATCH 07/13] package/nodejs: don't install nodejs host-tools Alexandru Ardelean
2022-08-09  7:56 ` [Buildroot] [PATCH 08/13] package/nodejs: rename LDFLAGS.host -> LDFLAGS opt Alexandru Ardelean
2022-08-09  7:57 ` [Buildroot] [PATCH 09/13] package/nodejs: impose dep on ia32 libs/compiler if target arch not 64 bits Alexandru Ardelean
2022-08-09  7:57 ` [Buildroot] [PATCH 10/13] package/nodejs: add host-zlib depedency to target package Alexandru Ardelean
2022-08-09  7:57 ` [Buildroot] [PATCH 11/13] package/nodejs: fix ARM build with VFP3 instruction Alexandru Ardelean
2022-08-09  7:57 ` [Buildroot] [PATCH 12/13] package/nodejs: add a hack to cross-compile 32-bit targets on x64 hosts Alexandru Ardelean
2022-08-09  7:57 ` [Buildroot] [PATCH 13/13] package/nodejs: build host-nodejs only if we're installing modules with NPM Alexandru Ardelean
2022-08-09 11:42 ` [Buildroot] [PATCH 00/13] package/nodejs: rework cross-building Thomas Petazzoni via buildroot
2022-08-09 12:48   ` Alexandru Ardelean [this message]
2022-08-10 21:23 ` Thomas Petazzoni via buildroot
2022-08-11  7:48   ` Alexandru Ardelean
2022-09-25  8:27 ` Thomas Petazzoni
2022-09-25 15:17   ` Alexandru Ardelean
2022-09-25 16:15     ` Alexandru Ardelean
2022-09-25 18:41       ` Thomas Petazzoni
2022-09-26 13:11         ` Alexandru Ardelean

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='CA+U=DsrjDECTNWYsgH6VJg7r6kVaidT_Lt64B=YhxcwkwgbOng@mail.gmail.com' \
    --to=ardeleanalex@gmail.com \
    --cc=aduskett@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=fontaine.fabrice@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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;
as well as URLs for NNTP newsgroup(s).