On Wed, 29 Mar 2017, Petrus Hyvönen wrote:

Hi,

With the /DLL, sprintf(buffer, "%0*%jx", (int) hexdig, hash); and Py_SIZE
it compiles under windows (Windows 7, 64 bit)

I haven't set up for building pylucene but has another library that I build.

For that I get a udf-8 error on:

 File
"C:\Users\phy\AppData\Local\Continuum\Anaconda3-430\conda-bld\orekit_1490824040916\_b_env\lib\site-packages\jcc\c
pp.py", line 898, in header
   env.strhash(signature(constructor)))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xac in position 9:
invalid start byte

That means that the "%0*%jx" change for _MSC_VER also needs a change for the hexdig sizeof computation. There is a mismatch and garbage is left in the buffer array.

Andi..


I will do more tests later, and see if I can test with building pylucene.

Regards
/Petrus



On Wed, Mar 29, 2017 at 11:26 PM, Ruediger Meier <sweet_...@gmx.de> wrote:

On Wednesday 29 March 2017, Petrus Hyvönen wrote:
Hi,

Assuming the Prixmax stuff is just some typo, if I remove that I get
same error as in Ruedigers github version - MS linker error LNK1561 -
missing starting point. This seems to be fixed by the  /DLL
directive.

https://msdn.microsoft.com/en-us/library/ky737ya4.aspx

and fix at
https://github.com/rudimeier/jcc/issues/1

Adding this /DLL to the linker options, I now get linker error:
"jcc3/sources/functions.cpp(303): error C3861: 'PY_SIZE': identifier
not found"

The code is:
  301  int __parseArgs(PyObject *args, char *types, ...)
  302  {
  303:     int count = PY_SIZE((PyTupleObject *) args);
  304      va_list list, check;
  305

Probably just a typo, try "Py_SIZE" (case sensitive "y").

cu,
Rudi




--
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00

Reply via email to