Re: Error installing Python Extension on Windows 10 - SaxonHEC1.2.1

Jack Trade <[email protected]>
Newsgroups gmane.text.xml.saxon.help
Message-ID <MN2PR19MB4061C298C6D27E950D3D0BC1F77E0@MN2PR19MB4061.namprd19.prod.outlook.com>
Well, where do I start?

First, as per the instructions, I’m using “Powershell” and/or the “Administrator Developer Command Prompt for VS 2017”, both in Administrator mode. They are both x64 prompts (verified by using “echo %programfiles%”).

Second, I figured it can’t hurt and tried it also on the Command prompt, Administrator mode, and verified that one is also x64.

I got the same set of errors as with the other two prompts, but, because of your comment, something occurred to me:

A solution to the problem of “cl.exe” not being able to find  “io.h” is to refer the os to its location, which by default, is in the folder :

C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt

Once “cl.exe” finds the missing “io.h”, another file is somehow activated:

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat

That file, in turn, takes as command line argument the architecture name reflected in the path of “io.h”. Since the path includes “(x86)”,  I suspect that argument to be the source of the

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'

error message…

I have to say, all this is very far from my expertise, so I may be totally off base. It does sound to me like the solution is to have the folder “Windows Kits\10\Include\10.0.17763.0\ucrt” installed in the regular “C:\Program Files” folder instead of “C:\Program Files (x86)” folder.
Could that be the reason why some people suggest installing the Windows 10 SDK???


Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: O'Neil Delpratt<mailto:oneil-JkSD5nQpfvpWk0Htik3J/[email protected]>
Sent: Wednesday, July 15, 2020 11:49 AM
To: Mailing list for the SAXON XSLT and XQuery processor<mailto:[email protected]>
Subject: Re: [saxon] Error installing Python Extension on Windows 10 - SaxonHEC1.2.1




On 13 Jul 2020, at 16:38, Jack Trade <[email protected]<mailto:[email protected]>> wrote:

Thanks, O’Neil.

Yes, I’m aware of that question and the idea of installing Windows 10 SDK. I tried most of the methods there and was hoping to avoid installing the SDK. I’ll do that if there’s no other solution.

FYI, I also ran into another solution – open the Administrator Developer Command Prompt for VS 2017 (never heard of it, nor knew it was installed on my machine…) and make sure you do that as administrator (!) and run “saxon-setup.py build_ext -if " inside that.  Doing that got me past the  “Cannot open include file: 'io.h': No such file or directory" stage (it’s something, at least…) but smack into another error message:

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x86\\link.exe' failed with exit status 1112



Saxon/C is in 64-bit. Are you using the x64 command prompt? I wonder if your error is related to this?



I’m still try to research that one; seems even worse than the “missing” io.h” error.

Maybe you guys should consider just releasing a virtual machine image  (an Ubuntu guest for example) with the most recent Python and Saxon HE versions pre-installed…


There is a docker file included with the install, but I have just noticed that this is out-dated. Committing a patch for this file shortly.

In the meantime you can modify it to build a docker image for Saxon/C1.2.1 and add the command to build the Python extension.

kind regards,

O'Neil

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.