Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mckaygerhard opened this issue Mar 18, 2024 · 5 comments · Fixed by #125
Closed

Comments

@mckaygerhard
Copy link
Contributor

mckaygerhard commented Mar 18, 2024

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:

  • apt-get install docker etc etc
  • mkdir -p /home/general/Devel/unofficial-builds-home
  • cd /home/general/Devel/unofficial-builds-home
  • git clone https://github.com/nodejs/unofficial-builds
  • cd /home/general/Devel/unofficial-builds-home/unofficial-builds/
  • edit bin/_config.sh and only leaves x86 target and "header" targer
  • bin/local_build.sh -r x6 -v v16.20.2

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 mckaygerhard changed the title help on local builds, error on tmp help on local builds, error on tmp, seems Dockerfiles must be edited for volumes ? Mar 18, 2024
@mckaygerhard
Copy link
Contributor Author

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
Copy link
Member

rvagg commented Mar 19, 2024

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? #124

@mckaygerhard
Copy link
Contributor Author

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

mckaygerhard added a commit to mckaygerhard/unofficial-builds that referenced this issue Mar 19, 2024
…ill build

* helps and closes nodejs#123
  due a rare error like `ccache: error: Could not find compiler "g++" in PATH`
@rvagg
Copy link
Member

rvagg commented Mar 26, 2024

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

@rvagg rvagg closed this as completed Mar 26, 2024
@mckaygerhard
Copy link
Contributor Author

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

mckaygerhard added a commit to mckaygerhard/unofficial-builds that referenced this issue Mar 26, 2024
…tions


nodejs#125 (review)

yes, sorry, mabe was better "recipe & versions combinations" but well.. we already address that in nodejs#123

Co-authored-by: Rod Vagg <rod@vagg.org>
rvagg added a commit that referenced this issue Apr 8, 2024
…es builds (#125)

* expands information for local compilations, clarify not all recipes will build

* helps and closes #123
  due a rare error like `ccache: error: Could not find compiler "g++" in PATH`

* Fix user and clone miscpelled in README

#125 (review)

Co-authored-by: Rod Vagg <rod@vagg.org>

* fix README.md misspelled recipe word to better understand the instructions

#125 (review)

yes, sorry, mabe was better "recipe & versions combinations" but well.. we already address that in #123

Co-authored-by: Rod Vagg <rod@vagg.org>

* fix init dir and name reference on README

Co-authored-by: Rod Vagg <rod@vagg.org>

---------

Co-authored-by: Rod Vagg <rod@vagg.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants