quickfix / quickfix

QuickFIX C++ Fix Engine Library
Other
1.55k stars 751 forks source link

pip install quickfix fails on windows, vs2015 & 2017 #198

Open obiben opened 6 years ago

obiben commented 6 years ago

I've tried installing quickfix on 2 separate windows 10 machines, one on python 3.6.2 (using vs2015) and the other on 3.6.4 (using vs2017).

Both installations fail with the same error messages:

$ pip install quickfix
Collecting quickfix
  Using cached https://files.pythonhosted.org/packages/62/b0/caf2dfae8779551f6e1d2bc78668d8f5a2303d21311fdd54345722b68cbc/quickfix-1.15.1.tar.gz
Installing collected packages: quickfix
  Running setup.py install for quickfix: started
    Running setup.py install for quickfix: finished with status 'error'
    Complete output from command c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\BENOIT~1\\AppData\\Local\\Temp\\pip-install-zci98jho\\quickfix\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\BENOIT~1\AppData\Local\Temp\pip-record-7lq1bbqr\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    copying quickfix.py -> build\lib.win-amd64-3.6
    copying quickfixt11.py -> build\lib.win-amd64-3.6
    copying quickfix40.py -> build\lib.win-amd64-3.6
    copying quickfix41.py -> build\lib.win-amd64-3.6
    copying quickfix42.py -> build\lib.win-amd64-3.6
    copying quickfix43.py -> build\lib.win-amd64-3.6
    copying quickfix44.py -> build\lib.win-amd64-3.6
    copying quickfix50.py -> build\lib.win-amd64-3.6
    copying quickfix50sp1.py -> build\lib.win-amd64-3.6
    copying quickfix50sp2.py -> build\lib.win-amd64-3.6
    running build_ext
    Testing for std::tr1::shared_ptr...
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -IC++ -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" /EHsc /Tptest_std_tr1_shared_ptr.cpp /Fotest_std_tr1_shared_ptr.obj
    test_std_tr1_shared_ptr.cpp
    test_std_tr1_shared_ptr.cpp(1): fatal error C1083: Cannot open include file: 'tr1/memory': No such file or directory
     ...not found
    Testing for std::shared_ptr...
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe -std=c++0x /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -IC++ -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" /EHsc /Tptest_std_shared_ptr.cpp /Fotest_std_shared_ptr.obj
    cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
    test_std_shared_ptr.cpp
    ...found
    Testing for std::unique_ptr...
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe -std=c++0x /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -DHAVE_STD_SHARED_PTR -IC++ -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" /EHsc /Tptest_std_unique_ptr.cpp /Fotest_std_unique_ptr.obj
    cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
    test_std_unique_ptr.cpp
    ...found
    building '_quickfix' extension
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    creating build\temp.win-amd64-3.6\Release\C++
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -DHAVE_STD_SHARED_PTR -DHAVE_STD_UNIQUE_PTR -IC++ -Ic:\python36\include -Ic:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" /EHsc /TpC++\Acceptor.cpp /Fobuild\temp.win-amd64-3.6\Release\C++\Acceptor.obj -std=c++0x -Wno-deprecated -Wno-unused-variable -Wno-deprecated-declarations -Wno-maybe-uninitialized
    cl : Command line error D8021 : invalid numeric argument '/Wno-deprecated'
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\BENOIT~1\\AppData\\Local\\Temp\\pip-install-zci98jho\\quickfix\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\BENOIT~1\AppData\Local\Temp\pip-record-7lq1bbqr\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\BENOIT~1\AppData\Local\Temp\pip-install-zci98jho\quickfix\
christian-quisbert commented 6 years ago

Hi, try with python 2.7(this version works ok) or look at this issue #125.

obiben commented 6 years ago

Hey Christian, Issue #125 doesn't seem to be related. That was caused by an old-style print statement without parenthesis. Here build fails because of build arguments, which I will admit I know nothing about.

After installing python 2.7 and the VC compiler, I get a very similar error using pip for 2.7:

$ ./pip2.7.exe install quickfix
Collecting quickfix
  Using cached https://files.pythonhosted.org/packages/62/b0/caf2dfae8779551f6e1d2bc78668d8f5a2303d21311fdd54345722b68cbc/quickfix-1.15.1.tar.gz
Installing collected packages: quickfix
  Running setup.py install for quickfix: started
    Running setup.py install for quickfix: finished with status 'error'
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\ben\\appdata\\local\\temp\\pip-build-she7zt\\quickfix\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\ben\appdata\local\temp\pip-q6yocm-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-2.7
    copying quickfix.py -> build\lib.win32-2.7
    copying quickfixt11.py -> build\lib.win32-2.7
    copying quickfix40.py -> build\lib.win32-2.7
    copying quickfix41.py -> build\lib.win32-2.7
    copying quickfix42.py -> build\lib.win32-2.7
    copying quickfix43.py -> build\lib.win32-2.7
    copying quickfix44.py -> build\lib.win32-2.7
    copying quickfix50.py -> build\lib.win32-2.7
    copying quickfix50sp1.py -> build\lib.win32-2.7
    copying quickfix50sp2.py -> build\lib.win32-2.7
    running build_ext
    Testing for std::tr1::shared_ptr...
    C:\Users\Ben\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPYTHON_MAJOR_VERSION=2 -IC++ -Ic:\python27\include -Ic:\python27\PC /Tptest_std_tr1_shared_ptr.cpp /Fotest_std_tr1_shared_ptr.obj
    test_std_tr1_shared_ptr.cpp
    test_std_tr1_shared_ptr.cpp(1) : fatal error C1083: Cannot open include file: 'tr1/memory': No such file or directory
     ...not found
    Testing for std::shared_ptr...
    C:\Users\Ben\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe -std=c++0x /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPYTHON_MAJOR_VERSION=2 -IC++ -Ic:\python27\include -Ic:\python27\PC /Tptest_std_shared_ptr.cpp /Fotest_std_shared_ptr.obj
    cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
    test_std_shared_ptr.cpp
    test_std_shared_ptr.cpp(5) : error C2039: 'shared_ptr' : is not a member of 'std'
    test_std_shared_ptr.cpp(5) : error C2065: 'shared_ptr' : undeclared identifier
    test_std_shared_ptr.cpp(5) : error C2062: type 'int' unexpected
    ...not found
    Testing for std::unique_ptr...
    C:\Users\Ben\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe -std=c++0x /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPYTHON_MAJOR_VERSION=2 -IC++ -Ic:\python27\include -Ic:\python27\PC /Tptest_std_unique_ptr.cpp /Fotest_std_unique_ptr.obj
    cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
    test_std_unique_ptr.cpp
    test_std_unique_ptr.cpp(5) : error C2039: 'unique_ptr' : is not a member of 'std'
    test_std_unique_ptr.cpp(5) : error C2065: 'unique_ptr' : undeclared identifier
    test_std_unique_ptr.cpp(5) : error C2062: type 'int' unexpected
    ...not found
    building '_quickfix' extension
    creating build\temp.win32-2.7
    creating build\temp.win32-2.7\Release
    creating build\temp.win32-2.7\Release\C++
    C:\Users\Ben\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPYTHON_MAJOR_VERSION=2 -IC++ -Ic:\python27\include -Ic:\python27\PC /TpC++\Acceptor.cpp /Fobuild\temp.win32-2.7\Release\C++\Acceptor.obj -std=c++0x -Wno-deprecated -Wno-unused-variable -Wno-deprecated-declarations -Wno-maybe-uninitialized
    cl : Command line error D8021 : invalid numeric argument '/Wno-deprecated'
    error: command 'C:\\Users\\Ben\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\ben\\appdata\\local\\temp\\pip-build-she7zt\\quickfix\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\ben\appdata\local\temp\pip-q6yocm-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\ben\appdata\local\temp\pip-build-she7zt\quickfix\
christian-quisbert commented 6 years ago

Ok. Your problem it is'nt quickfix, is the VC++ compiler. Look at the README:

BUILDING AND INSTALLING

Full instructions: See doc/html/building.html

The building.html talks about that. Use quickfix_vs15.sln and maybe config_windows.h

obiben commented 6 years ago

Simply loading the _vs14.sln file (in vs2015) and building works for building quickfix.lib, but that doesn't help me use the python bindings...

My problem is with the pip install command (standard way to install python bindings). On the quickfixengine.org page, there is this line: $ pip install quickfix Which seems to imply one could install the python bindings without cloning the repository, building the project and then taking some additional steps for python bindings to get installed - probably related to the quickfix-package repository? There isn't any documentation there and I always seem to be missing some file or another when executing the scripts that are in there.

I welcome any solution that lets me use the quickfix python package on windows, however much trouble it might be, but I'm assuming the fact that the pip command doesn't work should also be considered an issue.

christian-quisbert commented 6 years ago

Look at the related issues: #190 #192

obiben commented 6 years ago

One is the same as #125, and the other is unanswered. :(

obiben commented 6 years ago

Spent a little more time on this, trying to get the quickfix-package/build.bat script to work. Environment: Windows 10, Visual Studio community 15.0

Ben@Ben MINGW64 /d/quickfix-package/quickfix-python (master)
$ python setup.py install
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
copying quickfix.py -> build\lib.win-amd64-3.6
copying quickfixt11.py -> build\lib.win-amd64-3.6
copying quickfix40.py -> build\lib.win-amd64-3.6
copying quickfix41.py -> build\lib.win-amd64-3.6
copying quickfix42.py -> build\lib.win-amd64-3.6
copying quickfix43.py -> build\lib.win-amd64-3.6
copying quickfix44.py -> build\lib.win-amd64-3.6
copying quickfix50.py -> build\lib.win-amd64-3.6
copying quickfix50sp1.py -> build\lib.win-amd64-3.6
copying quickfix50sp2.py -> build\lib.win-amd64-3.6
running build_ext
Testing for std::tr1::shared_ptr...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tptest_std_tr1_shared_ptr.cpp /Fotest_std_tr1_shared_ptr.obj
test_std_tr1_shared_ptr.cpp
test_std_tr1_shared_ptr.cpp(1): fatal error C1083: Cannot open include file: 'tr1/memory': No such file or directory
 ...not found
Testing for std::shared_ptr...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe -std=c++0x /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tptest_std_shared_ptr.cpp /Fotest_std_shared_ptr.obj
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
test_std_shared_ptr.cpp
...found
Testing for std::unique_ptr...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe -std=c++0x /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -DHAVE_STD_SHARED_PTR -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tptest_std_unique_ptr.cpp /Fotest_std_unique_ptr.obj
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
test_std_unique_ptr.cpp
c1xx: fatal error C1083: Cannot open source file: 'test_std_unique_ptr.cpp': No such file or directory
...not found
building '_quickfix' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\C++
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -DHAVE_STD_SHARED_PTR -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /TpC++\Acceptor.cpp /Fobuild\temp.win-amd64-3.6\Release\C++\Acceptor.obj -std=c++0x -Wno-deprecated -Wno-unused-variable -Wno-deprecated-declarations -Wno-maybe-uninitialized
cl : Command line error D8021 : invalid numeric argument '/Wno-deprecated'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
quickfix commented 6 years ago

You can get pre-built wheel files here. This is the best way to get the quickfix python api working on windows.

https://www.lfd.uci.edu/~gohlke/pythonlibs/#quickfix

-------- Original Message -------- Subject: Re: [quickfix/quickfix] pip install quickfix fails on windows, vs2015 & 2017 (#198) From: obiben notifications@github.com Date: Fri, July 06, 2018 8:19 am To: quickfix/quickfix quickfix@noreply.github.com Cc: Subscribed subscribed@noreply.github.com

Spent a little more time on this, trying to get the quickfix-package/build.bat script to work. Environment: Windows 10, Visual Studio community 15.0

  • Installed doxygen
  • Installed 7zip
  • Added 7zip to path
  • Added VS2017 MSBuild.exe's location to path
  • Installed windows 8.1 sdk
  • Updated visual studio to 15.5.6
  • Added C++ UWP and linux C++ tools on a hunch
  • Run "./build.bat 2015 1.15.1"
  • Install twine
  • Add twine to path
  • Run "./package-python.sh" (mingw64 console)
  • cd quickfix-python
  • python setup.py install
Ben@Ben MINGW64 /d/quickfix-package/quickfix-python (master)
$ python setup.py install
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
copying quickfix.py -> build\lib.win-amd64-3.6
copying quickfixt11.py -> build\lib.win-amd64-3.6
copying quickfix40.py -> build\lib.win-amd64-3.6
copying quickfix41.py -> build\lib.win-amd64-3.6
copying quickfix42.py -> build\lib.win-amd64-3.6
copying quickfix43.py -> build\lib.win-amd64-3.6
copying quickfix44.py -> build\lib.win-amd64-3.6
copying quickfix50.py -> build\lib.win-amd64-3.6
copying quickfix50sp1.py -> build\lib.win-amd64-3.6
copying quickfix50sp2.py -> build\lib.win-amd64-3.6
running build_ext
Testing for std::tr1::shared_ptr...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tptest_std_tr1_shared_ptr.cpp /Fotest_std_tr1_shared_ptr.obj
test_std_tr1_shared_ptr.cpp
test_std_tr1_shared_ptr.cpp(1): fatal error C1083: Cannot open include file: 'tr1/memory': No such file or directory
 ...not found
Testing for std::shared_ptr...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe -std=c++0x /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tptest_std_shared_ptr.cpp /Fotest_std_shared_ptr.obj
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
test_std_shared_ptr.cpp
...found
Testing for std::unique_ptr...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe -std=c++0x /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -DHAVE_STD_SHARED_PTR -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tptest_std_unique_ptr.cpp /Fotest_std_unique_ptr.obj
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
test_std_unique_ptr.cpp
c1xx: fatal error C1083: Cannot open source file: 'test_std_unique_ptr.cpp': No such file or directory
...not found
building '_quickfix' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\C++
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -DHAVE_STD_SHARED_PTR -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /TpC++\Acceptor.cpp /Fobuild\temp.win-amd64-3.6\Release\C++\Acceptor.obj -std=c++0x -Wno-deprecated -Wno-unused-variable -Wno-deprecated-declarations -Wno-maybe-uninitialized
cl : Command line error D8021 : invalid numeric argument '/Wno-deprecated'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
  • Curse a little

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/quickfix/quickfix/issues/198#issuecomment-403031881

obiben commented 6 years ago

You, sir, are a true hero. I remember getting packages from this list but never thought to go looking for it again!

obiben commented 6 years ago

But, might I ask, is there a reason why those wheel files aren't what we get when pip install'ing quickfix?

whoan commented 5 years ago

@obiben I opened a PR to fix an issue with some conditions to include the proper header and use the proper namespace. It is #202

I think that might solve the problem you were having.

obiben commented 5 years ago

I've changed the package.bat checkout lines to

git clone --depth 1 https://github.com/whoan/quickfix.git
git checkout fix-conditional-shared-ptr

The packaging went smooth, but python setup.py install still failed, although differently:

$ python setup.py install
running install
running build
running build_py
running build_ext
Testing for std::tr1::shared_ptr...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tptest_std_tr1_shared_ptr.cpp /Fotest_std_tr1_shared_ptr.obj
test_std_tr1_shared_ptr.cpp
test_std_tr1_shared_ptr.cpp(1): fatal error C1083: Cannot open include file: 'tr1/memory': No such file or directory
 ...not found
Testing for std::shared_ptr...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe -std=c++0x /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tptest_std_shared_ptr.cpp /Fotest_std_shared_ptr.obj
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
test_std_shared_ptr.cpp
...found
Testing for std::unique_ptr...
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe -std=c++0x /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -DHAVE_STD_SHARED_PTR -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /Tptest_std_unique_ptr.cpp /Fotest_std_unique_ptr.obj
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
test_std_unique_ptr.cpp
c1xx: fatal error C1083: Cannot open source file: 'test_std_unique_ptr.cpp': No such file or directory
...not found
building '_quickfix' extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -DHAVE_STD_SHARED_PTR -IC++ -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /EHsc /TpC++\Acceptor.cpp /Fobuild\temp.win-amd64-3.6\Release\C++\Acceptor.obj -std=c++0x -Wno-unused-variable -Wno-deprecated-declarations -Wno-maybe-uninitialized
cl : Command line error D8021 : invalid numeric argument '/Wno-unused-variable'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

As far as I can tell, we're missing a test file in the package directory: 'test_std_unique_ptr.cpp' really does not exist.

whoan commented 5 years ago

@obiben Notice that some errors are expected and they are part of the checkings to see where shared_ptr is located. eg: 'tr1/memory': No such file or directory is a normal error.

Now I think you are having a different problem.

Besides, thanks to your comment I dug deeper and I saw another define that was wrong. Thanks.

obiben commented 5 years ago

Yeah, I assumed the test failing might be normal, my problem is now just that the setup.py file is expecting a test file that doesn't exist

obiben commented 5 years ago

In fact no, that isn't even the problem here. Failing to find the test file is handled...

the /Wno-xxxx flags are my problem, it would seem. Then again, removing them all fails at

QuickfixPython.cpp
C++\QuickfixPython.cpp(1): error C2059: syntax error: '.'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
obiben commented 5 years ago

Then again, QuickfixPython.cpp and .h contain ../python/QuickfixPython.cpp and ../python/QuickfixPython.h, respectively. Is that a normal thing for C++ files? The packaging script doesn't copy the python folder, but python/QuickfixPython.cpp / python/QuickfixPython.h seem like normal files in the quickfix source

obiben commented 5 years ago

Replacing quickfix-package\quickfix-python\C++\QuickfixPython.cpp and quickfix-package\quickfix-python\C++\QuickfixPython.h

by the files found in quickfix\src\python got me all the way through the build

obiben commented 5 years ago

So, quick recap

Requirements:

Changes:

obiben commented 5 years ago

The PyPI package contains the correct files, though - so it's possible the quickfix-package repo isn't meant for anyone else than @quickfix

Then it'd be a case of removing the flags... maybe

  1. Changing setup.py to
    
    extra_compile_args = ['-std=c++0x', '-Wno-deprecated', '-Wno-unused-variable', '-Wno-deprecated-declarations', '-Wno-maybe-uninitialized']
    if os.name == 'nt':
    extra_compile_args = ['-std=c++0x']

setup(name='quickfix', version='1.15.1', py_modules=['quickfix', 'quickfixt11', 'quickfix40', 'quickfix41', 'quickfix42', 'quickfix43', 'quickfix44', 'quickfix50', 'quickfix50sp1', 'quickfix50sp2'], data_files=[('share/quickfix', glob.glob('spec/FIX.xml'))], author='Oren Miller', author_email='oren@quickfixengine.org', maintainer='Oren Miller', maintainer_email='oren@quickfixengine.org', description="FIX (Financial Information eXchange) protocol implementation", url='http://www.quickfixengine.org', download_url='http://www.quickfixengine.org', license=license, include_dirs=['C++'], cmdclass = {'build_ext': build_ext_subclass }, ext_modules=[Extension('_quickfix', glob.glob('C++/.cpp'), extra_compile_args=extra_compile_args)], )



2. Either removing 

> ```
> #ifdef _MSC_VER
> #include "stdafx.h"
> #else
> #include "config.h"
> #endif
> ```
> from every .cpp file or including the file

Would make pip install work
obiben commented 5 years ago

I'm basically live blogging my progress at this point, sorry for that...

Changing the setup.py file and adding an empty stdafx.h file (quicker then removing all includes!) got me smooth sailing until

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -DHAVE_STD_SHARED_PTR -DHAVE_STD_UNIQUE_PTR -IC++ -IC:\Python
n36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\inc
t" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.171
m Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" /EHsc /TpC++\QuickfixPython.cpp /Fobuild\temp.win-amd64-3.6\Release\C++\QuickfixPython.obj -std=c++0x
cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
QuickfixPython.cpp
e:\quickfix-1.15.1\c++\Utility.h(70): error C2371: 'ssize_t': redefinition; different basic types
c:\python36\include\pyconfig.h(172): note: see declaration of 'ssize_t'
e:\quickfix-1.15.1\c++\FieldConvertors.h(347): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
e:\quickfix-1.15.1\c++\FieldConvertors.h(347): warning C4267: 'initializing': conversion from 'size_t' to 'const int', possible loss of data
e:\quickfix-1.15.1\c++\FieldConvertors.h(541): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
e:\quickfix-1.15.1\c++\FieldConvertors.h(628): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
C++\QuickfixPython.cpp(6498): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(6510): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(6590): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(6669): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(6787): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(6799): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(6846): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(6966): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(7053): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(7283): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(7410): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(7537): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(7664): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(7791): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(7927): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(8166): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(8405): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(8644): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(8883): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(9122): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(9352): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(9479): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(9606): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(9733): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(9860): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(9996): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(10235): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(10474): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(10704): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(10831): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(10958): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(11085): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(11229): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(11373): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(11517): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(11649): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(11768): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(12024): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(12386): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(12511): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(13346): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(13403): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(13460): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(13517): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(13641): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(13698): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(13755): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(13812): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(13869): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(13926): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(14050): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(14107): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(16962): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(18431): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(20341): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(20392): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(20464): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(20527): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(20611): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(20686): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(20794): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(20893): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(21013): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(21124): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(21489): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(22137): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(22204): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(22262): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(22311): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(22578): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(22717): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(22785): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(22862): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(22948): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(23172): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(23184): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(23240): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(23471): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(24476): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(24714): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(244046): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(244058): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(244070): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(244082): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(244161): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(244173): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(244185): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(244486): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(244537): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245151): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245350): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245413): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245530): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245593): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245656): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245719): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245786): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245798): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245862): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245924): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(245986): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(246048): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(246102): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(247852): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(247903): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(248772): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(249265): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(249434): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(249584): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(249596): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(249608): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(249689): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(249701): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(249970): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(250015): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(250441): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(250520): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(251568): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(251633): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(252605): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(252658): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(252711): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(252821): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(252874): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(252927): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(253249): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(253302): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(253355): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(253461): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(253520): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(253532): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(253804): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(253863): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(253875): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(253934): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(254005): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(254017): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(254219): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(254272): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(254325): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(254651): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(255105): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(255833): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(256455): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(256731): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(259579): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(260274): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(260325): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(260492): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(260728): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(260781): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(260903): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(260963): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261022): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261034): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261110): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261122): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261198): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261210): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261298): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261352): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261414): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261477): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261793): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261856): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(261918): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(262016): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(262099): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(262162): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(262239): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
C++\QuickfixPython.cpp(262251): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'long', possible loss of data
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

I'm not quite sure what the problem is here

howben commented 5 years ago

Hi Obiben - did you ever resolve this issue? I am having exactly the same problem but have nowhere near your level of expertise. I have Python 2.7.15 in an Anaconda environment on Windows if that is relevant.

obiben commented 5 years ago

@howben No I don't think I ever got this to compile all the way. As to my level of expertise, you can clearly see the progression from clueless to semi-clueless during these few days of digging. In my experience, when you hit problems like this all you can do is read error message and google/guess your way out of the mess - and it'll most likely work if you put in the time.

For now the best solution is to download and install the pre-built wheels @quickfix linked: https://www.lfd.uci.edu/~gohlke/pythonlibs/#quickfix

howben commented 5 years ago

@obiben I had actually found that site but had not selected the correct wheel. It worked when I was a bit more careful. Thanks.

MontyTune commented 5 years ago

@obiben did you ever figure out that argument conversion from py_ssize_t to long?? i am having the exact same issue

obiben commented 5 years ago

@MontyTune nope. look at the link a couple comments up.

MontyTune commented 5 years ago

@obiben I am talking to the guy that compiled those specific Binaries. I had to create custom messages and fields in Quickfix. And got everything working except this specific error.

renaudl commented 4 years ago

Hello, I face the same issue. error on : invalid numeric argument '/Wno-deprecated'

michael-doubez commented 4 years ago

For now the best solution is to download and install the pre-built wheels @quickfix linked: https://www.lfd.uci.edu/~gohlke/pythonlibs/#quickfix

It seems the setup.py is modified in the zip package. Doesn't that help ?

Alireza-Ghavabesh commented 4 years ago

The installation of the package in Python is really bad

Alireza-Ghavabesh commented 4 years ago

i have this problem with faster-than-requests and quickfix What really is the best solution to the problems of installation?

zoakes commented 2 years ago

I have the quickfix-15.1.1 downloaded, I don't know how to to install it from the package here? I simply want pip install to work... to be able to reference in Python like any other package.

xntltd commented 2 years ago

struggling with the same issue right now. Was able to fix 23 out of 24 missing refs by supplying x64 libraries for distutils.setup. However have issue with uniqueptr referencing in dictionary loading --

found it. For some reasons quickfix-package doesn't contain test_unique_ptr cpp, so it's compiling with shared_ptr (which have some issues). Got this file from package link above and voila!

marianomat commented 1 year ago

Hello I'm having the same issue, is the pip installer still having the same problems?

I'm thinking about using the compiled version from Christoph Gohlke, Did anyone have any trouble using that?

Thanks!

CplusPython23 commented 4 months ago

Hi all, really struggling with the exact same problem - https://www.lfd.uci.edu/~gohlke/pythonlibs/ is not available to download anymore. Anyone know where it went? Thanks in advance!

loic-ehrhardt commented 4 months ago

Hi everyone,

Same problem for me. @CplusPython23 actually you can still find the files if you go to webarchive. https://web.archive.org/web/20230717150155/https://www.lfd.uci.edu/~gohlke/pythonlibs/ From there if you click one of the quickfix links it will tell you the link was not archived. However the links are actually still currently accessible, e.g.: https://download.lfd.uci.edu/pythonlibs/archived/quickfix-1.15.1-cp39-cp39-win_amd64.whl

If you download the zip source code and compare to the one you can get on pypi, one can notice that some files were modified, which seem to handle the issues mentioned in this thread (e.g. Py_ssize_t, tr1/memory). I managed to compile for windows with the patched zip source.

Bests.

CplusPython23 commented 4 months ago

Hi Loïc,

Many thanks!!! You really saved me some time - very much appreciated!

julian62645 commented 3 months ago

Thanks for the solution everyone. Been frustrated to pip install quickfix on windows as a beginner.

Issue ERROR: Failed building wheel for quickfix Failed to build quickfix ERROR: Could not build wheels for quickfix, which is required to install pyproject.toml-based projects

Solution:

  1. For python 3.9, download this file at https://download.lfd.uci.edu/pythonlibs/archived/quickfix-1.15.1-cp39-cp39-win_amd64.whl For other python version, download respective .whl file in this website https://www.lfd.uci.edu/~gohlke/pythonlibs/#quickfix
  2. Open your command line interface (CLI).
  3. Navigate to the directory where the downloaded the file (.whl) is located. You can do this using the cd command followed by the path to the directory. For me: In the cmd, type "cd C:\Users\User\Downloads" and enter 4.Once you're in the correct directory, use the following pip command to install the wheel: For me its: type "pip install quickfix-1.15.1-cp39-cp39-win_amd64.whl" and enter

Hope this helps.

zoakes commented 3 months ago

^^ there’s some missing context in this answer.

That install via wheel will work for CPython 3.9. It will not work for 3.8, or 3.10, etc.

You need to install the correct wheel based on your respective Python version.