Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration issues on macOS with Python 3 #30500

Closed
debohman opened this issue Nov 15, 2019 · 9 comments
Closed

Configuration issues on macOS with Python 3 #30500

debohman opened this issue Nov 15, 2019 · 9 comments

Comments

@debohman
Copy link

  • Version: 13.1.0
  • Platform: macOS 10.12.6
  • Subsystem: build

I noticed the new requirement for Xcode or the command line tools >= 10 to build Node 13.1.0.

I was wondering what the actual issue was? Is a newer compiler needed? It would be helpful to understand this issue.

@debohman
Copy link
Author

debohman commented Nov 20, 2019

I was able to build node 13.1.0 successfully on macOS 10.12.6 using the command line tools version 8.3.2.

The problem that I ran into seemed to involve some issues in tools/gyp/pylib/gyp/xcode_emulation.py and tools/gyp/pylib/gyp/mac_tool.py.

Note that I am using Python 3.8.0 on my system. Some of the issues may be related to that.

Otherwise, node builds and runs.

@debohman debohman changed the title Xcode 10 Build Requirement in Node Version 13.1.0 Configuration issues with Python 3.8.0 Nov 20, 2019
@sam-github
Copy link
Contributor

Please refer back to nodejs/help#2297 (comment)

The conversation it links to is long, but describes the issue: #29493 (comment)

That you can use Xcode 8 is because we forced Chrome to supply a patch to make it work, they are using C++ features that require Xcode 10, and intend to use more of them, so if we commit to support of Xcode 8 we will during the lifetime of Node.js support no longer be able to land V8 updates.

@debohman
Copy link
Author

Yes, I was faked out about the Python issues. I think that might be related to using Python 3.8.0.

Do we want the Python fixes for node >= 13.1.0?

On another note, can we build node using GCC to get a newer compiler? I don't know how easy it will be to get a newer clang++ from Apple.

@sam-github
Copy link
Contributor

Do we want the Python fixes for node >= 13.1.0?

Yes, if you run into python3 troubles pls PR fixes, or open a specific issue.

On another note, can we build node using GCC to get a newer compiler?

I don't know. You can check BUILDING.md, maybe some suggestions there.

gcc does work, in the sense that we use it on most platforms, other than mac an windows. I'm not sure why you'd want to diverge from our supported compiler list, though you are free to, you'll just be on your own. You're free to keep using Xcode 8 as long as you want, and as long as it works.

Or maybe you are suggesting we use it for official builds instead of Xcode? I don't see a non-standard compiler requirement as a burden we'd want to place on people, but bring it up in #29493 if you think it would be helpful.

@debohman
Copy link
Author

The 13.x branch is definitely has issues with configure:

% git status 
HEAD detached at v13.1.0
nothing to commit, working tree clean
% ./configure
Node configure: Found Python 3.8.0...
INFO: Using floating patch "tools/icu/patches/64/source/common/putil.cpp" from "tools/icu"
INFO: Using floating patch "tools/icu/patches/64/source/i18n/dtptngen.cpp" from "tools/icu"
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
Error running GYP
%

Note that the master branch (v14.0.0-pre) does not have this problem. I have a fix, I will put together a pull request for it.

@debohman
Copy link
Author

I am in no way suggesting to use gcc by default on macOS. I am just talking about making it an option.

The issue with using Xcode is that I cannot install Xcode 10 on my system right now. I am merely talking about using GCC as a stopgap measure.

@sam-github
Copy link
Contributor

The Xcode 10 OS level requirements are definitely painful, we're suffering over in the Build WG, too.

As to making gcc an option, have you tried ./configure CC=gcc CXX=g++ LINK=g++? It might work.

If it doesn't, and you can PR a change to make it work, I guess we might accept it. There's a certain amount of "try it and see" and "I can't speak for the whole project".

Acceping it depends on what it does to long-term maintenance burden. If there were a couple lines of python or gyp that needed changing to make it possible, and we weren't committing to maintaining builds for it in CI, I assume it would be accepted.

If you want people to set it up in CI thats less likely, and if V8 doesn't build with g++ on OS X for some src compatibility reason, I don't think we'd float patches, and I'm not sure if V8'd accept PRs for toolchains neither they nor Node or Electron use or support (but I don't know).

Which is a whole lot of "I don't know". Sorry!

@debohman debohman changed the title Configuration issues with Python 3.8.0 Configuration issues on macOS with Python 3 Nov 21, 2019
@debohman
Copy link
Author

Appears to be fixed in node 13.2.0.

@debohman
Copy link
Author

Just an update on the compiler issue. I was able to build and install llvm / clang 10.0.0 on my system, and current node (v14.3.0) builds and runs just fine with it.

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

No branches or pull requests

2 participants