Opened 9 years ago

Closed 9 years ago

#45380 closed defect (fixed)

nodejs, nodejs-devel: build fails with 12,000 lines of make errors

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.3.99
Keywords: haspatch Cc:
Port: nodejs, nodejs-devel

Description

This is a new one for me. nodejs and nodejs-devel are failing to build with 12,000 lines of make errors in the log that I don't understand.

I had previously been able to install nodejs-devel @0.11.14 on September 25, 2014 but can't today; OS and Xcode and port updates have of course happened since then. I had not tried to install nodejs until today.

This is on OS X 10.10 Yosemite beta 6. Same result with Xcode 6.0.1 and Xcode 6.1 GM 2.

Attachments (3)

main.log.bz2 (46.3 KB) - added by ryandesign (Ryan Carsten Schmidt) 9 years ago.
nodejs.diff (1.0 KB) - added by ryandesign (Ryan Carsten Schmidt) 9 years ago.
patch-common.gypi.diff (535 bytes) - added by ryandesign (Ryan Carsten Schmidt) 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log.bz2 added

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

Keywords: haspatch added

I learned that the output I'm seeing is make debug output, enabled by the -d flag.

I noticed that the nodejs portfile sets environment variables in such a way that it assumes the values do not contain spaces.

I am running the trunk version of MacPorts base where ${configure.cxxflags} does contain a space, since it now includes the -stdlib=libc++ flag, which, if each character is interpreted as a flag, as make apparently does, would be equivalent to -s -t -d -l -i -b, etc.

Attached is a patch to fix this. With MacPorts base from trunk, nodejs is now being build with the correct C++ library.

It now fails with this message:

clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)

I am of course running OS X 10.7 or later, but the build is specifying -mmacosx-version-min=10.5, which is incompatible. This should be changed to use ${macosx_deployment_target} instead of assuming it should be 10.5.

Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: nodejs.diff added

Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: patch-common.gypi.diff added

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

Simply removing the MACOSX_DEPLOYMENT_TARGET setting from common.gypi allows the MacPorts default value to be used. The attached patch allows the build to succeed. I'm increasing the revision because on Mavericks and later this change will cause libc++ to be used instead of libstdc++.

comment:3 Changed 9 years ago by ci42

Resolution: fixed
Status: newclosed

Thanks for the patch. Applied in r126814.

Note: See TracTickets for help on using tickets.