Project

Profile

Help

Bug #6277

closed

How to build saxonche 12 under Windows?

Added by Martin Honnen 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
Python Build
Start date:
2023-12-03
Due date:
% Done:

100%

Estimated time:
Found in version:
12.4.1
Fixed in version:
12.4.2
Platforms:

Description

With SaxonC 12, as there now wheels on PyPi, I have so far never tried to build the module under Windows (or any other platform) myself; however, now, as some stuff like parse_json doesn't seem to be working as documented, I tried to build the module, it works as documented at https://www.saxonica.com/saxon-c/documentation12/index.html#!starting/installingpython under Linux but fails for me under Windows (11).

The errors I get for python setup.py build_ext -if are "warning: no library file corresponding to '..\libs\win\saxon-hec-12.4.1' found (skipping)" and (then as a consequence?) "LINK : fatal error LNK1181: cannot open input file 'libs\win\libsaxon-hec-12.4.1.lib'".

Any hints appreciated how to fix that.

I have tried to figure what could be wrong and changed some values (e.g. saxon-hec-12.4.1 to libsaxon-hec-12.4.1) but I never had any success with my attempts. As you build the official wheel/module somehow I hope you can clue me in.

Below is the end of the longish output of the module setup run (of the original files as downloaded):

saxonc.cpp
python_saxon/saxonc.cpp(15867): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
python_saxon/saxonc.cpp(16554): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
python_saxon/saxonc.cpp(18013): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
python_saxon/saxonc.cpp(31483): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
python_saxon/saxonc.cpp(42321): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
python_saxon/saxonc.cpp(42574): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int', possible loss of data
python_saxon/saxonc.cpp(43398): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
python_saxon/saxonc.cpp(44195): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
python_saxon/saxonc.cpp(72432): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
python_saxon/saxonc.cpp(91867): warning C4244: '=': conversion from 'Py_ssize_t' to 'long', possible loss of data
python_saxon/saxonc.cpp(92312): warning C4551: function call missing argument list
warning: no library file corresponding to '..\libs\win\saxon-hec-12.4.1' found (skipping)
creating C:\Program Files\Saxonica\libsaxon-HEC-windows-amd64-v12.4.1\pypi\build\lib.win-amd64-cpython-312
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Users\marti\AppData\Local\Programs\Python\Python312\libs /LIBPATH:C:\Users\marti\AppData\Local\Programs\Python\Python312 /LIBPATH:C:\Users\marti\AppData\Local\Programs\Python\Python312\PCbuild\amd64 "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64" /EXPORT:PyInit_saxonche build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/CythonExceptionHandler.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/DocumentBuilder.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/SaxonApiException.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/SaxonCGlue.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/SaxonCXPath.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/SaxonProcessor.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/SchemaValidator.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/XPathProcessor.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/XQueryProcessor.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/XdmArray.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/XdmAtomicValue.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/XdmFunctionItem.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/XdmItem.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/XdmMap.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/XdmNode.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/XdmValue.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/Xslt30Processor.obj build\temp.win-amd64-cpython-312\Release\../Saxon.C.API/XsltExecutable.obj build\temp.win-amd64-cpython-312\Release\python_saxon/saxonc.obj /OUT:build\lib.win-amd64-cpython-312\saxonche.cp312-win_amd64.pyd /IMPLIB:build\temp.win-amd64-cpython-312\Release\../Saxon.C.API\saxonche.cp312-win_amd64.lib libs\win\libsaxon-hec-12.4.1.lib
LINK : fatal error LNK1181: cannot open input file 'libs\win\libsaxon-hec-12.4.1.lib'
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x64\\link.exe' failed with exit code 1181

Please register to edit this issue

Also available in: Atom PDF