Closed crichmon762 closed 1 year ago
Judging by the fact that your toolchain is using a +rpi1
suffix in its versions, that suggests that maybe the toolchain is only designed for compiling for armv6, which would explain the error you're seeing.
Try installing and using a toolchain that is suitable for the Pi 2 v1.2 (armv7) instead.
Thanks. So I figured out how configure was getting the value and sure enough it's correct. I check apt search for a different gcc version that doesn't have a tailing +rpi1 and didn't find any. In configure.py, the only thing the v7 arch is used for is for setting the FPU type, so I'm re-trying with ./configure --with-arm-fpu vfpv3. I also modified config.gypi as: 'arm_version': '7', It's not clear if this will work. If not, it seems the next alternative is to build gcc with the required config. Any more thoughts?
Well, you can try explicitly setting CFLAGS
/CXXFLAGS
to set the arch to something like native
and see if that works:
export CFLAGS=-march=native
export CXXFLAGS=-march=native
./configure ... && make
So, it seems my solution was "successful" in that the build completed successfully. The whole process took about 20hrs. After that, I ran make -j1 test-only, and from that I got two test failures. Failed tests: out/Release/node /home/crichmon/nodejs/node-v18.17.1/test/parallel/test-crypto-dh.js out/Release/node /home/crichmon/nodejs/node-v18.17.1/test/js-native-api/test_cannot_run_js/test.js For now, I'm calling this good and will close the Issue. Thanks again for pointing out the detail I missed.
Version
node-v18.17.1
Platform
Linux renogy0 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux
Subsystem
string
What steps will reproduce the bug?
Same error message from issue: #44357
How often does it reproduce? Is there a required condition?
Every time during compile. Initially, compiling with make -j2 failed for out of memory. Adding more swap space and using -j1 avoided that issue. Build docs could be updated. string.cc error occurred after about 8hrs after 'make clean'. Rerunning make after failure results in the same failure in <5min.
What is the expected behavior? Why is that the expected behavior?
Compile to successful completion.
What do you see instead?
Compiler error on string.cc
Additional information
g++ -v: gcc version 10.2.1 20210110 (Raspbian 10.2.1-6+rpi1)
python3 --version Python 3.9.2
cat /proc/cpuinfo
cat /etc/apt/sources.list