Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

cannot install on centos 5.5 #2281

Closed
oreoshake opened this issue Dec 7, 2011 · 11 comments
Closed

cannot install on centos 5.5 #2281

oreoshake opened this issue Dec 7, 2011 · 11 comments

Comments

@oreoshake
Copy link

x86_64

Python 2.6

[root@neil node]# ./configure
File "./configure", line 158
o['variables']['node_prefix'] = options.prefix if options.prefix else ''
^
SyntaxError: invalid syntax

@bnoordhuis
Copy link
Member

Can you post the output of env python -V?

@oreoshake
Copy link
Author

D'oh, it was still pointing to 2.4.x, fixed that then ran into this when running make:

../deps/uv/src/unix/core.c: In function ‘uv_timer_start’:
../deps/uv/src/unix/core.c:559: warning: dereferencing type-punned pointer will break strict-aliasing rules
../deps/uv/src/unix/core.c: In function ‘uv__accept’:
../deps/uv/src/unix/core.c:739: error: ‘SOCK_NONBLOCK’ undeclared (first use in this function)
../deps/uv/src/unix/core.c:739: error: (Each undeclared identifier is reported only once
../deps/uv/src/unix/core.c:739: error: for each function it appears in.)
../deps/uv/src/unix/core.c:739: error: ‘SOCK_CLOEXEC’ undeclared (first use in this function)
make[1]: *** [/tmp/node/out/Release/obj.target/uv/deps/uv/src/unix/core.o] Error 1
make[1]: Leaving directory `/tmp/node/out'
make: *** [all] Error 2

@bnoordhuis
Copy link
Member

That was fixed in joyent/libuv@d5b2615. It's not back-ported to Node yet (might not happen until v0.8) but you can cherry-pick the commit if you want.

@josephharding
Copy link

@oreoshake - you said "D'oh, it was still pointing to 2.4.x, fixed that then ran into this when running make:"

Do you mean you were pointing to your Python install of 2.4.x? If so, how did you change that? I think I have the same problem. Thanks

@bnoordhuis
Copy link
Member

@gyrospike: Set the PYTHONPATH and PYTHONHOME environment variables before you run make.

@jalleyne
Copy link

I'm having the same problem with make. I added alias and set PYTHONPATH and PYTHONHOME so now if i run which python i get the correct version along with python -version but env python -V still points to 2.4. any thoughts?

@bnoordhuis
Copy link
Member

@jalleyne: Try this:

$ export PYTHON=/path/to/good/python
$ $PYTHON configure
$ make PYTHON=$PYTHON

@jalleyne
Copy link

@bnoordhuis: thanks allot...

now i get this on $PYTHON configure

{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'host_arch': 'ia32',
                 'node_install_npm': 'true',
                 'node_install_waf': 'true',
                 'node_prefix': '',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_use_dtrace': 'false',
                 'node_use_openssl': 'true',
                 'node_use_system_openssl': 'false',
                 'strict_aliasing': 'false',
                 'target_arch': 'ia32',
                 'v8_use_snapshot': 'true'}}
creating  config.gypi
creating  config.mk
Traceback (most recent call last):
  File "tools/gyp_node", line 11, in ?
    import gyp
  File "./tools/gyp/pylib/gyp/__init__.py", line 8, in ?
    import gyp.input
  File "./tools/gyp/pylib/gyp/input.py", line 14, in ?
    import gyp.common
  File "./tools/gyp/pylib/gyp/common.py", line 373
    with open(source_path) as source_file:
            ^
SyntaxError: invalid syntax


@bnoordhuis
Copy link
Member

With what version of python is this? 2.5 might work but 2.6 or 2.7 is recommended. 3.x is not supported.

@jalleyne
Copy link

I should have realized this but i was using the latest version from the repository and its not stable :(.. my fault completely.. i checkedout the same version as i did for my local dev (0.6.12) and its working now. thanks for the help.

@jalleyne
Copy link

@bnoordhuis: it was 2.6 with the latest from repo at about 2pm this afternoon. in retrospect i believe that version was marked as unstable so that might explain the syntax errors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants