Falldog / pyconcrete

Protect your python script, encrypt it as .pye and decrypt when import it
Apache License 2.0
694 stars 149 forks source link

File: src\pyconcrete_ext\pyconcrete.c, Line 213 #12

Closed retsyo closed 7 years ago

retsyo commented 7 years ago

I compile pyconcrete again, however, this time

R:\pyconcrete>py3 test.py

R:\pyconcrete>e:\prg\py\Anaconda3_64\python.exe test.py
Assertion failed!

Program: e:\prg\py\Anaconda3_64\python.exe
File: src\pyconcrete_ext\pyconcrete.c, Line 213

Expression: PyBytes_Check(py_plain_obj)

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Falldog commented 7 years ago

What is the content of test.py?

retsyo commented 7 years ago

this is the files I used: test.zip

My build environment: windows 7 64 bits, msys2 + mingw64, Python 3.4.4 |Anaconda 2.3.0 (64-bit)

$ cd /r/pyconcrete/
$ /e/prg/py/Anaconda3_64/python.exe setup.py build
# here I use 1234 as the passphrase

then I copy r:\pyconcrete\build\lib.win-amd64-3.4\pyconcrete to E:\prg\py\Anaconda3_64\Lib\site-packages

then I make and use pye file like this

$ /e/prg/py/Anaconda3_64/python.exe /r/pyconcrete/pyconcrete-admin.py compile --source=fib.py  --pye

$ /e/prg/py/Anaconda3_64/python.exe test.py

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Assertion failed!

Program: E:\prg\py\Anaconda3_64\python.exe
File: src\pyconcrete_ext\pyconcrete.c, Line 213

Expression: PyBytes_Check(py_plain_obj)

$ mv ./fib.py ./fib.py.bak

$ /e/prg/py/Anaconda3_64/python.exe test.py

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Assertion failed!

Program: E:\prg\py\Anaconda3_64\python.exe
File: src\pyconcrete_ext\pyconcrete.c, Line 213

Expression: PyBytes_Check(py_plain_obj)

$ /e/prg/py/Anaconda3_64/python.exe -c "import pyconcrete;print(pyconcrete.__file__)"
E:\prg\py\Anaconda3_64\lib\site-packages\pyconcrete\__init__.py
retsyo commented 7 years ago

tha is so strange. no matter I moved fib.py or not, I get the 2 kinds of error message(the other one is reported as https://github.com/Falldog/pyconcrete/issues/11) randomly:

$ /e/prg/py/Anaconda3_64/python.exe test.py

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Assertion failed!

Program: E:\prg\py\Anaconda3_64\python.exe
File: src\pyconcrete_ext\pyconcrete.c, Line 213

Expression: PyBytes_Check(py_plain_obj)

$ /e/prg/py/Anaconda3_64/python.exe test.py
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    from fib import fib
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
  File "E:\prg\py\Anaconda3_64\lib\site-packages\pyconcrete\__init__.py", line 63, in load_module
    self._validate_version(data)
  File "E:\prg\py\Anaconda3_64\lib\site-packages\pyconcrete\__init__.py", line 95, in _validate_version
    raise ValueError("Python version doesn't match with magic: python(%d) != pye(%d)" % (py_magic, pye_magic))
ValueError: Python version doesn't match with magic: python(3310) != pye(45114)
retsyo commented 7 years ago

btw, https://github.com/jhjin/OpenAES has been updated. Does the old OpenAES make the wierd?

Falldog commented 7 years ago

I had setup Windows7 in VirtualBox install msys2(mingw64) use pacman to install python in MinGW64, use the python in MinGW to compile .pye is work well. I also try to run all of pyconcrete test is OK.

You can help to try in MinGW64 to run pyconcrete test:

TEST_PYE_PERFORMANCE_COUNT=1 ./pyconcrete-admin.py test

(Please pull the latest code, for support .dll extension name under MinGW64)

The scenario I tested, compile & run under MinGW64, same env & python Do you compile in MinGW64 or Windows? I think it's differnt. If you install pyconcrete in Windows, please let me know how you build it (seems difficult...)

retsyo commented 7 years ago

I am using the latest code

As you can see, this test says

ValueError: Python version doesn't match with magic: python(3310) != pye(50453)
ValueError: Python version doesn't match with magic: python(3310) != pye(50434)
ValueError: Python version doesn't match with magic: python(3310) != pye(45713)

but how can we read 3 different MAGIC for the same app?

$ export TEST_PYE_PERFORMANCE_COUNT=1

$ /e/prg/py/Anaconda3_64/python.exe /r/pyconcrete/pyconcrete-admin.py test
running install
running build
running build_py
running build_ext
running build_scripts
running install_lib
creating E:\msys64\tmp\pyconcrete_lib_m_x_s6tb\pyconcrete
copying build\lib.win-amd64-3.4\pyconcrete\version.py -> E:\msys64\tmp\pyconcrete_lib_m_x_s6tb\pyconcrete
copying build\lib.win-amd64-3.4\pyconcrete\_pyconcrete.pyd -> E:\msys64\tmp\pyconcrete_lib_m_x_s6tb\pyconcrete
copying build\lib.win-amd64-3.4\pyconcrete\__init__.py -> E:\msys64\tmp\pyconcrete_lib_m_x_s6tb\pyconcrete
byte-compiling E:\msys64\tmp\pyconcrete_lib_m_x_s6tb\pyconcrete\version.py to version.cpython-34.pyc
byte-compiling E:\msys64\tmp\pyconcrete_lib_m_x_s6tb\pyconcrete\__init__.py to __init__.cpython-34.pyc
running install_scripts
creating E:\msys64\tmp\pyconcrete_lib_m_x_s6tb\scripts
copying build\scripts-3.4\pyconcrete-admin.py -> E:\msys64\tmp\pyconcrete_lib_m_x_s6tb\scripts
running install_egg_info
Writing E:\msys64\tmp\pyconcrete_lib_m_x_s6tb\pyconcrete-0.10.2-py3.4.egg-info
creating E:\msys64\tmp\pyconcrete_lib_m_x_s6tb\pyconcrete.pth
compile on "E:\msys64\tmp\pyconcrete_tmp_ordydaev\data\main.py"
ignore-file-list=()
verbose=True
* create E:\msys64\tmp\pyconcrete_tmp_ordydaev\data\main.pye
.compile on "E:\msys64\tmp\pyconcrete_tmp_so9l5y7r\data"
ignore-file-list=()
verbose=True
* create E:\msys64\tmp\pyconcrete_tmp_so9l5y7r\data\main.pye
* create E:\msys64\tmp\pyconcrete_tmp_so9l5y7r\data\relative_import\main.pye
* create E:\msys64\tmp\pyconcrete_tmp_so9l5y7r\data\relative_import\util.pye
* create E:\msys64\tmp\pyconcrete_tmp_so9l5y7r\data\relative_import\__init__.pye
* create E:\msys64\tmp\pyconcrete_tmp_so9l5y7r\data\__init__.pye
..E.FF.FF..E....Process Process-5:
Traceback (most recent call last):
  File "E:\prg\py\Anaconda3_64\lib\multiprocessing\process.py", line 254, in _bootstrap
    self.run()
  File "E:\prg\py\Anaconda3_64\lib\multiprocessing\process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "R:\pyconcrete\test\test_pye_performance.py", line 45, in main_requests
    import requests
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
  File "R:\pyconcrete\src\pyconcrete\__init__.py", line 63, in load_module
    self._validate_version(data)
  File "R:\pyconcrete\src\pyconcrete\__init__.py", line 95, in _validate_version
    raise ValueError("Python version doesn't match with magic: python(%d) != pye(%d)" % (py_magic, pye_magic))
ValueError: Python version doesn't match with magic: python(3310) != pye(50453)
E
======================================================================
ERROR: test_import_pye (test_basic.TestBasic)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "R:\pyconcrete\test\test_basic.py", line 37, in test_import_pye
    import test_module
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
  File "R:\pyconcrete\src\pyconcrete\__init__.py", line 63, in load_module
    self._validate_version(data)
  File "R:\pyconcrete\src\pyconcrete\__init__.py", line 95, in _validate_version
    raise ValueError("Python version doesn't match with magic: python(%d) != pye(%d)" % (py_magic, pye_magic))
ValueError: Python version doesn't match with magic: python(3310) != pye(50434)

======================================================================
ERROR: test_pye_relative_import (test_import_hook.TestImportHook)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "R:\pyconcrete\test\test_import_hook.py", line 45, in test_pye_relative_import
    from relative_import import main
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
  File "R:\pyconcrete\src\pyconcrete\__init__.py", line 63, in load_module
    self._validate_version(data)
  File "R:\pyconcrete\src\pyconcrete\__init__.py", line 95, in _validate_version
    raise ValueError("Python version doesn't match with magic: python(%d) != pye(%d)" % (py_magic, pye_magic))
ValueError: Python version doesn't match with magic: python(3310) != pye(45713)

======================================================================
ERROR: test_requests_pye (test_pye_performance.TestPerformance)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "R:\pyconcrete\test\test_pye_performance.py", line 96, in test_requests_pye
    t += self._test_requests(True)
  File "R:\pyconcrete\test\test_pye_performance.py", line 85, in _test_requests
    path = q.get(timeout=5)
  File "E:\prg\py\Anaconda3_64\lib\multiprocessing\queues.py", line 108, in get
    raise Empty
queue.Empty

======================================================================
FAIL: test_process_py_code_1_block (test_concrete.TestConcrete)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "R:\pyconcrete\test\test_concrete.py", line 60, in test_process_py_code_1_block
    self.assertEqual(py_code, res)
AssertionError: b'v=12345678901234' != b'345678901234\x00\x00\x00\x00'

======================================================================
FAIL: test_process_py_code_2_block (test_concrete.TestConcrete)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "R:\pyconcrete\test\test_concrete.py", line 75, in test_process_py_code_2_block
    self.assertEqual(py_code, res)
AssertionError: b'v1=12345678901\r\nv2=12345678901\r\n' != b'2345678901\r\nv2=12345678901\r\n\x00\x00\x00\x00'

======================================================================
FAIL: test_process_py_code_large (test_concrete.TestConcrete)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "R:\pyconcrete\test\test_concrete.py", line 53, in test_process_py_code_large
    self.assertEqual(py_code, res.decode('utf8'))
AssertionError: 'print("This is testing large py file ... [4845 chars]\r\n' != 't("This is testing large py file ... 0")\[4857 chars]\x00'
Diff is 4948 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_process_py_code_less_1_block (test_concrete.TestConcrete)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "R:\pyconcrete\test\test_concrete.py", line 67, in test_process_py_code_less_1_block
    self.assertEqual(py_code, res)
AssertionError: b'v=123456789' != b'3456789\x00\xc8\x08\xe0'

----------------------------------------------------------------------
Ran 18 tests in 34.816s

FAILED (failures=4, errors=3)
build tmp pyconcrete at "E:\msys64\tmp\pyconcrete_lib_m_x_s6tb"
pyconcrete info="PyConcrete Info() AES 128bit", path=R:\pyconcrete\src\pyconcrete\__init__.py
R:\pyconcrete\src\pyconcrete\__init__.py
test import request (py) [count=1] total time = 0.85, avg time = 0.85
test import request (py) (import hooker) [count=1] total time = 0.92, avg time = 0.92
test import request (pyc) [count=1] total time = 0.36, avg time = 0.36
test import request (pyc) (import hooker) [count=1] total time = 1.15, avg time = 1.15
remove tmp pyconcrete at "E:\msys64\tmp\pyconcrete_lib_m_x_s6tb"
retsyo commented 7 years ago

and if I try to import the pye as I said yesterday, you can find the fourth MAGIC(pye(45114))!

$ /e/prg/py/Anaconda3_64/python.exe test.py
Traceback (most recent call last):
  File "test.py", line 12, in <module>
    from fib import fib
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
  File "E:\prg\py\Anaconda3_64\lib\site-packages\pyconcrete\__init__.py", line 63, in load_module
    self._validate_version(data)
  File "E:\prg\py\Anaconda3_64\lib\site-packages\pyconcrete\__init__.py", line 95, in _validate_version
    raise ValueError("Python version doesn't match with magic: python(%d) != pye(%d)" % (py_magic, pye_magic))
ValueError: Python version doesn't match with magic: python(3310) != pye(45114)
retsyo commented 7 years ago

I think maybe there is something while reading/treating pye file. because I get Python version doesn't match with magic: python(3310) != pye(XXXXX) where XXXXX is changed everytime even I only change the doc_string of the following code

def fib(n):
    '''
   change me and you will get another MAGIC pye(XXXXX)
    '''
    if n<=1:
        return 1
    else:
        return fib(n-1) + fib(n-2)
retsyo commented 7 years ago

I tested on Python 2.7.12 |Anaconda 2.2.0 (32-bit), pyconcrete works!

So something incompatible between py2 and py3 lets pyconcrete fail on py3

for the same passphrase, py3+pyconcrete makes a pye with 432 bytes, while py2+pyconcrete makes a pye with 448 bytes

retsyo commented 7 years ago

BTW, for my py27, python setup.py build halts without any message. I guess it is waiting for passphrase. After I typed passphrase twice, the prompt message appears

$ /e/prg/py/Anaconda2_32/python setup.py build
running build
1234
1234
please input the passphrase
for encrypt your python script (enter for default) :
please input again to confirm
running build_py
creating build\lib.win32-2.7
creating build\lib.win32-2.7\pyconcrete
...
Falldog commented 7 years ago

@retsyo Please reference the stackoverflow post

It is important to use the corresponding version of the Visual C++ compiler that Python was compiled with since distilutils's get_build_version prevents mixing versions (per Piotr's warning).

Current Problem

I dump the Anaconda python info as below

Python 2.7.10 |Anaconda 2.3.0 (64-bit) | (default, May 28 2015, 16:44:52) [MSC v.1500 64 bit (AMD64)] on win32

=> the python is compile by Visual C++ 2008 (9.0) so the pyconcrete DLL must be build by Visual C++ 2008 (9.0) to run under the same runtime library

So, you can't use Anaconda's python to execute pyconcrete setup with mingw32 GCC compiler, it will cause unexpected runtime error!

Possible solution

You must compile by VC++ 2008 with Anaconda 2.3 python Or some version of VC++ with Anaconda 3.x python

My testing env in MinGW

I use mingw32's python/python3 to execute pyconcrete setup.py with mingw32 GCC compiler, it worked well.

Here is the python info of mingw32

Python 3.4.3 (default, Mar 4 2016, 10:23:36) [GCC 4.9.2] on msys

Under mingw32, I use the python compile by GCC, execute pyconcrete setup.py and compile DLL by the same GCC in mingw32. So testing is work well.

retsyo commented 7 years ago

I think the problem does not root in Mingw64 probably. Because 1) I can use Mingw32 to compile corrected pyconcrete on Python 2.7.12 |Anaconda 2.2.0 (32-bit)| (default, Jun 29 2016, 11:42:13) [MSC v.1500 32 bit (Intel)] on win32; 2) what's more, I always use Mingw64 compile kinds of extension on Python 3.4.4 |Anaconda 2.3.0 (64-bit)| (default, Feb 16 2016, 09:54:04) [MSC v.1600 64 bit (AMD64)] on win32 witout problem.

Anyway, thank you for attention for this issue.

Falldog commented 7 years ago

You can build pyconcrete with Mingw32 without a problem, but the runtime conflict is unexpected even will crash the app. The main program(python) load DLL(pyconcrete) should be compiled by the same compiler for running with the same runtime library.

I think you could give a shot for VC++ compiler. :)

retsyo commented 7 years ago
R:\pyconcrete>E:\MicrosoftVisualStudio14.0\VC\bin\vcvars32.bat
R:\pyconcrete>SET VS100COMNTOOLS=%VS140COMNTOOLS%

R:\pyconcrete>set DISTUTILS_USE_SDK=1

R:\pyconcrete>set MSSdk=1

R:\pyconcrete>py3 setup.py build --compiler=msvc

R:\pyconcrete>e:\prg\py\Anaconda3_64\python.exe setup.py build --compiler=msvc
running build
running build_py
running build_ext
building 'pyconcrete._pyconcrete' extension
E:\MicrosoftVisualStudio14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG
-Isrc\pyconcrete_ext\openaes\inc -Isrc\pyconcrete_ext\include_win -Ie:\prg\py\An
aconda3_64\include -Ie:\prg\py\Anaconda3_64\include /Tcsrc\pyconcrete_ext\pyconc
rete.c /Fobuild\temp.win-amd64-3.4\Release\src\pyconcrete_ext\pyconcrete.obj
pyconcrete.c
src\pyconcrete_ext\openaes\inc\oaes_lib.h(84): error C2061: 语法错误: 标识符“OA
ES_OPTION”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(84): error C2059: 语法错误:“;”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2146: 语法错误: 缺少“)”
(在标识符“option”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2081: “OAES_OPTION”: 形
参表中的名称非法
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2061: 语法错误: 标识符“o
ption”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2059: 语法错误:“;”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2059: 语法错误:“,”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(126): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2081: “uint8_t”: 形参表
中的名称非法
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2143: 语法错误: 缺少“;”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(137): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2081: “uint8_t”: 形参表
中的名称非法
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2143: 语法错误: 缺少“;”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(142): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2146: 语法错误: 缺少“;”
(在标识符“data_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(146): error C2040: “data_len”:“int
”与“int *”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2146: 语法错误: 缺少“;”
(在标识符“data_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(150): error C2040: “data_len”:“int
”与“int *”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2146: 语法错误: 缺少“;”
(在标识符“m_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2143: 语法错误: 缺少“;”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(154): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2146: 语法错误: 缺少“;”
(在标识符“c_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2040: “c_len”:“int”与
“int *”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2143: 语法错误: 缺少“;”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(158): error C2040: “m_len”:“int *”
与“int”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2081: “uint8_t”: 形参表
中的名称非法
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2146: 语法错误: 缺少“;”
(在标识符“c_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(161): error C2040: “c_len”:“int”与
“int *”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2081: “uint8_t”: 形参表
中的名称非法
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2146: 语法错误: 缺少“;”
(在标识符“c_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(163): error C2040: “c_len”:“int”与
“int *”的间接寻址级别不同
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2143: 语法错误: 缺少“)”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2143: 语法错误: 缺少“{”
(在“*”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): warning C4142: "size_t": 类型的
良性重定义
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2370: “size_t”: 重定义
;不同的存储类
E:\MicrosoftVisualStudio14.0\VC\INCLUDE\vcruntime.h(198): note: 参见“size_t”的
声明
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2146: 语法错误: 缺少“;”
(在标识符“data_len”的前面)
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2059: 语法错误:“)”
src\pyconcrete_ext\openaes\inc\oaes_lib.h(167): error C2040: “data_len”:“int
”与“int *”的间接寻址级别不同
src\pyconcrete_ext\pyconcrete.c(38): warning C4476: "printf": 格式说明符中的类型
字段字符“P”未知
src\pyconcrete_ext\pyconcrete.c(38): warning C4477: “printf”: 格式字符串“%d”
需要类型“int”的参数,但可变参数 1 拥有了类型“unsigned char *”
src\pyconcrete_ext\pyconcrete.c(38): warning C4474: printf: 格式字符串中传递的参
数太多
src\pyconcrete_ext\pyconcrete.c(38): note: 占位符和其参数预计 1 可变参数,但提供
的却是 2 参数
src\pyconcrete_ext\pyconcrete.c(48): warning C4013: “oaes_key_import_data”未定
义;假设外部返回 int
src\pyconcrete_ext\pyconcrete.c(99): warning C4013: “oaes_encrypt_block”未定义
;假设外部返回 int
src\pyconcrete_ext\pyconcrete.c(79): warning C4996: 'fopen': This function or va
riable may be unsafe. Consider using fopen_s instead. To disable deprecation, us
e _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\stdio.h(205): n
ote: 参见“fopen”的声明
src\pyconcrete_ext\pyconcrete.c(86): warning C4996: 'fopen': This function or va
riable may be unsafe. Consider using fopen_s instead. To disable deprecation, us
e _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\stdio.h(205): n
ote: 参见“fopen”的声明
src\pyconcrete_ext\pyconcrete.c(205): warning C4013: “oaes_decrypt_block”未定
义;假设外部返回 int
error: command 'E:\\MicrosoftVisualStudio14.0\\VC\\BIN\\cl.exe' failed with exit
 status 2
Falldog commented 7 years ago

Please help to open a new issue, it should be compile error for VS14(Visual Studio 2015)