Hi, all
I used recipetool to create the recipe for NPM packages
If the npm package has dependence(s) it works great.
But if not, the error below happens.
I just add a fake dependence in npm-shrinkwrap.json then it works
# cat google-protobuf/npm-shrinkwrap.json
{
"name": "google-protobuf",
"version": "3.3.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"nan": {
"version": "2.14.1",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
"integrity":
"sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw=="
}
}
}
Another way to make it work is to replace the npmsw with file in SRC_URI
======== nan.bb =======
SRC_URI = " \
npm://registry.npmjs.org;package=nan;version=${PV} \
file://npm-shrinkwrap.json;subdir=npm \
"
S = "${WORKDIR}/npm"
inherit npm
======= google-protobuf.bb ==========
SRC_URI = " \
npm://registry.npmjs.org/;package=google-protobuf;version=${PV} \
npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json \
"
S = "${WORKDIR}/npm"
inherit npm
====== error ======
ERROR: google-protobuf-3.3.0-r0 do_fetch: Failure expanding variable
TUNE_FEATURES_tune-core2-64, expression was ${TUNE_FEATURES_tune-x86-64} core2
which triggered exception RecursionError: maximum recursion depth exceeded
while calling a Python object
ERROR: Logfile of failure stored in:
/home/edson/ng-trunk/nodegrid/tmp/work/core2-64-poky-linux/google-protobuf/3.3.0-r0/temp/log.do_fetch.33980
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are
['virtual:native:/home/edson/ng-trunk/meta-extended/meta-oe/recipes-oe/node/nodejs_12.14.1.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: ['nodejs-native', 'pkgconfig-native',
'zlib-native', 'brotli-native', 'openssl-native', 'xz-native', 'quilt-native',
'python3-native', 'icu-native', 'c-ares-native', 'libuv-native',
'gnu-config-native', 'libtool-native', 'automake-native', 'autoconf-native',
'ninja-native', 'cmake-native', 'gettext-minimal-native', 'readline-native',
'libffi-native', 'bzip2-native', 'sqlite3-native', 'libtirpc-native',
'util-linux-native', 'gdbm-native', 'libnsl2-native', 'unzip-native',
'texinfo-dummy-native', 'm4-native', 're2c-native', 'expat-native',
'ncurses-native', 'curl-native', 'libpcre2-native', 'libcap-ng-native']
| NOTE: Skipping as already exists in sysroot: []
| DEBUG: sed -e
's:^[^/]*/:/home/edson/ng-trunk/nodegrid/tmp/work/core2-64-poky-linux/google-protobuf/3.3.0-r0/recipe-sysroot-native/:g'
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/nodejs-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/pkgconfig-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/openssl-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/quilt-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/python3-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/icu-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/gnu-config-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/libtool-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/automake-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/autoconf-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/ncurses-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/curl-native/fixmepath
/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/libpcre2-native/fixmepath
| xargs sed -i -e
's:FIXMESTAGINGDIRTARGET:/home/edson/ng-trunk/nodegrid/tmp/work/core2-64-poky-linux/google-protobuf/3.3.0-r0/recipe-sysroot:g;
s:FIXMESTAGINGDIRHOST:/home/edson/ng-trunk/nodegrid/tmp/work/core2-64-poky-linux/google-protobuf/3.3.0-r0/recipe-sysroot-native:g'
-e
's:FIXME_PSEUDO_SYSROOT:/home/edson/ng-trunk/nodegrid/tmp/sysroots-components/x86_64/pseudo-native:g'
-e 's:FIXME_HOSTTOOLS_DIR:/home/edson/ng-trunk/nodegrid/tmp/hosttools:g' -e
's:FIXME_PKGDATA_DIR:/home/edson/ng-trunk/nodegrid/tmp/pkgdata/genericx86-64:g'
-e
's:FIXME_PSEUDO_LOCALSTATEDIR:/home/edson/ng-trunk/nodegrid/tmp/work/core2-64-poky-linux/google-protobuf/3.3.0-r0/pseudo/:g'
-e
's:FIXME_LOGFIFO:/home/edson/ng-trunk/nodegrid/tmp/work/core2-64-poky-linux/google-protobuf/3.3.0-r0/temp/fifo.33980:g'
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function do_fetch
| DEBUG: Executing python function base_do_fetch
| DEBUG: Python function base_do_fetch finished
| DEBUG: Python function do_fetch finished
| ERROR: Failure expanding variable TUNE_FEATURES_tune-core2-64, expression was
${TUNE_FEATURES_tune-x86-64} core2 which triggered exception RecursionError:
maximum recursion depth exceeded while calling a Python object
ERROR: Task
(/home/edson/ng-trunk/meta-extended/meta-oe/recipes-npm/google-protobuf/google-protobuf_3.3.0.bb:do_fetch)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 3501 tasks of which 3500 didn't need to be rerun
and 1 failed.
Summary: 1 task failed:
/home/edson/ng-trunk/meta-extended/meta-oe/recipes-npm/google-protobuf/google-protobuf_3.3.0.bb:do_fetch
Summary: There were 2 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Thanks in advance.
Edson Seabra
Principal Engineer
M +1 510 579 0843
E [email protected]<mailto:[email protected]>
[1506169147061_OutlookEmoji-1505330244060_ZPELogo_Email.png1e6c5898-d340-4c90-8c28-e559c26bc7d1.png]
46757 Fremont Blvd., Fremont, CA 94538
zpesystems.com<https://www.zpesystems.com/> | Request a Nodegrid
Demo<https://www.zpesystems.com/demo/>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#49535): https://lists.yoctoproject.org/g/yocto/message/49535
Mute This Topic: https://lists.yoctoproject.org/mt/74563876/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-