This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Suggested documentation caution for Nordic Connect installation on macOS

When installing the Nordic Connect for Desktop environment on macOS, a requirement is a running Apple Xcode IDE.  The scripts which invoke Xcode (whether doing a manual install or using the simplified procedure available in the Nordic Connect desktop app), invoke the app through its name "Xcode".  But if the user is running a beta version of Xcode, the Apple standard for the IDE as installed is "Xcode beta".  In this case, the build scripts will fail while trying to build "psutil" and/or "wheel" without any obvious connection to Xcode in the error messages.

Suggest that, at a minimum. a caution note be included in the documentation.  Or better, the error messages should be more informative as to the cause.  Best, the scripts should be modified to handle this situation without complaint.

Note: A simple workaround is to rename the Xcode app from "Xcode beta" to "Xcode".

Hope this helps,

Mike

Parents
  • Hi Mike,
    Got an update:
    The nRF Connect for Desktop should neither need nor use Xcode, so this is strange.

    Maybe you used the “Getting Started Assistant” within nRF Connect for Desktop and tried to set up an nRF Connect SDK development environment with that?

    That would use homebrew, which in turn needs the command line tools from Xcode.

    Please describe a bit more what you are trying to do.

  • Martin


    Thanks for the rapid reply.  Responding to your update:

    The nRF Connect for Desktop should neither need nor use Xcode, so this is strange.

    Not true.  Installation of nRF Connect for Desktop does require Xcode, or at least gcc, which on a Mac is usually provided by the command line interface to Xcode.  See below for the chain of dependency.

    Maybe you used the “Getting Started Assistant”...

    Doesn't matter whether I try to use the simple "GSA" or the more detailed manual installation procedure, I hit the same problem.

    That would use homebrew, which in turn needs the command line tools from Xcode.

    It's not Homebrew which causes the problem, it's the installation of psutil during the installation of Zephyr prerequisites which crosses over from Python and requires the C headers for Python and compiling some C code.

    Please describe a bit more what you are trying to do.

    OK, here goes, using the more detailed manual installation procedure for clarity 

    • The first step in Installing the nRF Connect SDK manually is "Installing the required tools"
    • For macOS, this starts with "To install the required tools, follow the Install dependencies section for macOS in Zephyr’s Getting Started Guide."
    • On this page, there are six numbered major steps.
      #1 is simply to make sure your macOS is up-to-date.
      #2, labeled "Install dependencies", involves installing Homebrew and some packages. No problem.
      #3, labeled "Get Zephyr and install Python dependencies" is where the problem occurs.
    • #3 may be where I created a problem -- perhaps I didn't need to execute all the way through step #3 on this page to meet the requirement to "install Zephyr dependencies".  But then, why did I encounter this error even with the simpler desktop app installation procedure?  (But a Nordic Connect SDK user will certainly encounter it if they ever want to use Zephyr.)
    • Within major step #3, for macOS, in sub-step #4:
      Zephyr’s scripts/requirements.txt file declares additional Python dependencies. Install them with pip3.
      
      pip3 install -r ~/zephyrproject/zephyr/scripts/requirements.txt

    • The file, requirements.txt, includes a reference to the file, requirements-run-test.txt, which in turn includes a call for pip3 to install psutil.  It is this pip3 call that fails when "Xcode" is not found.

    So an additional clarification that would be useful in the manual NCS installation procedure would be to specify how many steps of the Zephyr Getting Started Guide need to be executed, 1 through 2, or 1 through 3.

    Hope this detailed description is helpful.

    Mike

Reply
  • Martin


    Thanks for the rapid reply.  Responding to your update:

    The nRF Connect for Desktop should neither need nor use Xcode, so this is strange.

    Not true.  Installation of nRF Connect for Desktop does require Xcode, or at least gcc, which on a Mac is usually provided by the command line interface to Xcode.  See below for the chain of dependency.

    Maybe you used the “Getting Started Assistant”...

    Doesn't matter whether I try to use the simple "GSA" or the more detailed manual installation procedure, I hit the same problem.

    That would use homebrew, which in turn needs the command line tools from Xcode.

    It's not Homebrew which causes the problem, it's the installation of psutil during the installation of Zephyr prerequisites which crosses over from Python and requires the C headers for Python and compiling some C code.

    Please describe a bit more what you are trying to do.

    OK, here goes, using the more detailed manual installation procedure for clarity 

    • The first step in Installing the nRF Connect SDK manually is "Installing the required tools"
    • For macOS, this starts with "To install the required tools, follow the Install dependencies section for macOS in Zephyr’s Getting Started Guide."
    • On this page, there are six numbered major steps.
      #1 is simply to make sure your macOS is up-to-date.
      #2, labeled "Install dependencies", involves installing Homebrew and some packages. No problem.
      #3, labeled "Get Zephyr and install Python dependencies" is where the problem occurs.
    • #3 may be where I created a problem -- perhaps I didn't need to execute all the way through step #3 on this page to meet the requirement to "install Zephyr dependencies".  But then, why did I encounter this error even with the simpler desktop app installation procedure?  (But a Nordic Connect SDK user will certainly encounter it if they ever want to use Zephyr.)
    • Within major step #3, for macOS, in sub-step #4:
      Zephyr’s scripts/requirements.txt file declares additional Python dependencies. Install them with pip3.
      
      pip3 install -r ~/zephyrproject/zephyr/scripts/requirements.txt

    • The file, requirements.txt, includes a reference to the file, requirements-run-test.txt, which in turn includes a call for pip3 to install psutil.  It is this pip3 call that fails when "Xcode" is not found.

    So an additional clarification that would be useful in the manual NCS installation procedure would be to specify how many steps of the Zephyr Getting Started Guide need to be executed, 1 through 2, or 1 through 3.

    Hope this detailed description is helpful.

    Mike

Children
Related