On attempt to emerge net-libs/nodejs-16.19.1 it fails to build, with the error message: * ERROR: net-libs/nodejs-16.19.1::gentoo failed (prepare phase): * patch -p1 failed with /var/tmp/portage/net-libs/nodejs-16.19.1/files/nodejs-16.4.2-paxmarking.patch * * Call stack: * ebuild.sh, line 136: Called src_prepare * environment, line 3306: Called default * phase-functions.sh, line 872: Called default_src_prepare * phase-functions.sh, line 948: Called __eapi8_src_prepare * environment, line 351: Called eapply '--' '/var/tmp/portage/net-libs/nodejs-16.19.1/files/nodejs-15.2.0-global-npm-config.patch' '/var/tmp/portage/net-libs/nodejs-16.19.1/files/nodejs-gcc-13.patch' '/var/tmp/portage/net-libs/nodejs-16.19.1/files/nodejs-16.4.2-paxmarking.patch' * environment, line 1448: Called _eapply_patch '/var/tmp/portage/net-libs/nodejs-16.19.1/files/nodejs-16.4.2-paxmarking.patch' * environment, line 1386: Called __helpers_die 'patch -p1 failed with /var/tmp/portage/net-libs/nodejs-16.19.1/files/nodejs-16.4.2-paxmarking.patch' * isolated-functions.sh, line 112: Called die * The specific snippet of code: * die "$@" With 'pax-kernel' USE flag disabled, compilation emerge succeeds without any problem. Reproducible: Always Steps to Reproduce: 1. enable 'pax-kernel' USE-flag 2. run emerge =net-libs/nodejs-16.19.1
The issue is that the patch for node.gyp to apply pax marking for the 16.x branch doesn't apply to > nodejs-16.0.0. It would be very helpful if someone could take a look and let me know how to adjust the patch. Thanks, William
Created attachment 864599 [details, diff] nodejs-18.16.0-paxmarking.patch This applies cleanly to nodejs-20.3.0.
I just updated net-libs/nodejs from 20.2.0 to 20.5.1 (amd64 stable), and it seems like nodejs-18.16.0-paxmarking.patch no longer works for 20.5.1. (Reproducible: always) I'm on a desktop-profile but I have USE=pax-kernel globally in my make.conf (among others, like "hardened"). ---- terminal copy & paste ---- # emerge -aDuvN --with-bdeps=y --keep-going @world These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 21.58 s. [ebuild U ] net-libs/nodejs-20.5.1:0/20::gentoo [20.2.0:0/20::gentoo] USE="icu inspector npm pax-kernel snapshot ssl system-icu system-ssl -corepack% -debug -doc (-lto) -test" CPU_FLAGS_X86="sse2" 0 KiB Total: 1 package (1 upgrade), Size of downloads: 0 KiB Would you like to merge these packages? [Yes/No] Yes >>> Verifying ebuild manifests >>> Running pre-merge checks for net-libs/nodejs-20.5.1 >>> Emerging (1 of 1) net-libs/nodejs-20.5.1::gentoo >>> Failed to emerge net-libs/nodejs-20.5.1, Log file: >>> '/var/log/portage/net-libs:nodejs-20.5.1:20230818-082615.log' >>> Jobs: 0 of 1 complete, 1 failed Load avg: 0.84, 0.57, 0.48 * Messages for package net-libs/nodejs-20.5.1: * Log file: /var/log/portage/net-libs:nodejs-20.5.1:20230818-082615.log * ERROR: net-libs/nodejs-20.5.1::gentoo failed (prepare phase): * patch -p1 failed with /var/tmp/portage/net-libs/nodejs-20.5.1/files/nodejs-18.16.0-paxmarking.patch * * Call stack: * ebuild.sh, line 136: Called src_prepare * environment, line 3613: Called default * phase-functions.sh, line 872: Called default_src_prepare * phase-functions.sh, line 948: Called __eapi8_src_prepare * environment, line 369: Called eapply '--' '/var/tmp/portage/net-libs/nodejs-20.5.1/files/nodejs-20.3.0-gcc14.patch' '/var/tmp/portage/net-libs/nodejs-20.5.1/files/nodejs-18.16.0-paxmarking.patch' * environment, line 1748: Called _eapply_patch '/var/tmp/portage/net-libs/nodejs-20.5.1/files/nodejs-18.16.0-paxmarking.patch' * environment, line 1686: Called __helpers_die 'patch -p1 failed with /var/tmp/portage/net-libs/nodejs-20.5.1/files/nodejs-18.16.0-paxmarking.patch' * isolated-functions.sh, line 112: Called die * The specific snippet of code: * die "$@" ---- snip ---- I got nodejs-20.5.1 installed with USE="-pax-kernel" for now.
Patch from Peter Levine works for nodejs-20.5.1 too.
(In reply to Martin Filo from comment #4) > Patch from Peter Levine works for nodejs-20.5.1 too. It also works for me. The patch in the gentoo repository has the same name, but differs by two lines from Peter's, (which I now have in my overlay): $ diff gentoo/net-libs/nodejs/files/nodejs-18.16.0-paxmarking.patch overlay/net-libs/nodejs/files/nodejs-18.16.0-paxmarking.patch 19a20 > 'node_js2c_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_js2c<(EXECUTABLE_SUFFIX)', 22d22 < 'node_text_start_object_path': 'src/large_pages/node_text_start.node_text_start.o'
See my patches: https://bugs.gentoo.org/694100 https://bugs.gentoo.org/735832