Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#49549 closed defect (fixed)

Port nodejs fails to upgrade from v0.12.7 to v4.2.1

Reported by: m74z00219@… Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: nodejs

Description

Hi all,

I've been trying to upgrade node the past few days to no avail. I've tried doing so with and without tracemode. I've tried using `sudo port select --set clang mp-clang-3.8'. Each time, I made sure to clean the port and re-source my bash_profile. Still, the upgrade fails.

These seem to be the relevant bits: Syntax error on line 2383:

:info:configure     import sys; print sys.byteorder
:info:configure                         ^
:info:configure SyntaxError: invalid syntax

Line 2434:

:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_nodejs/nodejs/work/node-v4.2.1" && ./configure --prefix=/opt/local --without-npm --with-intl=system-icu --dest-cpu=x64 --shared-openssl --shared-openssl-includes=/opt/local/include/openssl --shared-openssl-libpath=/opt/local/lib 

Not sure what it all means though. Another thought...perhaps the wrong compiler is being used? According to the log, Apple's clang is being used even though I've set $CC and $CXX accordingly to match /opt/bin/local/clang{++}'. I also sudo port select --set clang mp-clang-3.8'.

Please let me know if there's any more info I could provide.

-Chris

Attachments (1)

main.log (272.8 KB) - added by m74z00219@… 9 years ago.

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by m74z00219@…

Attachment: main.log added

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ciserlohn@… removed
Owner: changed from macports-tickets@… to ciserlohn@…

By design, MacPorts will not use the compiler you selected. What you select is for your own personal convenience only. MacPorts will use the compiler it has determined is the correct one to use.

This looks like a python syntax error. It is possible that this build system is inadvertently using the python you selected, and is not compatible with that version. Which version of python is selected?

comment:2 Changed 9 years ago by m74z00219@…

Did I do something wrong? I responded via email and nothing updated here.

Here is my response:

Hi there.

I just ran port select --list python and it spit out the following:

Available versions for python:
	none
	python25-apple
	python26-apple
	python27
	python27-apple
	python34 (active)

Then I ran `port select --list python2' and it spit out the following:

vailable versions for python2:
	none
	python27 (active)

Then I ran `port select --list python3' and it gave me this:

Available versions for python3:
	none
	python34 (active)

And when i run which python' it gives me /opt/local/bin/python' which is indeed version 3.4.3.

Does that help?

comment:3 Changed 9 years ago by ci42

Please provide the output of:

$ ls -lh /opt/local/bin/python*

and

$ port installed nodejs

It seems the port uses python 3.x whereas the port requires python 2.x

comment:4 Changed 9 years ago by ci42

Resolution: fixed
Status: newclosed

Fixed in r142032.

comment:5 in reply to:  3 Changed 9 years ago by m74z00219@…

Replying to ciserlohn@…:

Please provide the output of:

$ ls -lh /opt/local/bin/python*

and

$ port installed nodejs

It seems the port uses python 3.x whereas the port requires python 2.x

Good day, Output from `$ ls -lh /opt/local/bin/python*'

lrwxr-xr-x  1 root  wheel    24B Jul 26 16:26 /opt/local/bin/python@ -> /opt/local/bin/python3.4
lrwxr-xr-x  1 root  wheel    31B Jul 26 16:26 /opt/local/bin/python-config@ -> /opt/local/bin/python3.4-config
lrwxr-xr-x  1 root  wheel    24B Oct 31 22:38 /opt/local/bin/python2@ -> /opt/local/bin/python2.7
lrwxr-xr-x  1 root  wheel    31B Oct 31 22:38 /opt/local/bin/python2-config@ -> /opt/local/bin/python2.7-config
lrwxr-xr-x  1 root  admin    73B Oct 10 14:45 /opt/local/bin/python2.7@ -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
lrwxr-xr-x  1 root  admin    80B Oct 10 14:45 /opt/local/bin/python2.7-config@ -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
lrwxr-xr-x  1 root  wheel    24B Jul  5 17:40 /opt/local/bin/python3@ -> /opt/local/bin/python3.4
lrwxr-xr-x  1 root  wheel    31B Jul  5 17:40 /opt/local/bin/python3-config@ -> /opt/local/bin/python3.4-config
lrwxr-xr-x  1 root  admin    73B Oct 14 13:29 /opt/local/bin/python3.4@ -> /opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4
lrwxr-xr-x  1 root  admin    80B Oct 14 13:29 /opt/local/bin/python3.4-config@ -> /opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4-config
lrwxr-xr-x  1 root  admin    74B Oct 14 13:29 /opt/local/bin/python3.4m@ -> /opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4m
lrwxr-xr-x  1 root  admin    81B Oct 14 13:29 /opt/local/bin/python3.4m-config@ -> /opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4m-config
lrwxr-xr-x  1 root  wheel    25B Jul  5 17:40 /opt/local/bin/python3m@ -> /opt/local/bin/python3.4m
lrwxr-xr-x  1 root  wheel    32B Jul  5 17:40 /opt/local/bin/python3m-config@ -> /opt/local/bin/python3.4m-config
lrwxr-xr-x  1 root  admin    45B Oct 10 21:45 /opt/local/bin/pythontex@ -> /opt/local/libexec/texlive/binaries/pythontex
lrwxr-xr-x  1 root  wheel    25B Oct 31 22:38 /opt/local/bin/pythonw2@ -> /opt/local/bin/pythonw2.7
lrwxr-xr-x  1 root  admin    74B Oct 10 14:45 /opt/local/bin/pythonw2.7@ -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7

Output from `$ port installed nodejs'

The following ports are currently installed:
  nodejs @0.12.7_0+python27+ssl (active)

comment:6 in reply to:  4 ; Changed 9 years ago by m74z00219@…

Replying to ciserlohn@…:

Fixed in r142032.

Hey again. I'm not entirely sure what I should be able to discern from that. I did manage to checkout that revision and look through the Portfile...but I was unable to learn anything from it. Please advise.

comment:7 in reply to:  6 Changed 9 years ago by ci42

Replying to m74z00219@…:

Replying to ciserlohn@…:

Fixed in r142032.

Hey again. I'm not entirely sure what I should be able to discern from that. I did manage to checkout that revision and look through the Portfile...but I was unable to learn anything from it. Please advise.

You're not supposed to check out the portfile. The bug that nodejs would pick up python3.x instead of python2.x was fixed in the aforementioned revision. Just try updating nodejs again:

$ sudo port clean nodejs
$ sudo port sync
$ sudo port upgrade nodejs 

comment:8 Changed 9 years ago by m74z00219@…

Thank you! Your prescription resolved my issue; I was able to upgrade nodejs to the latest version. Much appreciated!

One last thing, if you don't mind. I tried searching online for the distinction between port selfupdate and port sync, but could not find any. Actually, I was previously unaware of the sync command. Would you mind providing a short explanation of the differences between the commands?

Thanks again for your assistance.

comment:9 in reply to:  8 Changed 9 years ago by ci42

Replying to m74z00219@…:

One last thing, if you don't mind. I tried searching online for the distinction between port selfupdate and port sync, but could not find any. Actually, I was previously unaware of the sync command. Would you mind providing a short explanation of the differences between the commands?

port selfupdate - updates the MacPorts base system and the ports tree

port sync - updates only the ports tree

Have a look at:

$ man port
Note: See TracTickets for help on using tickets.