nvm
                                
                                 nvm copied to clipboard
                                
                                    nvm copied to clipboard
                            
                            
                            
                        Raspberry PI and old node versions
The following errors occurred when installing old node versions (simple nvm install $VERSION) on an RPi4 with the default Raspbian flavor of Linux:
- [ ] 0.12 (nvm tries v0.12.18)
- [ ] 0.8 (nvm tries v0.8.28 -- same error but different line numbers)
$>./configure --prefix=/home/pi/.nvm/versions/node/v0.12.18 --without-snapshot<
Traceback (most recent call last):
  File "./configure", line 1009, in <module>
    configure_node(output)
  File "./configure", line 539, in configure_node
    o['variables']['gcc_version'] = 10 * cc_version[0] + cc_version[1]
IndexError: tuple index out of range
- [ ] 0.6 (nvm tries v0.6.21)
/usr/bin/g++ -o obj/release/accessors.o -c -fno-rtti -fno-exceptions -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -Wno-abi -pedantic -mfloat-abi=softfp -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -DCAN_USE_VFP_INSTRUCTIONS -DUSE_EABI_HARDFLOAT=0 -DV8_TARGET_ARCH_ARM -DENABLE_DEBUGGER_SUPPORT -I/home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src /home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src/accessors.cc
In file included from /usr/include/features.h:448,
                 from /usr/include/arm-linux-gnueabihf/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from /home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src/../include/v8stdint.h:33,
                 from /home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src/../include/v8.h:41,
                 from /home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src/v8.h:52,
                 from /home/pi/.nvm/.cache/src/node-v0.6.21/files/deps/v8/src/accessors.cc:28:
/usr/include/arm-linux-gnueabihf/gnu/stubs.h:7:11: fatal error: gnu/stubs-soft.h: No such file or directory
 # include <gnu/stubs-soft.h>
           ^~~~~~~~~~~~~~~~~~
compilation terminated.
scons: *** [obj/release/accessors.o] Error 1
scons: building terminated because of errors.
Waf: Leaving directory `/home/pi/.nvm/.cache/src/node-v0.6.21/files/out'
Build failed:  -> task failed (err #2): 
        {task: libv8.a SConstruct -> libv8.a}
If any additional install parameters are found to fix it, I'd be more than happy to add them to nvm so it can automate them.
The 0.8 and 0.12 errors stem from a cc invocation whose meaning has changed:
- 0.12: https://github.com/nodejs/node/blob/v0.12/configure#L483
- 0.8: https://github.com/nodejs/node/blob/v0.8.28/configure#L330
Older gcc versions used to print semver with the -dumpversion flag.  Now -dumpversion prints major version and -dumpfullversion prints semver, so ideally nvm would run -dumpversion and somehow intercept and rewrite the call.
Is there any way to fix this now?
@BenMake since the issue is still open, you can assume there’s not.
@BenMake I take a creak at it.
Encountered the same issue trying to install node 12 on RPi4, any way to work around this?