[Pkg-javascript-devel] help to port nodejs to Debian riscv

Jérémy Lal kapouer at melix.org
Fri Mar 11 09:12:49 GMT 2022


On Fri, Mar 11, 2022 at 6:03 AM Yadd <yadd at debian.org> wrote:

> On 11/03/2022 04:29, Bo YU wrote:
> > hi
> >
> > On Thu, Mar 10, 2022 at 6:45 PM Jérémy Lal <kapouer at melix.org
> > <mailto:kapouer at melix.org>> wrote:
> >
> >
> >
> >     On Thu, Mar 10, 2022 at 11:26 AM Bo YU <tsu.yubo at gmail.com
> >     <mailto:tsu.yubo at gmail.com>> wrote:
> >
> >         Hi
> >
> >         On Thu, Mar 10, 2022 at 4:45 PM Jérémy Lal <kapouer at melix.org
> >         <mailto:kapouer at melix.org>> wrote:
> >
> >
> >
> >             On Thu, Mar 10, 2022 at 9:20 AM vimer <tsu.yubo at gmail.com
> >             <mailto:tsu.yubo at gmail.com>> wrote:
> >
> >                 Hi,
> >                 On Thu, Mar 10, 2022 at 09:00:10AM +0100, Jérémy Lal
> wrote:
> >                  >   On Thu, Mar 10, 2022 at 8:56 AM Yadd
> >                 <[1]yadd at debian.org <mailto:yadd at debian.org>> wrote:
> >                  >
> >                  >     On 10/03/2022 08:19, vimer wrote:
> >                  >     > Hi,
> >                  >     > According to
> >                 [2]https://github.com/nodejs/build/issues/2876
> >                 <https://github.com/nodejs/build/issues/2876>, The
> >                  >     nodejs
> >                  >     > upstream seems have supported riscv64. I want
> >                 to help port it to
> >                  >     Debian
> >                  >     > riscv
> >                  >     > if possible.
> >                  >     >
> >                  >     > But I want to know workflow about porting.
> >                  >     >
> >                  >     > The nodejs released in Debian Bulleye sid is
> >                 12.22.9~dfsg-1, But
> >                  >     nodejs
> >                  >     > upstream version upon 16 or 17 can support
> >                 riscv64. So, the
> >                  >     question is:
> >                  >     >
> >                  >     > Need I gpb import nodejs-16 or 17 in current
> >                  >     > [3]https://salsa.debian.org/js-team/nodejs.git
> >                 <https://salsa.debian.org/js-team/nodejs.git>
> >                  >     > or gpb import nodejs latest version from
> upstream?
> >                  >     Hi,
> >                  >     don't do that, updating nodejs requires a lot of
> >                 job and node-16
> >                  >     requires a newer libicu.
> >                  >
> >                  >   Indeed,
> >                  >   You will want to use nodejs 16 from the master-16.x
> >                 branch.
> >                  >   (it is a gbp layout with master-16.x /
> >                 upstream-16.x/pristine-tar
> >                  >   branches)
> >                  >   From that point, i suggest you setup a riscv64 vm
> >                 and try to
> >                  >   git-buildpackage node 16 in it.
> >                  >   You will probably need to use the "build profiles"
> >                 documented
> >                  >   in debian/README.source.
> >                  >   Also later today i'll push latest 16.x upstream
> >                 release in that branch.
> >                  >   Feel free to ask more questions.
> >                  >   Jérémy
> >                 Ok, will do. Thanks all,
> >                 BR,
> >                 vimer
> >
> >
> >             node 16.14.0 is available on master-16.x branch.
> >             Doing a local build right now.
> >             The documentation generator prints some errors, nothing to
> >             be alarmed of.
> >             This is the command i'm using for the build:
> >             sbuild -d experimental '--extra-repository=deb
> >             http://deb.debian.org/debian <http://deb.debian.org/debian>
> >             experimental main' --build-dep-resolver=aspcud
> >
> >         I use sbuild to build it in riscv64 vm, but get error:
> >         sudo sbuild --arch=riscv64 -d sid-riscv64-sbuild
> >         ```The following information may help to resolve the situation:
> >
> >         The following packages have unmet dependencies:
> >           sbuild-build-depends-main-dummy : Depends: libicu-dev (>=
> >         70.1~) but 67.1-7 is to be installed
> >                                             Depends: node-acorn (>=
> >         6.2.1~) but it is not going to be installed
> >                                             Depends: pkg-js-tools (>=
> >         0.8.2~) but it is not going to be installed
> >                                             Depends: node-js-yaml (>=
> >         4.1.0+dfsg+~4.0.5-6) but it is not going to be installed
> >                                             Depends: node-marked (>= 4~)
> >         but it is not going to be installed
> >                                             Depends: node-highlight.js
> >         but it is not going to be installed
> >         E: Unable to correct problems, you have held broken packages.
> >         apt-get failed.
> >         E: Package installation failed
> >         ```
> >         This may be a common error on Debian riscv arch. I am thinking
> >         that I have to build from a package without node-*dependencies?
> >         Below is my operations step how to build(please point to me
> >         wrong as I am newbie to gbp also):
> >         1. git clone
> >               git clone git at salsa.debian.org:js-team/nodejs.git
> >         2. checkout 16.14
> >               git checkout -b main origin/master-16.x
> >                git checkout -b upstream origin/upstream-16.x // not need
> -b
> >               git checkout -b pristine-tar origin/pristine-tar // not
> >         need -b also
> >                git checkout main
> >         3. gbp buildpackage --git-pbuilder --git-submodules
> >         --git-upstream-branch='upstream/16.14' --git-debian-branch=main
> >         --git-no-pristine-tar --git-upstream-tree=tag --git-ignore-new
> >         -sa // the step to generate *.orig.tar.gz file. But I do not
> >         have the base directory /var/cache/pbuilder/base.cow and it fail
> >         at last(*.orig.tzr.gz has been generated)
> >
> >
> >     You can do it a bit simpler because of the debian/gbp.conf file, so
> >     no need to rename any branch at all.
> >     git checkout master-16.x
> >     gbp buildpackage --git-pbuilder --git-ignore-new -sa
> >
> >         4. execute ` sudo sbuild --arch=riscv64 -d sid-riscv64-sbuild `
> >         and got above errors.
> >
> >         Just as I am editing the email, Suddenly IT occurred to me,
> >         maybe the distribution sid should be experimental, right?
> >
> >
> >     yes, as i wrote above, those flags will need to be set (i don't know
> >     if gbp pass them along to pbuilder correctly, but that's the idea):
> >     -d experimental '--extra-repository=deb http://deb.debian.org/debian
> >     <http://deb.debian.org/debian> experimental main'
> >     --build-dep-resolver=aspcud
> >
> >     Also you really will want to use the DEB_BUILD_PROFILES="nodoc
> >     nocheck nobuiltin"
> >
> > I build it(last 17+ h) with your help.
> > vimer at debian-local:~/build_test/nodejs/nodejs$ ls ../
> > libnode93_16.14.0~dfsg-1_riscv64.deb
> > nodejs_16.14.0~dfsg-1_riscv64.buildinfo
> > libnode93-dbgsym_16.14.0~dfsg-1_riscv64.deb
> >   nodejs_16.14.0~dfsg-1_riscv64.changes
> > libnode-dev_16.14.0~dfsg-1_riscv64.deb
> > nodejs_16.14.0~dfsg-1_riscv64.deb
> > master-16.x
> >   nodejs-16.14.0~dfsg.obsolete.1646911112.6398954
> > nodejs
> > nodejs-16.14.0~dfsg.obsolete.1646911132.04706
> > nodejs-16.14.0~dfsg
> >   nodejs_16.14.0~dfsg.orig-node-acorn.tar.xz
> > nodejs_16.14.0~dfsg-1_amd64.build
>  nodejs_16.14.0~dfsg.orig.tar.xz
> > nodejs_16.14.0~dfsg-1.debian.tar.xz
> >   nodejs_16.14.0~dfsg.orig-types-node.tar.xz
> > nodejs_16.14.0~dfsg-1.dsc
> >   nodejs-dbgsym_16.14.0~dfsg-1_riscv64.deb
> > nodejs_16.14.0~dfsg-1_riscv64.build
> >   nodejs-doc_16.14.0~dfsg-1_all.deb
> >   But there are mirror error :
> > ···
> > dwz: debian/libnode93/usr/lib/riscv64-linux-gnu/libnode.so.93: Too many
> > DIEs, not optimizing
> > dh_dwz: error: dwz --max-die-limit 100000000 --


Hi Yadd, Bo,
That failure is not fatal and happens on some other archs too, you don't
really need to fix it.

Anyway once you built nodejs on riscv64 with DEB_BUILD_PROFILES as above,
you should now try to build all the build-dependencies of nodejs that
themselves depend on nodejs
(they have the <!nocheck> or <!nodoc> flag in debian/control).
Once that is done, you can rebuild nodejs without DEB_BUILD_PROFILES at
all, and upload it to experimental.

Jérémy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20220311/fff39b54/attachment.htm>


More information about the Pkg-javascript-devel mailing list