On Wed, 29 Mar 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);

Ooop, that should be Py_SIZE. Fixed now.

Andi..

 304      va_list list, check;
 305

The other stuff related to size i find is using the PyBytes_Size(arg)?

Again, many thanks :)

Best Regards
/Petrus




On Wed, Mar 29, 2017 at 10:52 PM, Petrus Hyvönen <petrus.hyvo...@gmail.com>
wrote:

Hi,

Yes, there are windows users :)

I've ran a quick test, it builds fine on python 2.7 but I'm getting some
linker error under python 3.6 and 3.5 (didn't try lower).

The linker error states:

jcc3/sources/jcc.cpp(202): error C3688: invalid literal suffix 'PRIxMAX';
literal operator or literal operator template
'operator ""PRIxMAX' not found
jcc3/sources/jcc.cpp(202): error C2664: 'int sprintf(char *const ,const
char *const ,...)': cannot convert argument 2 fr
om 'int' to 'const char *const '
jcc3/sources/jcc.cpp(202): note: Conversion from integral type to pointer
type requires reinterpret_cast, C-style cast o
r function-style cast
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio
14.0\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2

the jcc.cpp code is:
static PyObject *t_jccenv_strhash(PyObject *self, PyObject *arg)
{
    static const size_t hexdig = sizeof(uintmax_t) * 2;
    uintmax_t hash = (uintmax_t) PyObject_Hash(arg);
    char buffer[hexdig + 1];

    sprintf(buffer, "%0*"PRIxMAX, (int) hexdig, hash);
    return PyUnicode_FromStringAndSize(buffer, hexdig);
}

I don't understand the PRIxMAX stuff there, what does it mean?

MANY thanks for working with the Python 3 port...

Regards
/Petrus


On Wed, Mar 29, 2017 at 10:43 PM, Andi Vajda <va...@apache.org> wrote:


On Mar 29, 2017, at 13:36, Ruediger Meier <sweet_...@gmx.de> wrote:

On Wednesday 29 March 2017, Andi Vajda wrote:

Regarding that release candidate. There are still one or two minor
issues on Linux

I'm aware of the fsct that the -lpython... link line for shared mode
on linux needs editing depending on the versions of python used. Are
there other issues on linux ?

No other issues. I've fixed -lpython for myself like this
https://github.com/rudimeier/jcc/commit/b4a7987ebeeb96d6c71b
7635160f798303715877

but you probably want do avoid the .so version earlier like you did for
OSX. You may fix it blindly as you prefer and I could test it.

and Windows I think. I will test again and report soon.

I have no access to windows anymore. We (Apache committers) used to
get a MSDN free subscription but that program was apparently
discontinued. If you have access to windows, thank you for trying out
PyLucene and JCC there !

I could somehow organize a windows for testing, though it would be
painful for me. ;) I would do it shortly before final release if nobody
else does it.

Don't bother. If there are no windows users willing to test this then we
don't need to support windows anymore.

So far I believe that the patch here in my last comment would do it
https://github.com/rudimeier/jcc/issues/1
(It was also part of tommykoch's port)

Ok, I'll take another look...

Andi..


cu,
Rudi




--
_____________________________________________
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00 <073-803%2019%2000>




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

Reply via email to