aiortc / aioquic

QUIC and HTTP/3 implementation in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

src/aioquic/_crypto.c(4): fatal error C1083: Cannot open include file: 'openssl/err.h': No such file or directory

kdashg opened this issue · comments

I believe this is the same as #56, but I'm unsatisfied with the resolution there. pip install aioquic should be self-sufficient and not require env-var changes.

Failure excerpt for pip install aioquic:

      building 'aioquic._crypto' extension
      "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD "-IC:\Program Files\Python311\include" "-IC:\Program Files\Python311\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /Tcsrc/aioquic/_crypto.c /Fobuild\temp.win-amd64-cpython-311\Release\src/aioquic/_crypto.obj
      _crypto.c
      src/aioquic/_crypto.c(4): fatal error C1083: Cannot open include file: 'openssl/err.h': No such file or directory
      error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

This could be fixed by #347.

If you are using brew, try this:

# Install OpenSSL 3 if not installed
brew install openssl@3

export CFLAGS=-I$(brew --prefix openssl@3)/include
export LDFLAGS=-L$(brew --prefix openssl@3)/lib

Then run pip install

The goal here is not to just get it working on (one of) my machines, but to get it so it Just Works when you pip-install it on an arbitrary machine.

I'm going to close this in favour of #372 because that's the root cause here.