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

jupyter-server doesn't build on MacOS using apple-clang@15.0.0 compilers #995

Closed
srherbener opened this issue Feb 7, 2024 · 6 comments · Fixed by #1033 or JCSDA/spack#417
Closed
Assignees
Labels
bug Something is not working INFRA JEDI Infrastructure

Comments

@srherbener
Copy link
Collaborator

Describe the bug

Using the latest branches of JCSDA spack-stack and spack (after the big merge with the authoritative spack repo), py-jupyter-server does not build. Here are the error messages:

  Destination directory: /private/var/folders/v_/4f7m33fx2mddnjz3kvb_8s540000gn/T/pip-wheel-rwlqrfbd  Building wheel for jupyter-server (pyproject.toml): started
  Running command Building wheel for jupyter-server (pyproject.toml)
  env: node: No such file or directory
  Traceback (most recent call last):
    File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-pip-23.1.2-iwcnkkj/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-pip-23.1.2-iwcnkkj/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-pip-23.1.2-iwcnkkj/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-jupyter-packaging-0.12.0-wa72cu7/lib/python3.10/site-packages/jupyter_packaging/build_api.py", line 24, in build_wheel
      builder()
    File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-jupyter-packaging-0.12.0-wa72cu7/lib/python3.10/site-packages/jupyter_packaging/build_api.py", line 24, in build_wheel
      builder()
    File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-jupyter-packaging-0.12.0-wa72cu7/lib/python3.10/site-packages/jupyter_packaging/setupbase.py", line 230, in builder
      run(npm_cmd + ["install"], cwd=node_package)
    File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-jupyter-packaging-0.12.0-wa72cu7/lib/python3.10/site-packages/jupyter_packaging/setupbase.py", line 296, in run
      return subprocess.check_call(cmd, **kwargs)
    File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/python-3.10.13-jmrqerj/lib/python3.10/subprocess.py", line 369, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/usr/local/bin/npm', 'install']' returned non-zero exit status 127.
  error: subprocess-exited-with-error

  × Building wheel for jupyter-server (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/python-3.10.13-jmrqerj/bin/python3.10 /Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-pip-23.1.2-iwcnkkj/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /var/folders/v_/4f7m33fx2mddnjz3kvb_8s540000gn/T/tmpxtdjalaq
  cwd: /Users/steveherbener/spack-stack/cache/build_stage/spack-stage-py-jupyter-server-1.21.0-dmdnug2zjmsu5jiq3ecjd4zta2bqp74z/spack-src
  Building wheel for jupyter-server (pyproject.toml): finished with status 'error'
  ERROR: Failed building wheel for jupyter-server
Failed to build jupyter-server
ERROR: Could not build wheels for jupyter-server, which is required to install pyproject.toml-based projects
Exception information:
Traceback (most recent call last):
  File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-pip-23.1.2-iwcnkkj/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 169, in exc_logging_wrapper
    status = run_func(*args)
  File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-pip-23.1.2-iwcnkkj/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
  File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-pip-23.1.2-iwcnkkj/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 426, in run
    raise InstallationError(
pip._internal.exceptions.InstallationError: Could not build wheels for jupyter-server, which is required to install pyproject.toml-based projects
Removed build tracker: '/private/var/folders/v_/4f7m33fx2mddnjz3kvb_8s540000gn/T/pip-build-tracker-9l10j58g'
==> Error: ProcessError: Command exited with status 1:
    '/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/python-3.10.13-jmrqerj/bin/python3.10' '-m' 'pip' '-vvv' '--no-input' '--no-cache-dir' '--disable-pip-version-check' 'install' '--no-deps' '--ignore-installed' '--no-build-isolation' '--no-warn-script-location' '--no-index' '--prefix=/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-jupyter-server-1.21.0-dmdnug2' '.'

1 error found in build log:
     44    Created temporary directory: /private/var/folders/v_/4f7m33fx2mddnjz3kvb_8s540000gn/T/pip-unpack-2qpea9rx
     45    Building wheels for collected packages: jupyter-server
     46      Created temporary directory: /private/var/folders/v_/4f7m33fx2mddnjz3kvb_8s540000gn/T/pip-wheel-rwlqrfbd
     47      Destination directory: /private/var/folders/v_/4f7m33fx2mddnjz3kvb_8s540000gn/T/pip-wheel-rwlqrfbd
     48      Building wheel for jupyter-server (pyproject.toml): started
     49      Running command Building wheel for jupyter-server (pyproject.toml)
  >> 50    env: node: No such file or directory
     51      Traceback (most recent call last):
     52        File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-pip-23.1.2-iwcnkkj/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
     53          main()
     54        File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-pip-23.1.2-iwcnkkj/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
     55          json_out['return_val'] = hook(**hook_input['kwargs'])
     56        File "/Users/steveherbener/spack-stack/envs/unified-env.mymacos/install/apple-clang/15.0.0/py-pip-23.1.2-iwcnkkj/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel

See build log for details:
  /Users/steveherbener/spack-stack/cache/build_stage/spack-stage-py-jupyter-server-1.21.0-dmdnug2zjmsu5jiq3ecjd4zta2bqp74z/spack-build-out.txt

To Reproduce
Follow instructions for building on MacOS. Use the unified-env template.

Expected behavior
Build of py-jupyter-server succeeds

System:
What system(s) are you running the code on?
MacOS Sonoma 14.2.1, apple-clang%15.0.0, gnu fortran 12.3.0

Additional context
py-jupyter-server builds successfully on older versions of apple-clang.

@srherbener srherbener added the bug Something is not working label Feb 7, 2024
@srherbener srherbener added the INFRA JEDI Infrastructure label Feb 7, 2024
@climbfuji
Copy link
Collaborator

You may be hitting the same error that I encountered on Narwhal, or something related, or something unrelated.

The error I am seeing is:

env: node: No such file or directory

The issue/workaround for Narwhal are described in #928 and spack/spack#41899. Especially check spack/spack#41899 (comment)

@climbfuji climbfuji changed the title jupyter-server doesn't build on MacOS using apple-clang%15.0.0 compilers jupyter-server doesn't build on MacOS using apple-clang@15.0.0 compilers Feb 8, 2024
@climbfuji
Copy link
Collaborator

@srherbener Are you still seeing this issue? I don't, I don't know any other macOS users who reported this failure, and we don't see it in CI either (but CI may not be using 15.0.0).

@srherbener
Copy link
Collaborator Author

Unfortunately, I'm still seeing this error using the spack-stack develop branch and spack bugfix/hdf_appleclang15_oneapi branch as of Friday Mar 15. I'll look into the workaround mentioned above.

@climbfuji
Copy link
Collaborator

I think this is unrelated to the compiler. Can you run this please:

> which npm
> which node

and report the output here. Thanks.

@srherbener
Copy link
Collaborator Author

I think this is unrelated to the compiler. Can you run this please:

> which npm
> which node

and report the output here. Thanks.

Here's what I get:

MacBook-Pro-5:unified-env.mymacos steveherbener$ which npm
/usr/local/bin/npm
MacBook-Pro-5:unified-env.mymacos steveherbener$ which node
MacBook-Pro-5:unified-env.mymacos steveherbener$ 

(which node returns nothing)

@climbfuji
Copy link
Collaborator

I think this is unrelated to the compiler. Can you run this please:

> which npm
> which node

and report the output here. Thanks.

Here's what I get:

MacBook-Pro-5:unified-env.mymacos steveherbener$ which npm
/usr/local/bin/npm
MacBook-Pro-5:unified-env.mymacos steveherbener$ which node
MacBook-Pro-5:unified-env.mymacos steveherbener$ 

(which node returns nothing)

Thanks. This confirms my suspicion that there is a hidden dependency in py-jupyter-server. If it finds npm, it wants to do something that it doesn't need (because not having npm apparently works). Let me run a few more tests before you change anything, ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working INFRA JEDI Infrastructure
Projects
No open projects
2 participants