Martin Jansa 4efcbfbcbf nodejs: fix do_install failure with 'shared' PACKAGECONFIG
* tools/install.py uses:
  output_lib = 'libnode.' + variables.get('shlib_suffix')
  action([output_prefix + output_lib], variables.get('libdir') + '/'+ output_lib)

  and when libdir is absolute path (either ${D}${libdir} before:
  https://git.openembedded.org/meta-openembedded/commit/?id=42c0f0120ad1caf25118d079314c988d4633a437
  or just ${libdir} "/usr/lib") it doesn't respect prefix nor ${D}
  and fails to write to host's directory when "shared" PACKAGECONFIG
  is enabled:
  http://errors.yoctoproject.org/Errors/Details/689959/

if [ ! -r node ] || [ ! -L node ]; then \
  ln -fs out/Release/node node; fi
TOPDIR/tmp-glibc/work/core2-64-oe-linux/nodejs/18.12.1-r0/recipe-sysroot-native/usr/bin/python3-native/python3 tools/install.py install 'TOPDIR/tmp-glibc/work/core2-64-oe-linux/nodejs/18.12.1-r0/image' '/usr'
installing TOPDIR/tmp-glibc/work/core2-64-oe-linux/nodejs/18.12.1-r0/image/usr/bin/node
installing /usr/lib/libnode.so.108
Traceback (most recent call last):
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/nodejs/18.12.1-r0/node-v18.12.1/tools/install.py", line 351, in <module>
    run(sys.argv[:])
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/nodejs/18.12.1-r0/node-v18.12.1/tools/install.py", line 342, in run
    files(install)
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/nodejs/18.12.1-r0/node-v18.12.1/tools/install.py", line 179, in files
    action([output_prefix + output_lib], variables.get('libdir') + '/' + output_lib)
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/nodejs/18.12.1-r0/node-v18.12.1/tools/install.py", line 77, in install
    try_copy(path, dst)
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/nodejs/18.12.1-r0/node-v18.12.1/tools/install.py", line 67, in try_copy
    return shutil.copy2(source_path, target_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/nodejs/18.12.1-r0/recipe-sysroot-native/usr/lib/python3.11/shutil.py", line 436, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/nodejs/18.12.1-r0/recipe-sysroot-native/usr/lib/python3.11/shutil.py", line 258, in copyfile
    with open(dst, 'wb') as fdst:
         ^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/usr/lib/libnode.so.108'
make: *** [Makefile:189: install] Error 1

* use just baselib "lib" so that it respects ${D} as well as ${prefix}
  while using e.g. lib32 or lib64 when multilib is enabled

* similarly as 'node' binary is installed to relative hardcoded path "bin" with:
  action([output_prefix + output_file], 'bin/' + output_file)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-15 14:37:35 -08:00
2023-02-02 21:36:54 -08:00
2023-02-01 09:11:49 -08:00
2019-06-15 16:45:33 -07:00
2018-08-27 10:53:58 -07:00

Collection of layers for the OE-core universe

Main layer maintainer: Khem Raj <raj.khem@gmail.com>

This repository is a collection of layers to suppliment OE-Core
with additional packages, Each layer have designated maintainer
Please see the respective READMEs in the layer subdirectories
Description
Collection of OpenEmbedded layers
https://openembedded.org/
Readme 92 MiB
Languages
BitBake 85%
Shell 6.2%
C 3%
Roff 2.1%
NASL 1.9%
Other 1.6%