{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/7597","repository_url":"https://api.github.com/repos/scipy/scipy","labels_url":"https://api.github.com/repos/scipy/scipy/issues/7597/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/7597/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/7597/events","html_url":"https://github.com/scipy/scipy/issues/7597","id":242676283,"number":7597,"title":"Compiling scipy on Windows with MSVC and mingwpy gfortran","user":{"login":"matthew-brett","id":67612,"avatar_url":"https://avatars6.githubusercontent.com/u/67612?v=4","gravatar_id":"","url":"https://api.github.com/users/matthew-brett","html_url":"https://github.com/matthew-brett","followers_url":"https://api.github.com/users/matthew-brett/followers","following_url":"https://api.github.com/users/matthew-brett/following{/other_user}","gists_url":"https://api.github.com/users/matthew-brett/gists{/gist_id}","starred_url":"https://api.github.com/users/matthew-brett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthew-brett/subscriptions","organizations_url":"https://api.github.com/users/matthew-brett/orgs","repos_url":"https://api.github.com/users/matthew-brett/repos","events_url":"https://api.github.com/users/matthew-brett/events{/privacy}","received_events_url":"https://api.github.com/users/matthew-brett/received_events","type":"User","site_admin":false},"labels":[{"id":37343996,"url":"https://api.github.com/repos/scipy/scipy/labels/Build%20issues","name":"Build issues","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":63,"created_at":"2017-07-13T11:56:15Z","updated_at":"2017-07-16T21:21:21Z","closed_at":null,"body":"At the moment we have a single major blocker to compiling scipy on Windows:\r\n\r\n* Python.org Windows binaries are compiled against an MS Visual C++ runtime, which differs with different Python versions: see https://matthew-brett.github.io/pydagogue/python_msvc.html\r\n* It is dangerous and error-prone to pass objects (such as file-handles) that are created using one run-time, into code linked against another run-time;\r\n* There is currently Fortran compiler with a BSD-compatible run-time license that can link against all the MSVC runtimes we need to support.  In particular mingw-w64 cannot currently link against MSVC 2015 runtimes, used by Pythons 3.5 and 3.6.\r\n\r\nHere we are exploring another option, which is to compile the Fortran code to link against the generic MSVCRT runtime, on the basis that the Fortran code does not use any of the objects (such as file-handles) that get created by the Python (and Numpy) linked MSVC run-times. The plan is therefore:\r\n\r\n* Compile scipy C code with the MSVC compiler matching the version of Python;\r\n* Compile scipy Fortran code with gfortran linking against the generic MSVCRT runtime;\r\n* Hope for the best.\r\n\r\nThere's some discussion of this over at #7551 - starting at https://github.com/scipy/scipy/issues/7551#issuecomment-312460365.\r\n\r\nAppveyor scripting at https://github.com/matthew-brett/build-scipy . Builds at https://ci.appveyor.com/project/matthew-brett/build-scipy\r\n\r\nThe procedure so far is the following (see: https://github.com/matthew-brett/build-scipy/blob/master/appveyor.yml):\r\n\r\n* Download and install mingwpy into Python 2.7 matching the bitness (32 or 64) of the Python we're building in;\r\n* Patch [mingwpy](https://mingwpy.github.io/) to link to the the default msvcrt.dll rather than the specific MSVC 9 runtime;\r\n* Unpack built OpenBLAS, and point scipy install to that build;\r\n* Patch numpy distutils to avoid linking to some mingw-specific libraries;\r\n* Build scipy.\r\n\r\nCurrent errors are for missing math symbols such as `_sinf` - see [this report](https://github.com/scipy/scipy/issues/7551#issuecomment-314930962) and [Pauli's suggestion](https://github.com/scipy/scipy/issues/7551#issuecomment-314999140).\r\n\r\nCurrent participants @matthew-brett @rgommers @pv @carlkl ."},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/315638197","html_url":"https://github.com/scipy/scipy/issues/7597#issuecomment-315638197","issue_url":"https://api.github.com/repos/scipy/scipy/issues/7597","id":315638197,"user":{"login":"xoviat","id":15351036,"avatar_url":"https://avatars5.githubusercontent.com/u/15351036?v=4","gravatar_id":"","url":"https://api.github.com/users/xoviat","html_url":"https://github.com/xoviat","followers_url":"https://api.github.com/users/xoviat/followers","following_url":"https://api.github.com/users/xoviat/following{/other_user}","gists_url":"https://api.github.com/users/xoviat/gists{/gist_id}","starred_url":"https://api.github.com/users/xoviat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xoviat/subscriptions","organizations_url":"https://api.github.com/users/xoviat/orgs","repos_url":"https://api.github.com/users/xoviat/repos","events_url":"https://api.github.com/users/xoviat/events{/privacy}","received_events_url":"https://api.github.com/users/xoviat/received_events","type":"User","site_admin":false},"created_at":"2017-07-16T21:21:20Z","updated_at":"2017-07-16T21:21:20Z","body":"I personally believe that the DLL route is less likely to require long-term maintenance but as long as there are wheels, I won't complain."}}
{"actor":{"display_login":"xoviat"}}