serge-sans-paille / pythran

Ahead of Time compiler for numeric kernels
https://pythran.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.01k stars 193 forks source link

example of Linux-OK Windows-KO code (::pythonic::numpy::sort?) #1505

Open piotrbartman opened 4 years ago

piotrbartman commented 4 years ago

Referring to issue 1339 I tried it again with (VS 2017, MSVC 14.14) and pythran 0.9.5 and still I have error (again sorry for non-English error messages):

INFO:      sys file exists: ...pythran\pythran.cfg
INFO: platform file exists: ...pythran\pythran-win32.cfg
WARNING:     user file does not exist: ...\.pythranrc
INFO: pythranrc section [pythran] is valid and options are correct
INFO: pythranrc section [typing] is valid and options are correct
INFO: pythranrc section [compiler] is valid and options are correct
WARNING: Failed to find 'pythran-openblas' package. Please install it or change the compiler.blas setting. Defaulting to 'blas'
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
new_compiler returns <class 'distutils._msvccompiler.MSVCCompiler'>
building 'tst' extension
creating (...)
...\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DENABLE_PYTHON_MODULE -D__
PYTHRAN__=3 -DPYTHRAN_BLAS_BLAS -I...pythran -I...numpy\core\inc
lude -I...\include -I...\include -I...\Microsoft Visual Studio\2017\Community\VC\To
ols\MSVC\14.14.26428\ATLMFC\include -I...\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include -I...\Windows Kits\10
\include\10.0.17134.0\ucrt -I...\Windows Kits\10\include\10.0.17134.0\shared -I...\Windows Kits\10\include\10.0.17134.0\um -IC:\Program
Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt -I...\Windows Kits\10\include\10.0.17134.0\cppwinrt /EHsc /Tp...Temp\tmpyo
yc8ajn.cpp /Fo...\Temp\tmpyoyc8ajn.obj /std:c++14
tmpyoyc8ajn.cpp
...pythran\pythonic/python/core.hpp(64): warning C4244: "inicjowanie": konwersja z "Py_ssize_t" do "long", mozliwa utra
ta danych
...pythran\pythonic/python/core.hpp(94): warning C4244: "inicjowanie": konwersja z "npy_intp" do "long", mozliwa utrata
 danych
...pythran\pythonic/python/core.hpp(100): warning C4244: "*=": konwersja z "const npy_intp" do "long", mozliwa utrata d
anych
...pythran\pythonic/python/core.hpp(146): warning C4244: "inicjowanie": konwersja z "Py_ssize_t" do "long", mozliwa utr
ata danych
...pythran\pythonic/types/int.hpp(171): warning C4244: "return": konwersja z "long" do "unsigned char", mozliwa utrata
danych
...pythran\pythonic/types/int.hpp(172): warning C4244: "return": konwersja z "long" do "signed char", mozliwa utrata da
nych
...pythran\pythonic/types/int.hpp(173): warning C4244: "return": konwersja z "long" do "unsigned short", mozliwa utrata
 danych
...pythran\pythonic/types/int.hpp(174): warning C4244: "return": konwersja z "long" do "short", mozliwa utrata danych
...pythran\pythonic/__builtin__/id.hpp(28): warning C4244: "return": konwersja z "uintptr_t" do "long", mozliwa utrata
danych
...pythran\pythonic/__builtin__/id.hpp(33): warning C4244: "return": konwersja z "uintptr_t" do "long", mozliwa utrata
danych
...pythran\pythonic/__builtin__/id.hpp(38): warning C4244: "return": konwersja z "uintptr_t" do "long", mozliwa utrata
danych
...pythran\pythonic/include/utils/shared_ref.hpp(99): warning C4521: "`anonymous-namespace'::pythonic::utils::shared_re
f<std::vector<bool,std::allocator<_Ty>>>": okreslono wiele konstruktor�w kopiujacych
        with
        [
            _Ty=bool
        ]
...pythran\pythonic/include/types/list.hpp(175): note: zobacz odwolanie do klasy klasa szablon; wystapienie ,`anonymous
-namespace'::pythonic::utils::shared_ref<std::vector<bool,std::allocator<_Ty>>>" jest kompilowane
        with
        [
            _Ty=bool
        ]
...pythran\pythonic/include/types/list.hpp(453): note: zobacz odwolanie do klasy klasa szablon; wystapienie ,`anonymous
-namespace'::pythonic::types::list<bool>" jest kompilowane
...pythran\pythonic/include/utils/shared_ref.hpp(99): warning C4521: "`anonymous-namespace'::pythonic::utils::shared_re
f<`anonymous-namespace'::pythonic::types::sliced_str<S>::container_type>": okreslono wiele konstruktor�w kopiujacych
...pythran\pythonic/include/types/str.hpp(31): note: zobacz odwolanie do klasy klasa szablon; wystapienie ,`anonymous-n
amespace'::pythonic::utils::shared_ref<`anonymous-namespace'::pythonic::types::sliced_str<S>::container_type>" jest kompilowane
...pythran\pythonic/include/types/str.hpp(89): note: zobacz odwolanie do klasy klasa szablon; wystapienie ,`anonymous-n
amespace'::pythonic::types::sliced_str<S>" jest kompilowane
...pythran\pythonic/include/utils/shared_ref.hpp(99): warning C4521: "`anonymous-namespace'::pythonic::utils::shared_re
f<std::vector<T,std::allocator<_Ty>>>": okreslono wiele konstruktor�w kopiujacych
        with
        [
            T=`anonymous-namespace'::pythonic::types::str,
            _Ty=`anonymous-namespace'::pythonic::types::str
        ]
...pythran\pythonic/include/types/dynamic_tuple.hpp(20): note: zobacz odwolanie do klasy klasa szablon; wystapienie ,`a
nonymous-namespace'::pythonic::utils::shared_ref<std::vector<T,std::allocator<_Ty>>>" jest kompilowane
        with
        [
            T=`anonymous-namespace'::pythonic::types::str,
            _Ty=`anonymous-namespace'::pythonic::types::str
        ]
...pythran\pythonic/include/types/exceptions.hpp(23): note: zobacz odwolanie do klasy klasa szablon; wystapienie ,`anon
ymous-namespace'::pythonic::types::dynamic_tuple<`anonymous-namespace'::pythonic::types::str>" jest kompilowane
...pythran\pythonic/types/str.hpp(70): warning C4244: "return": konwersja z "__int64" do "long", mozliwa utrata danych
...pythran\pythonic/types/str.hpp(367): warning C4267: "return": konwersja z "size_t" do "long", mozliwa utrata danych
...pythran\pythonic/types/str.hpp(403): warning C4244: "return": konwersja z "__int64" do "long", mozliwa utrata danych

...pythran\pythonic/types/str.hpp(413): warning C4267: "return": konwersja z "size_t" do "long", mozliwa utrata danych
...pythran\pythonic/types/str.hpp(418): warning C4267: "return": konwersja z "size_t" do "long", mozliwa utrata danych
...pythran\pythonic/types/str.hpp(423): warning C4267: "return": konwersja z "size_t" do "long", mozliwa utrata danych
...pythran\pythonic/types/str.hpp(428): warning C4267: "return": konwersja z "size_t" do "long", mozliwa utrata danych
...pythran\pythonic/__builtin__/str.hpp(69): warning C4996: '_snprintf': This function or variable may be unsafe. Consi
der using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
...\Windows Kits\10\include\10.0.17134.0\ucrt\stdio.h(1961): note: zobacz deklaracje ,_snprintf"
...pythran\pythonic/numpy/transpose.hpp(106): warning C4348: ,`anonymous-namespace'::pythonic::numpy::transpose": ponow
na definicja domyslnego parametru: parametr 3
...pythran\pythonic/include/numpy/transpose.hpp(30): note: zobacz deklaracje ,`anonymous-namespace'::pythonic::numpy::t
ranspose"
...pythran\pythonic/operator_/lshift.hpp(20): warning C4804: "<<": niebezpieczne uzycie typu "bool" w operacji
...pythran\pythonic/operator_/rshift.hpp(19): warning C4804: ">>": niebezpieczne uzycie typu "bool" w operacji
...pythran\pythonic/types/slice.hpp(512): warning C4244: "argument": konwersja z "Py_ssize_t" do "const long", mozliwa
utrata danych
...pythran\pythonic/types/slice.hpp(517): warning C4244: "argument": konwersja z "Py_ssize_t" do "const long", mozliwa
utrata danych
...pythran\pythonic/types/slice.hpp(522): warning C4244: "argument": konwersja z "Py_ssize_t" do "const long", mozliwa
utrata danych
...pythran\pythonic\numpy\sort.hpp(134): warning C4348: ,`anonymous-namespace'::pythonic::numpy::sort": ponowna definic
ja domyslnego parametru: parametr 3
...pythran\pythonic\include\numpy\sort.hpp(22): note: zobacz deklaracje ,`anonymous-namespace'::pythonic::numpy::sort"
...pythran\pythonic/include/utils/shared_ref.hpp(99): warning C4521: "`anonymous-namespace'::pythonic::utils::shared_re
f<`anonymous-namespace'::pythonic::types::raw_array<T>>": okreslono wiele konstruktor�w kopiujacych
        with
        [
            T=npy_int64
        ]
...pythran\pythonic/include/types/ndarray.hpp(263): note: zobacz odwolanie do klasy klasa szablon; wystapienie ,`anonym
ous-namespace'::pythonic::utils::shared_ref<`anonymous-namespace'::pythonic::types::raw_array<T>>" jest kompilowane
        with
        [
            T=npy_int64
        ]
...Temp\tmpyoyc8ajn.cpp(32): note: zobacz odwolanie do klasy klasa szablon; wystapienie ,`anonymous-namespace'::pythonic::types::ndarray<npy_int64,`
anonymous-namespace'::pythonic::types::pshape<long>>" jest kompilowane
...Temp\tmpyoyc8ajn.cpp(51): note: zobacz odwolanie do klasy klasa szablon; wystapienie ,__pythran_tst::test::type<`anonymous-namespace'::pythonic::
types::ndarray<npy_int64,`anonymous-namespace'::pythonic::types::pshape<long>>,long>" jest kompilowane
...Temp\tmpyoyc8ajn.cpp(33): error C2672: ,operator __surrogate_func": nie znaleziono zgodnej przeciazonej funkcji
...Temp\tmpyoyc8ajn.cpp(33): error C2893: Nie powiodla sie specjalizacja szablonu funkcji 'unknown-type `anonymous-namespace'::pythonic::numpy::func
tor::sort::operator ()(Types &&...) const'
...Temp\tmpyoyc8ajn.cpp(33): note: Z nastepujacymi argumentami szablonu:
...Temp\tmpyoyc8ajn.cpp(33): note: "Types={__pythran_tst::test::type<`anonymous-namespace'::pythonic::types::ndarray<npy_int64,`anonymous-namespace'
::pythonic::types::pshape<long>>,long>::__type3}"
WARNING: Compilation error, trying hard to find its origin...
WARNING: Nop, I'm going to flood you with C++ errors!
CRITICAL: Cover me Jack. Jack? Jaaaaack!!!!
E: error: Command "...\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DENABLE
_PYTHON_MODULE -D__PYTHRAN__=3 -DPYTHRAN_BLAS_BLAS -I...pythran -I...\lib\site-pack
ages\numpy\core\include -I...\include -I...\include -I...\Microsoft Visual Studio\2
017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\include -I...\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include -IC:\Program Files (x
86)\Windows Kits\10\include\10.0.17134.0\ucrt -I...\Windows Kits\10\include\10.0.17134.0\shared -I...\Windows Kits\10\include\10.0.17134
.0\um -I...\Windows Kits\10\include\10.0.17134.0\winrt -I...\Windows Kits\10\include\10.0.17134.0\cppwinrt /EHsc /Tp...\AppDa
ta\Local\Temp\tmpyoyc8ajn.cpp /Fo...\Temp\tmpyoyc8ajn.obj /std:c++14" failed with exit status 2
serge-sans-paille commented 4 years ago

I'm not officially supporting VS code, it's too much of a burden. Instea, you can try using clang on Windows, it works like a charm!