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

MacOS install #23

Open
miklosbagi opened this issue Jun 11, 2023 · 1 comment
Open

MacOS install #23

miklosbagi opened this issue Jun 11, 2023 · 1 comment

Comments

@miklosbagi
Copy link

miklosbagi commented Jun 11, 2023

Howdy,

Few things I've ran into on Mac (arm).
Added #24 in case you're happy with the proposal below:

For Mac, building sslpsk needs some extra steps

  1. The openssl package installed via brew: brew install openssl, and
  2. Build saslpsk separately with flags: LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip3 install sslpsk
  3. You may also want to pip3 install requests
  4. Finally install the rest of the requirements with pip3 install -r requirements.txt

If all that goes to plan, we get info from hc-login as expected

Hope that helps a few folks,
mb

@jorritolthuis
Copy link

When installing sslpsk using the command proposed here on macOS 14.1.2 (Intel), clang failed:

      Compiling with an SDK that doesn't seem to exist: /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
      Please check your Xcode installation
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I/usr/local/opt/openssl@3/include -I/Users/jorrit/Documents/Projects/home_control_py/venv/include -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c sslpsk/_sslpsk.c -o build/temp.macosx-14-x86_64-cpython-311/sslpsk/_sslpsk.o
      clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk' [-Wmissing-sysroot]
      In file included from sslpsk/_sslpsk.c:17:
      /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/include/python3.11/Python.h:23:12: fatal error: 'stdlib.h' file not found
      #  include <stdlib.h>
                 ^~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1

This issue seems to pop up on other GitHub projects as well. It is easily resolved by symlinking the Xcode SDK to where Clang is looking:
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk

If other people encounter this, it might be worth a note in the README. Otherwise, if it's just my configuration, let's ignore 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