Closed YounsooChoi closed 8 years ago
why are you doing -> [sudo] make install. Try: sudo make install & are you sure this isn't a python problem on your system?
Try sudo PYTHON=$PYTHON make install
- sudo doesn't inherit the environment for security reasons.
python used to work with other python programs but the script is keep trying to use /bin/python instead of /opt/bin/python2.7 even though I typed export
[usagicore@RT-AC68U-3B08 node]$ export "PYTHON=/opt/bin/python2.7" [usagicore@RT-AC68U-3B08 node]$ make install /opt/bin/python2.7 tools/gyp_node.py -f make
/bin/sh: python: not found gyp: Call to 'python -c "import sys; print sys.byteorder"' returned exit status 127 while in /tmp/mnt/HDD/!usagicore/git/node/deps/v8/tools/gyp/v8.gyp. Makefile:53: recipe for target 'out/Makefile' failed
make: *** [out/Makefile] Error 1
[usagicore@RT-AC68U-3B08 node]$ export "PYTHON=/opt/bin/python2.4"
[usagicore@RT-AC68U-3B08 node]$ PYTHON=$PYTHON make install /opt/bin/python2.7 tools/gyp_node.py -f make /bin/sh: python: not found
gyp: Call to 'python -c "import sys; print sys.byteorder"' returned exit status 127 while in /tmp/mnt/HDD/!usagicore/git/node/deps/v8/tools/gyp/v8.gyp.
Makefile:53: recipe for target 'out/Makefile' failed
make: *** [out/Makefile] Error 1
If it's in v8.gyp, there isn't much we can do about that. I've tried getting a patch accepted upstream that made the python binary configurable but it got rejected.
http://stackoverflow.com/questions/17706310/how-to-add-path-with-module-to-python
git clone https://chromium.googlesource.com/external/gyp cd gyp sudo ./setup.py install
what about something like this?
how about:
PYTHON=/opt/bin/python2.7
ln -s $PYTHON python
PATH=$(pwd):$PATH $PYTHON ./configure
PATH=$(pwd):$PATH $PYTHON make
doesn't work. same output On Jan 8, 2016 4:00 AM, "Elan Ruusamäe" notifications@github.com wrote:
how about:
PYTHON=/opt/bin/python2.7 ln -s $PYTHON python PATH=$(pwd):$PATH $PYTHON ./configure PATH=$(pwd):$PATH $PYTHON make
— Reply to this email directly or view it on GitHub https://github.com/nodejs/help/issues/71#issuecomment-169774153.
paste exact output including commands you typed.
sorry i was being idiot
ASUSWRT-Merlin RT-AC68U_3.0.0.4 Thu Dec 24 18:54:10 UTC 2015
[usagicore@RT-AC68U-3B08 root]$ cd /tmp/mnt/HDD/!usagicore/git/node*
[usagicore@RT-AC68U-3B08 node]$ PYTHON=/opt/bin/python2.7
[usagicore@RT-AC68U-3B08 node]$ ln -s $PYTHON python
ln: python: File exists
[usagicore@RT-AC68U-3B08 node]$ PATH=$(pwd):$PATH $PYTHON ./configure
creating ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': [],
'include_dirs': [],
'libraries': []},
'variables': { 'arm_float_abi': 'default',
'arm_fpu': 'vfpv3',
'arm_thumb': 0,
'arm_version': '7',
'asan': 0,
'gas_version': '2.25',
'host_arch': 'arm',
'icu_small': 'false',
'node_byteorder': 'little',
'node_enable_v8_vtunejit': 'false',
'node_install_npm': 'true',
'node_prefix': '/usr/local',
'node_release_urlbase': '',
'node_shared_http_parser': 'false',
'node_shared_libuv': 'false',
'node_shared_openssl': 'false',
'node_shared_zlib': 'false',
'node_tag': '',
'node_use_dtrace': 'false',
'node_use_etw': 'false',
'node_use_lttng': 'false',
'node_use_openssl': 'true',
'node_use_perfctr': 'false',
'openssl_fips': '',
'openssl_no_asm': 0,
'python': '/opt/bin/python2.7',
'target_arch': 'arm',
'uv_parent_path': '/deps/uv/',
'uv_use_dtrace': 'false',
'v8_enable_gdbjit': 0,
'v8_enable_i18n_support': 0,
'v8_no_strict_aliasing': 1,
'v8_optimized_debug': 0,
'v8_random_seed': 0,
'v8_use_snapshot': 'true',
'want_separate_host_toolset': 0}}
creating ./config.gypi
creating ./config.mk
[usagicore@RT-AC68U-3B08 node]$ PATH=$(pwd):$PATH $PYTHON make
/opt/bin/python2.7: can't open file 'make': [Errno 2] No such file or directory
[usagicore@RT-AC68U-3B08 node]$
at last just make
seems working
ah, sorry, i intended to remove python from make, but seems i still left it in for final post, it should had been:
PATH=$(pwd):$PATH make
g++ -pthread -rdynamic -B/tmp/mnt/HDD/!usagicore/git/node/ -o /tmp/mnt/HDD/!usagicore/git/node/out/Release/mksnapshot -Wl,--start-group /tmp/mnt/HDD/!usagicore/git/node/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/mksnapshot.o /tmp/mnt/HDD/!usagicore/git/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_base.a /tmp/mnt/HDD/!usagicore/git/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_nosnapshot.a /tmp/mnt/HDD/!usagicore/git/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_libplatform.a /tmp/mnt/HDD/!usagicore/git/node/out/Release/obj.target/deps/v8/tools/gyp/libv8_libbase.a -Wl,--end-group -ldl -lrt
LD_LIBRARY_PATH=/tmp/mnt/HDD/!usagicore/git/node/out/Release/lib.host:/tmp/mnt/HDD/!usagicore/git/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp; mkdir -p /tmp/mnt/HDD/!usagicore/git/node/out/Release/obj.target/v8_snapshot/geni; "/tmp/mnt/HDD/!usagicore/git/node/out/Release/mksnapshot" --log-snapshot-positions --logfile "/tmp/mnt/HDD/!usagicore/git/node/out/Release/obj.target/v8_snapshot/geni/snapshot.log" --startup_src "/tmp/mnt/HDD/!usagicore/git/node/out/Release/obj.target/v8_snapshot/geni/snapshot.cc" ""
/tmp/mnt/HDD/!usagicore/git/node/out/Release/mksnapshot: can't load library 'libdl.so.1'
deps/v8/tools/gyp/v8_snapshot.target.mk:13: recipe for target '/tmp/mnt/HDD/!usagicore/git/node/out/Release/obj.target/v8_snapshot/geni/snapshot.cc' failed
make[1]: *** [/tmp/mnt/HDD/!usagicore/git/node/out/Release/obj.target/v8_snapshot/geni/snapshot.cc] Error 16
make[1]: Leaving directory '/tmp/mnt/HDD/!usagicore/git/node/out'
Makefile:45: recipe for target 'node' failed
make: *** [node] Error 2
similarily to $PATH you can add path to libdl.so.1 via $LD_LIBRARY_PATH on linux (osx it's a bit different variable, google it), i.e if libdl.so.1 is in /opt/lib, do:
export LD_LIBRARY_PATH=/opt/lib${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH}
but seems you have some weird platform, did you try googling for: a) pre-built binaries b) how to compile nodejs for that platform?
also, it would be a lot easier (instead of env hacking) if you just symlink your needed tools to /usr/bin (or /usr/local/bin) and /usr/lib (or /usr/local/lib) appropriately, as those are usually in $PATH and ld search path
mark
I have python2.7 in /opt/bin/python2.7 I followed guide in README.md
and I got: