nodejs / unofficial-builds

Unofficial binaries for Node.js
https://unofficial-builds.nodejs.org
221 stars 46 forks source link

help on local builds, error on tmp, seems Dockerfiles must be edited for volumes ? #123

Closed mckaygerhard closed 3 months ago

mckaygerhard commented 3 months ago

i was trying local build as describe the readme.. installing a virtual machine and put tyhe commands, but gives me write errror, seem the dockerfiles uses some hardcoded volumes.. so those must exits on /home/node ?

the error is

  CXX(target) /home/node/node-v16.20.2/out/Release/obj.target/icuucx/deps/icu-small/source/common/ucnv_ext.o
ccache: error: Failed to create directory /home/node/.ccache/tmp: Permission denied
make[2]: *** [tools/icu/icuucx.target.mk:311: /home/node/node-v16.20.2/out/Release/obj.target/icuucx/deps/icu-

checked available space is 2.9G aftyer runs command to build, more than enought

Filesystem      Size  Used Avail Use% Mounted on
udev            2,4G     0  2,4G   0% /dev
tmpfs           492M  1,2M  491M   1% /run
/dev/sda1        19G   16G  2,9G  84% /
tmpfs           2,4G  100K  2,4G   1% /dev/shm
tmpfs           5,0M  4,0K  5,0M   1% /run/lock
tmpfs           2,4G     0  2,4G   0% /sys/fs/cgroup
tmpfs           492M   28K  492M   1% /run/user/1000

complete commands i used was:

last log lines following:

Source tarball already exists at /home/general/Devel/unofficial-builds-home/staging/src/v16.20.2/node-v16.20.2.tar.xz, skipping download
Building x86 recipe...
+ release_urlbase=https://unofficial-builds.nodejs.org/download/release/
+ disttype=release
+ customtag=
+ datestring=
+ commit=
+ fullversion=v16.20.2
+ source_url=https://nodejs.org/download/release/v16.20.2/node-v16.20.2.tar.xz
+ config_flags=--openssl-no-asm
+ cd /home/node
+ tar -xf node.tar.xz
+ cd node-v16.20.2
+ export 'CC=ccache gcc'
+ CC='ccache gcc'
+ export 'CXX=ccache g++'
+ CXX='ccache g++'
+ export CXXFLAGS=-m32
+ CXXFLAGS=-m32
+ export CFLAGS=-m32
+ CFLAGS=-m32
++ tr --delete v
++ cut -d . -f 1
++ echo v16.20.2
+ export MAJOR_VERSION=16
+ MAJOR_VERSION=16
+ '[' 16 -ge 16 ']'
+ . /opt/rh/devtoolset-9/enable
++ export PATH=/opt/rh/devtoolset-9/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ PATH=/opt/rh/devtoolset-9/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ export MANPATH=/opt/rh/devtoolset-9/root/usr/share/man:
++ MANPATH=/opt/rh/devtoolset-9/root/usr/share/man:
++ export INFOPATH=/opt/rh/devtoolset-9/root/usr/share/info
++ INFOPATH=/opt/rh/devtoolset-9/root/usr/share/info
++ export PCP_DIR=/opt/rh/devtoolset-9/root
++ PCP_DIR=/opt/rh/devtoolset-9/root
+++ rpm --eval '%{_libdir}'
++ rpmlibdir=/usr/lib64
++ '[' /usr/lib64 '!=' /usr/ ']'
++ rpmlibdir32=:/opt/rh/devtoolset-9/root/usr/lib
++ export LD_LIBRARY_PATH=/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib
++ LD_LIBRARY_PATH=/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib
++ export LD_LIBRARY_PATH=/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/opt/rh/devtoolset-9/root/usr/lib64/dyninst:/opt/rh/devtoolset-9/root/usr/lib/dyninst:/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib
++ LD_LIBRARY_PATH=/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/opt/rh/devtoolset-9/root/usr/lib64/dyninst:/opt/rh/devtoolset-9/root/usr/lib/dyninst:/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib
++ export PKG_CONFIG_PATH=/opt/rh/devtoolset-9/root/usr/lib/pkgconfig
++ PKG_CONFIG_PATH=/opt/rh/devtoolset-9/root/usr/lib/pkgconfig
++ getconf _NPROCESSORS_ONLN
+ make -j1 binary V= DESTCPU=x86 PREFIX=/usr ARCH=x86 VARIATION= DISTTYPE=release CUSTOMTAG= DATESTRING= COMMIT= RELEASE_URLBASE=https://unofficial-builds.nodejs.org/download/release/ CONFIG_FLAGS=--openssl-no-asm
fatal: Not a git repository (or any of the parent directories): .git
rm -f -r node-v16.20.2-linux-x86
rm -f -r out/deps out/Release
python3 ./configure \
    --prefix=/ \
    --dest-cpu=x86 \
    --tag= \
    --release-urlbase=https://unofficial-builds.nodejs.org/download/release/ \
    --openssl-no-asm --download=all --with-intl=full-icu
Node.js configure: Found Python 3.6.8...
WARNING: --openssl-no-asm will result in binaries that do not take advantage
         of modern CPU cryptographic instructions and will therefore be slower.
         Please refer to BUILDING.md
WARNING: warnings were emitted in the configure phase
INFO: configure completed successfully
make install DESTDIR=node-v16.20.2-linux-x86 V= PORTABLE=1
make -C out BUILDTYPE=Release V=
  TOUCH /home/node/node-v16.20.2/out/Release/obj.target/deps/googletest/gtest_prod.stamp
  TOUCH /home/node/node-v16.20.2/out/Release/obj.target/tools/icu/icu_implementation.stamp
  TOUCH /home/node/node-v16.20.2/out/Release/obj.target/tools/icu/icu_uconfig.stamp
  TOUCH /home/node/node-v16.20.2/out/Release/obj.target/tools/icu/icu_uconfig_target.stamp
  CXX(target) /home/node/node-v16.20.2/out/Release/obj.target/icuucx/deps/icu-small/source/common/ucnv_ext.o
ccache: error: Failed to create directory /home/node/.ccache/tmp: Permission denied
make[2]: *** [tools/icu/icuucx.target.mk:311: /home/node/node-v16.20.2/out/Release/obj.target/icuucx/deps/icu-small/source/common/ucnv_ext.o] Error 1
make[1]: *** [Makefile:113: node] Error 2
make: *** [Makefile:1245: node-v16.20.2-linux-x86.tar] Error 2
mckaygerhard commented 3 months ago

ok got it.. but the README does not point if the local build must be with root or wihtout.. it solved running as normal user..

but now i have a problem, its normal for this git env but locally build has no rules or instructions to clean locally so next different build will fails:

ccache: error: Could not find compiler "g++" in PATH
Node.js configure: Found Python 2.7.5...
**WARNING: C++ compiler (CXX=ccache g++, 0.0.0) too old, need g++ 6.3.0 or clang++ 8.0.0**
WARNING: --openssl-no-asm will result in binaries that do not take advantage
         of modern CPU cryptographic instructions and will therefore be slower.
         Please refer to BUILDING.md
WARNING: warnings were emitted in the configure phase
INFO: configure completed successfully
rvagg commented 3 months ago

did you get this warning?

Warning: UID is less than 1000, setting to 1000, output files will be owned by this UID

I'm hoping this should do the trick, would you mind checking it out and seeing? https://github.com/nodejs/unofficial-builds/pull/124

mckaygerhard commented 3 months ago

I'm hoping this should do the trick, would you mind checking it out and seeing? #124

that was the first time, i just a pull request with much BETTER instructions to not so familiar users..

but found that not all recipes will build.. by example the recipe for version 20.X.Y builds fine for x86, armv6l, x64-glibc-217, musl but the version 16.X.Y of nodejs only builds for x86 recipe..

the error in those failed recipes are:

ccache: error: Could not find compiler "g++" in PATH

i previously erase all docker images and containers in system with docker prune -a cos i made the test in a clean fresh installation on a qemu VM

rvagg commented 3 months ago

ccache: error: Could not find compiler "g++" in PATH - if you rewind in git history you might find a version that works. This is probably just an update in the base Ubuntu/Alpine/whatever Docker image or in the names of the packages installed.

glad you've documented the expectation that they may not all work in your PR though

mckaygerhard commented 3 months ago

yeah thanks @rvagg noted that was in some recipes.. only few works.. by example not all v14 recipes works and gives me such errors