Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9513D3B7D5 for ; Mon, 25 Nov 2024 04:14:00 +0000 (UTC) Subject: Unable to build airbrake npm module in Yocto Scarthgap #bitbake #devtool #scarthgap #npm To: yocto@lists.yoctoproject.org From: sampathkumar.n@rently.com X-Originating-Location: Coimbatore, Tamil Nadu, IN (106.211.247.183) X-Originating-Platform: Linux Chrome 130 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Sun, 24 Nov 2024 20:13:59 -0800 Message-ID: Content-Type: multipart/alternative; boundary="Mxs7MuTFCehFnDEj3ryJ" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 25 Nov 2024 04:14:00 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/64335 --Mxs7MuTFCehFnDEj3ryJ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I have created airbrake npm module recipe using recipe tool by this command= : devtool add "npm://registry.npmjs.org;package=3Dairbrake;version=3D2.0.1"= . But when buiding the airbrake module using bitbake I am getting this error: >=20 > ERROR: airbrake-2.0.1-r0 do_compile: Error executing a python function in > exec_func_python() autogenerated: > The stack trace of python calls that resulted in this exception/failure > was: > File: 'exec_func_python() autogenerated', lineno: 2, function: > 0001: > *** 0002:npm_do_compile(d) > 0003: > File: > '/home/rently/Desktop/yocto/V5.1/sources/poky/meta/classes-recipe/npm.bbc= lass', > lineno: 299, function: npm_do_compile > 0295: > 0296: =C2=A0 =C2=A0 =C2=A0 =C2=A0# Pack and install the main package > 0297: =C2=A0 =C2=A0 =C2=A0 =C2=A0(tarball, _) =3D npm_pack(env, d.getVar(= "NPM_PACKAGE"), tmpdir) >=20 > 0298: =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd =3D "npm install %s %s" % (shlex.quo= te(tarball), > d.getVar("EXTRA_OENPM")) > *** 0299: =C2=A0 =C2=A0 =C2=A0 =C2=A0env.run(cmd, args=3Dargs) > 0300:} > 0301: > 0302:npm_do_install() { > 0303: =C2=A0 =C2=A0# Step three: final install > File: > '/home/rently/Desktop/yocto/V5.1/sources/poky/bitbake/lib/bb/fetch2/npm.p= y', > lineno: 130, function: run > 0126: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if args: > 0127: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for key, val= ue in args: > 0128: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0cmd +=3D " --%s=3D%s" % (key, shlex.quote(value)) > 0129: > *** 0130: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return _run(cmd) > 0131: > 0132:class Npm(FetchMethod): > 0133: =C2=A0 =C2=A0"""Class to fetch a package from a npm registry""" > 0134: > File: > '/home/rently/Desktop/yocto/V5.1/sources/poky/bitbake/lib/bb/fetch2/npm.p= y', > lineno: 118, function: _run > 0114: > 0115: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0def _run(cmd): > 0116: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd =3D "NPM= _CONFIG_USERCONFIG=3D%s " % > (self.user_config.name) + cmd > 0117: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd =3D "NPM= _CONFIG_GLOBALCONFIG=3D%s " % > (self.global_config_name) + cmd > *** 0118: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return r= unfetchcmd(cmd, d, workdir=3Dworkdir) > 0119: > 0120: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if configs: > 0121: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bb.warn("Use= of configs argument of > NpmEnvironment.run() function" > 0122: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0" is deprecated. Please use args argument > instead.") > File: > '/home/rently/Desktop/yocto/V5.1/sources/poky/bitbake/lib/bb/fetch2/__ini= t__.py', > lineno: 960, function: runfetchcmd > 0956: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bb.utils.rem= ove(f, True) > 0957: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0except OSError: > 0958: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pass > 0959: > *** 0960: =C2=A0 =C2=A0 =C2=A0 =C2=A0raise FetchError(error_message) > 0961: > 0962: =C2=A0 =C2=A0return output > 0963: > 0964:def check_network_access(d, info, url): > Exception: bb.fetch2.FetchError: Fetcher failure: Fetch command export > PSEUDO_DISABLED=3D1; export > DBUS_SESSION_BUS_ADDRESS=3D"unix:path=3D/run/user/1000/bus"; export > SSH_AGENT_PID=3D"2600"; export SSH_AUTH_SOCK=3D"/run/user/1000/keyring/ss= h"; > export > PATH=3D"/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/sysroots-unin= ative/x86_64-linux/usr/bin:/home/rently/Desktop/yocto/V5.1/core-image-base/= tmp/work/armv8a-poky-linux/airbrake/2.0.1/recipe-sysroot-native/usr/bin/pyt= hon3-native:/home/rently/Desktop/yocto/V5.1/sources/poky/scripts:/home/rent= ly/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linux/airbrake/2= .0.1/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/rently/Desktop/= yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linux/airbrake/2.0.1/recipe= -sysroot/usr/bin/crossscripts:/home/rently/Desktop/yocto/V5.1/core-image-ba= se/tmp/work/armv8a-poky-linux/airbrake/2.0.1/recipe-sysroot-native/usr/sbin= :/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linux= /airbrake/2.0.1/recipe-sysroot-native/usr/bin:/home/rently/Desktop/yocto/V5= .1/core-image-base/tmp/work/armv8a-poky-linux/airbrake/2.0.1/recipe-sysroot= -native/sbin:/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8= a-poky-linux/airbrake/2.0.1/recipe-sysroot-native/bin:/home/rently/Desktop/= yocto/V5.1/sources/poky/bitbake/bin:/home/rently/Desktop/yocto/V5.1/core-im= age-base/tmp/hosttools"; > export HOME=3D"/tmp/tmpmztrh1m5"; NPM_CONFIG_GLOBALCONFIG=3D/dev/null > NPM_CONFIG_USERCONFIG=3D/tmp/tmp3032ad0i npm install > /tmp/tmpygfjhpxt/airbrake-2.0.1.tgz =C2=A0--target_arch=3Darm64 > --build-from-source=3Dtrue --legacy-peer-deps=3Dtrue failed with exit cod= e 1, > output: > npm verb cli > /home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linu= x/airbrake/2.0.1/recipe-sysroot-native/usr/bin/node > /home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linu= x/airbrake/2.0.1/recipe-sysroot-native/usr/bin/npm >=20 > npm info using npm@10.5.2 > npm info using node@v20.13.0 > npm WARN config only Use `--omit=3Ddev` to omit dev dependencies from the > install. > npm verb title npm install /tmp/tmpygfjhpxt/airbrake-2.0.1.tgz > npm verb argv "install" "/tmp/tmpygfjhpxt/airbrake-2.0.1.tgz" > "--target_arch" "arm64" "--build-from-source" "true" "--legacy-peer-deps" > "true" > npm verb logfile logs-max:10 > dir:/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-= linux/airbrake/2.0.1/npm-cache/_logs/2024-11-25T04_07_10_504Z- >=20 > npm verb logfile > /home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linu= x/airbrake/2.0.1/npm-cache/_logs/2024-11-25T04_07_10_504Z-debug-0.log >=20 > npm WARN config includes both --global and --audit, which is currently > unsupported. > npm sill logfile done cleaning log files > npm sill idealTree buildDeps > npm sill fetch manifest > airbrake@file:../../../../../../../../../../../../../tmp/tmpygfjhpxt/airb= rake-2.0.1.tgz >=20 > npm sill placeDep ROOT airbrake@2.0.1 OK for: =C2=A0want: > file:../../../../../../../../../../../../../tmp/tmpygfjhpxt/airbrake-2.0.= 1.tgz >=20 > npm sill fetch manifest lodash.merge@4.6.2 > npm sill fetch manifest request@2.88.2 > npm sill fetch manifest stack-trace@0.0.9 > npm sill placeDep node_modules/airbrake lodash.merge@ OK for: > airbrake@2.0.1 want: 4.6.2 > npm sill placeDep node_modules/airbrake request@ OK for: airbrake@2.0.1 > want: 2.88.2 > npm sill placeDep node_modules/airbrake stack-trace@ OK for: > airbrake@2.0.1 want: 0.0.9 > npm verb stack Error: request to https://registry.npmjs.org/lodash.merge > failed: cache mode is 'only-if-cached' but no cached response is > available. > npm verb stack =C2=A0 =C2=A0 at cacheFetch > (/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-lin= ux/airbrake/2.0.1/recipe-sysroot-native/usr/lib/node_modules/npm/node_modul= es/make-fetch-happen/lib/cache/index.js:12:13) >=20 > npm verb stack =C2=A0 =C2=A0 at async fetch > (/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-lin= ux/airbrake/2.0.1/recipe-sysroot-native/usr/lib/node_modules/npm/node_modul= es/make-fetch-happen/lib/fetch.js:98:7) >=20 > npm verb stack =C2=A0 =C2=A0 at async RegistryFetcher.packument > (/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-lin= ux/airbrake/2.0.1/recipe-sysroot-native/usr/lib/node_modules/npm/node_modul= es/pacote/lib/registry.js:91:19) >=20 > npm verb stack =C2=A0 =C2=A0 at async RegistryFetcher.manifest > (/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-lin= ux/airbrake/2.0.1/recipe-sysroot-native/usr/lib/node_modules/npm/node_modul= es/pacote/lib/registry.js:129:23) >=20 > npm verb cwd /tmp/tmpmztrh1m5 > npm verb Linux 5.15.0-125-generic > npm verb node v20.13.0 > npm verb npm =C2=A0v10.5.2 > npm ERR! code ENOTCACHED > npm ERR! request to https://registry.npmjs.org/lodash.merge failed: cache > mode is 'only-if-cached' but no cached response is available. > npm verb exit 1 > npm verb unfinished npm timer reify 1732507630680 > npm verb unfinished npm timer reify:loadTrees 1732507630681 > npm verb code 1 > npm ERR! A complete log of this run can be found in: > /home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linu= x/airbrake/2.0.1/npm-cache/_logs/2024-11-25T04_07_10_504Z-debug-0.log >=20 >=20 >=20 >=20 But the point here is lodash.merge module is already downloaded and placed = in the $WORKDIR/npm/node_modules. Still bitbake is trying to download it fr= om npm registery. --Mxs7MuTFCehFnDEj3ryJ Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
I have created airbrake npm module recipe using recipe tool by this co= mmand: devtool add "npm://registry.npmjs.org;package=3Dairbrake;version=3D2= .0.1".
But when buiding the airbrake module using bitbake I am getting this e= rror: 
 
ERROR: airbrake-2.0.1-r0 do_compile: Error executing a python function= in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failur= e was:
File: 'exec_func_python() autogenerated', lineno: 2, function: = <module>
     0001:
 *** 0002:npm_do_co= mpile(d)
     0003:
File: '/home/rently/Desktop/yo= cto/V5.1/sources/poky/meta/classes-recipe/npm.bbclass', lineno: 299, functi= on: npm_do_compile
     0295:
     = 0296:        # Pack and install the main package
&= nbsp;    0297:        (tarball, _) =3D npm_pa= ck(env, d.getVar("NPM_PACKAGE"), tmpdir)
     0298: &nb= sp;      cmd =3D "npm install %s %s" % (shlex.quote(tarball)= , d.getVar("EXTRA_OENPM"))
 *** 0299:        = env.run(cmd, args=3Dargs)
     0300:}
   = ;  0301:
     0302:npm_do_install() {
  =    0303:    # Step three: final install
File: '/ho= me/rently/Desktop/yocto/V5.1/sources/poky/bitbake/lib/bb/fetch2/npm.py', li= neno: 130, function: run
     0126:      = ;      if args:
     0127:    =            for key, value in args:
&nbs= p;    0128:               &nbs= p;    cmd +=3D " --%s=3D%s" % (key, shlex.quote(value))
&nbs= p;    0129:
 *** 0130:         &nbs= p;  return _run(cmd)
     0131:
   =  0132:class Npm(FetchMethod):
     0133:   &= nbsp;"""Class to fetch a package from a npm registry"""
    =  0134:
File: '/home/rently/Desktop/yocto/V5.1/sources/poky/bitbak= e/lib/bb/fetch2/npm.py', lineno: 118, function: _run
    &nb= sp;0114:
     0115:           =  def _run(cmd):
     0116:       &n= bsp;        cmd =3D "NPM_CONFIG_USERCONFIG=3D%s " % (se= lf.user_config.name) + cmd
     0117:     &nb= sp;          cmd =3D "NPM_CONFIG_GLOBALCONFIG=3D%s= " % (self.global_config_name) + cmd
 *** 0118:     &nb= sp;          return runfetchcmd(cmd, d, workdir=3D= workdir)
     0119:
     0120: &nbs= p;          if configs:
     0= 121:                bb.warn("Use of= configs argument of NpmEnvironment.run() function"
    &nbs= p;0122:                   &nbs= p;" is deprecated. Please use args argument instead.")
File: '/home/re= ntly/Desktop/yocto/V5.1/sources/poky/bitbake/lib/bb/fetch2/__init__.py', li= neno: 960, function: runfetchcmd
     0956:   &nbs= p;            bb.utils.remove(f, True)
&= nbsp;    0957:            except OS= Error:
     0958:           &n= bsp;    pass
     0959:
 *** 0960: =        raise FetchError(error_message)
  &nbs= p;  0961:
     0962:    return output     0963:
     0964:def check_networ= k_access(d, info, url):
Exception: bb.fetch2.FetchError: Fetcher failu= re: Fetch command export PSEUDO_DISABLED=3D1; export DBUS_SESSION_BUS_ADDRE= SS=3D"unix:path=3D/run/user/1000/bus"; export SSH_AGENT_PID=3D"2600"; expor= t SSH_AUTH_SOCK=3D"/run/user/1000/keyring/ssh"; export PATH=3D"/home/rently= /Desktop/yocto/V5.1/core-image-base/tmp/sysroots-uninative/x86_64-linux/usr= /bin:/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-l= inux/airbrake/2.0.1/recipe-sysroot-native/usr/bin/python3-native:/home/rent= ly/Desktop/yocto/V5.1/sources/poky/scripts:/home/rently/Desktop/yocto/V5.1/= core-image-base/tmp/work/armv8a-poky-linux/airbrake/2.0.1/recipe-sysroot-na= tive/usr/bin/aarch64-poky-linux:/home/rently/Desktop/yocto/V5.1/core-image-= base/tmp/work/armv8a-poky-linux/airbrake/2.0.1/recipe-sysroot/usr/bin/cross= scripts:/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-pok= y-linux/airbrake/2.0.1/recipe-sysroot-native/usr/sbin:/home/rently/Desktop/= yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linux/airbrake/2.0.1/recipe= -sysroot-native/usr/bin:/home/rently/Desktop/yocto/V5.1/core-image-base/tmp= /work/armv8a-poky-linux/airbrake/2.0.1/recipe-sysroot-native/sbin:/home/ren= tly/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linux/airbrake/= 2.0.1/recipe-sysroot-native/bin:/home/rently/Desktop/yocto/V5.1/sources/pok= y/bitbake/bin:/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/hosttools= "; export HOME=3D"/tmp/tmpmztrh1m5"; NPM_CONFIG_GLOBALCONFIG=3D/dev/null NP= M_CONFIG_USERCONFIG=3D/tmp/tmp3032ad0i npm install /tmp/tmpygfjhpxt/airbrak= e-2.0.1.tgz  --target_arch=3Darm64 --build-from-source=3Dtrue --legacy= -peer-deps=3Dtrue failed with exit code 1, output:
npm verb cli /home/= rently/Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linux/airbra= ke/2.0.1/recipe-sysroot-native/usr/bin/node /home/rently/Desktop/yocto/V5.1= /core-image-base/tmp/work/armv8a-poky-linux/airbrake/2.0.1/recipe-sysroot-n= ative/usr/bin/npm
npm info using npm@10.5.2
npm info using node@v= 20.13.0
npm WARN config only Use `--omit=3Ddev` to omit dev dependenci= es from the install.
npm verb title npm install /tmp/tmpygfjhpxt/airbr= ake-2.0.1.tgz
npm verb argv "install" "/tmp/tmpygfjhpxt/airbrake-2.0.1= .tgz" "--target_arch" "arm64" "--build-from-source" "true" "--legacy-peer-d= eps" "true"
npm verb logfile logs-max:10 dir:/home/rently/Desktop/yoct= o/V5.1/core-image-base/tmp/work/armv8a-poky-linux/airbrake/2.0.1/npm-cache/= _logs/2024-11-25T04_07_10_504Z-
npm verb logfile /home/rently/Desktop/= yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linux/airbrake/2.0.1/npm-ca= che/_logs/2024-11-25T04_07_10_504Z-debug-0.log
npm WARN config include= s both --global and --audit, which is currently unsupported.
npm sill = logfile done cleaning log files
npm sill idealTree buildDeps
npm = sill fetch manifest airbrake@file:../../../../../../../../../../../../../tm= p/tmpygfjhpxt/airbrake-2.0.1.tgz
npm sill placeDep ROOT airbrake@2.0.1= OK for:  want: file:../../../../../../../../../../../../../tmp/tmpygf= jhpxt/airbrake-2.0.1.tgz
npm sill fetch manifest lodash.merge@4.6.2npm sill fetch manifest request@2.88.2
npm sill fetch manifest stac= k-trace@0.0.9
npm sill placeDep node_modules/airbrake lodash.merge@ OK= for: airbrake@2.0.1 want: 4.6.2
npm sill placeDep node_modules/airbra= ke request@ OK for: airbrake@2.0.1 want: 2.88.2
npm sill placeDep node= _modules/airbrake stack-trace@ OK for: airbrake@2.0.1 want: 0.0.9
npm = verb stack Error: request to https://registry.npmjs.org/lodash.merge failed= : cache mode is 'only-if-cached' but no cached response is available.
= npm verb stack     at cacheFetch (/home/rently/Desktop/yocto/V5.1= /core-image-base/tmp/work/armv8a-poky-linux/airbrake/2.0.1/recipe-sysroot-n= ative/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/ind= ex.js:12:13)
npm verb stack     at async fetch (/home/rently= /Desktop/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linux/airbrake/2.0= .1/recipe-sysroot-native/usr/lib/node_modules/npm/node_modules/make-fetch-h= appen/lib/fetch.js:98:7)
npm verb stack     at async Registr= yFetcher.packument (/home/rently/Desktop/yocto/V5.1/core-image-base/tmp/wor= k/armv8a-poky-linux/airbrake/2.0.1/recipe-sysroot-native/usr/lib/node_modul= es/npm/node_modules/pacote/lib/registry.js:91:19)
npm verb stack  = ;   at async RegistryFetcher.manifest (/home/rently/Desktop/yocto/V5.1= /core-image-base/tmp/work/armv8a-poky-linux/airbrake/2.0.1/recipe-sysroot-n= ative/usr/lib/node_modules/npm/node_modules/pacote/lib/registry.js:129:23)<= br />npm verb cwd /tmp/tmpmztrh1m5
npm verb Linux 5.15.0-125-genericnpm verb node v20.13.0
npm verb npm  v10.5.2
npm ERR! co= de ENOTCACHED
npm ERR! request to https://registry.npmjs.org/lodash.me= rge failed: cache mode is 'only-if-cached' but no cached response is availa= ble.
npm verb exit 1
npm verb unfinished npm timer reify 17325076= 30680
npm verb unfinished npm timer reify:loadTrees 1732507630681
npm verb code 1
npm ERR! A complete log of this run can be found in: /home/rently/Desk= top/yocto/V5.1/core-image-base/tmp/work/armv8a-poky-linux/airbrake/2.0.1/np= m-cache/_logs/2024-11-25T04_07_10_504Z-debug-0.log
 
 
But the point here is lodash.merge module is already downloaded and pl= aced in the $WORKDIR/npm/node_modules. Still bitbake is trying to download = it from npm registery.
--Mxs7MuTFCehFnDEj3ryJ--