aiortc / aioquic

QUIC and HTTP/3 implementation in Python
BSD 3-Clause "New" or "Revised" License
1.69k stars 238 forks source link

aioquic 0.8.6 build error under Win10/Python3.8 #69

Closed honglei closed 4 years ago

honglei commented 4 years ago
building 'aioquic._crypto' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python38\include -IC:\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/aioquic/_crypto.c /Fobuild\temp.win-amd64-3.8\Release\src/aioquic/_crypto.obj
_crypto.c
src/aioquic/_crypto.c(93): warning C4244: “函数”: 从“Py_ssize_t”转换到“int”,可能丢失数据
src/aioquic/_crypto.c(96): warning C4244: “函数”: 从“Py_ssize_t”转换到“int”,可能丢失数据
src/aioquic/_crypto.c(130): error C2036: “void *”: 未知的大小
src/aioquic/_crypto.c(136): warning C4244: “函数”: 从“Py_ssize_t”转换到“int”,可能丢失数据
src/aioquic/_crypto.c(139): warning C4244: “函数”: 从“Py_ssize_t”转换到“int”,可能丢失数据
src/aioquic/_crypto.c(175): warning C4244: “函数”: 从“Py_ssize_t”转换到“int”,可能丢失数据
src/aioquic/_crypto.c(178): warning C4244: “函数”: 从“Py_ssize_t”转换到“int”,可能丢失数据
src/aioquic/_crypto.c(275): warning C4244: “函数”: 从“Py_ssize_t”转换到“int”,可能丢失数据
src/aioquic/_crypto.c(312): warning C4244: “初始化”: 从“Py_ssize_t”转换到“int”,可能丢失数据
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
jlaine commented 4 years ago

Could you possibly post the error message in english as I don't understand what the actual error message is on line 130?

Also I don't have access to a Windows machine, so a first step would probably be to help me set up GitHub Actions to run the build on Windows

honglei commented 4 years ago

"未知的大小" means "Unkown size", void * pointer cannot be added by int , the following works:

res = EVP_CIPHER_CTX_ctrl(self->decrypt_ctx, EVP_CTRL_CCM_SET_TAG, AEAD_TAG_LENGTH, data + (data_len - AEAD_TAG_LENGTH));
jlaine commented 4 years ago

Thanks for the translation!. What's the best option for installing OpenSSL in a scripted fashion on Windows so that I reproduce the error and your proposed fix?

jlaine commented 4 years ago

I've managed to reproduce the failing build here:

https://github.com/aiortc/aioquic/runs/532018441?check_suite_focus=true

honglei commented 4 years ago

Try use the python official build:https://github.com/python/cpython-bin-deps/releases