List Info

Thread: Re: pylucene trunk and gcc-4.2 : java configuration ?




Re: pylucene trunk and gcc-4.2 : java configuration ?
country flaguser name
France
2007-04-02 10:59:42
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

My compilation is ok now, with Makefile modification :

PREFIX=/usr/local
PREFIX_PYTHON=/usr
LIBDIR_NAME=lib
GCJ_HOME=/usr/local/gcc-4.2
GCJ_LIBDIR=$(GCJ_HOME)/$(LIBDIR_NAME)
GCJ_STATIC=1
LIB_INSTALL=libgcj.so.8 libstdc++.so.6 libgcc_s.so.1
WCCFLAGS=-Wno-write-strings
#DB=$(PYLUCENE)/db-$(DB_VER)
PREFIX_DB=$(PREFIX)/BerkeleyDB.$(DB_LIB_VER)
ANT=ant
PYTHON=$(PREFIX_PYTHON)/bin/python

(I comment the DB line.)
and test are ok !

I will test a little wrapper for JvAttachCurrentThread.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFGEShu4dg3EDuiPUcRArsqAJoCC3TIVHKOqWCk71K7r+dn105uDwCd
F1ae
zwggxi059b7ItCb2iOhLWz8=
=+kYN
-----END PGP SIGNATURE-----
_______________________________________________
pylucene-dev mailing list
pylucene-devosafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylu
cene-dev

patch JvAttachCurrentThread
country flaguser name
France
2007-04-02 13:19:47
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

Patch pour _PyLucene avec method JvAttachCurrentThread2 :
http://www.1et0.org/admin/db/pylucene/trypatch/patch.txt


  This patch correct a thread problem,
but not the problem with mod_pyhon.

  Sample with thread problem correction with shell

This version bug :
python manage.py shell < testthread.py
This version is ok with a PyLucene.JvAttachCurrentThread2()
python manage.py shell < testthread3.py

  scripts are here :
http://www.1et0.org/admin/db/pylucene/trypatch/testt
hread.py
http://www.1et0.org/admin/db/pylucene/trypatch/test
thread3.py

  But when I use PyLucene.JvAttachCurrentThread2()
in mod_python, it's change nothing.

Another idea ?

Xav (xav1et0.org)


============================================================
=========
diff -aburN original/_PyLucene.cpp modified/_PyLucene.cpp
- --- original/_PyLucene.cpp      2007-04-02
19:31:25.000000000 +0200
+++ modified/_PyLucene.cpp      2007-04-02
19:31:41.000000000 +0200
 -221,8
+221,18 
     return PyInt_FromLong(pythonRefs->size());
 }

+
+
+
+static PyObject *JvAttachCurrentThread1(void){
+  JvCreateJavaVM(NULL);
+  JvAttachCurrentThread(NULL, NULL);
+  return Py_None;
+}
+
 static PyMethodDef pylucene_funcs[] = {
     { "dumpRefs", (PyCFunction) dumpRefs, 0,
"" },
+  {"JvAttachCurrentThread2",(PyCFunction)
JvAttachCurrentThread1,
METH_NOARGS, "wrapper attach current thread"},
     { NULL, NULL, 0, NULL }
 };

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


iD8DBQFGEUlD4dg3EDuiPUcRAtMYAKCFc59M2Y7xCJMx53KU5RNgEeTifgCf
Sxt/
qPb/4ERPyj6azOzqi9zTueg=
=Djti
-----END PGP SIGNATURE-----
_______________________________________________
pylucene-dev mailing list
pylucene-devosafoundation.org
http://lists.osafoundation.org/mailman/listinfo/pylu
cene-dev

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )