| Summary: | nodejs won't build on Fedora 35 | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | htenberge |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | buildroot |
| Priority: | P5 | ||
| Version: | 2021.08 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
htenberge
2021-12-13 10:00:07 UTC
Certain parts of the build invoke "python" and aren't using a full path to the bin to do so. While PATH has been set to include the host built python3 and PYTHON is set to host-python3 built bin, the build process is not respecting that. We do not have a symlink python -> python3 (afaik most distros do not include python by default, just python3) so when the build stage gets invoked it's using the "python" available from PATH LD_LIBRARY_PATH=/mnt/development/buildroot/output/build/nodejs-14.18.1/out/Release/lib.host:/mnt/development/buildroot/output/build/nodejs-14.18.1/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../tools/v8_gypfiles; mkdir -p /mnt/development/buildroot/output/build/nodejs-14.18.1/out/Release/obj/gen/generate-bytecode-output-root/builtins-generated; python ../../deps/v8/tools/run.py "/mnt/development/buildroot/output/build/nodejs-14.18.1/out/Release/v8-qemu-wrapper" "/mnt/development/buildroot/output/build/nodejs-14.18.1/out/Release/bytecode_builtins_list_generator" "/mnt/development/buildroot/output/build/nodejs-14.18.1/out/Release/obj/gen/generate-bytecode-output-root/builtins-generated/bytecodes-builtins-list.h" We can use the same approach as in qt5webkit:
# QtWebkit's build system uses python, but only supports python2. We work
# around this by forcing python2 early in the PATH, via a python->python2
# symlink.
QT5WEBKIT_CONF_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
QT5WEBKIT_MAKE_ENV = PATH=$(@D)/host-bin:$(BR_PATH)
define QT5WEBKIT_PYTHON2_SYMLINK
mkdir -p $(@D)/host-bin
ln -sf $(HOST_DIR)/bin/python2 $(@D)/host-bin/python
endef
QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK
The following patch should fix this issue: https://patchwork.ozlabs.org/project/buildroot/patch/20211222140737.1179968-1-fontaine.fabrice@gmail.com/ Moreover, python 3.10 support has been added to nodejs 14.18.2: https://github.com/nodejs/node/releases/tag/v14.18.2 |