I'm really sorry to say that i am still having
compilation issues.
I have tried compiling PyLucene w/ both gcc 4.2.0 and
3.4.6. I am using sun jdk 1.5 as well. I continue to
receive this error (below) after a PyLucene "make all"
and then "make test" (I never issue make install
because of the failed make test). The vast majority
of the tests do work however (maybe all except this
one?)
Any ideas what the problem is? Relevant info follows:
THE "make test" ERROR:
======================================================================
FAIL: testBinary (__main__.BinaryTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_Binary.py", line 40, in testBinary
self.binary([66, 90, 104, 57, 49, 65, 89, 38,
File "test/test_Binary.py", line 36, in binary
assert c == v and b == [ord(a) for a in v]
AssertionError
--------------
Ubuntu version:
UBUNTU 6.06 server release.
--------------
--------------
I receive many of these warnings during cpp
compilation, not sure if this is relevant.
/usr/include/python2.4/pyconfig.h:835:1: warning:
"_POSIX_C_SOURCE" redefined
In file included from /usr/include/string.h:26,
from
/usr/local/gcc-3.4.6/include/gcj/cni.h:21,
from cpp/PyLucene.h:27,
from cpp/PythonSearch.cpp:24:
--------------
---------------
GCC VERSIONS:
[EMAIL PROTECTED]:/home/jkleven/pylucene_svn_3_8_07#
/usr/local/gcc-4.2.0/bin/gcj --version
gcj (GCC) 4.2.0 20070307 (prerelease)
[EMAIL PROTECTED]:/home/jkleven/pylucene_svn_3_8_07#
/usr/local/gcc-3.4.6/bin/gcj --version
gcj (GCC) 3.4.6
---------------
---------------
"normal" JAVA VERSION
[EMAIL PROTECTED]:/home/jkleven/pylucene_svn_3_8_07# javac
-version
javac 1.5.0_06
---------------
---------------
JAVA update alternatives output - ubuntu specific??
[EMAIL PROTECTED]:/home/jkleven/pylucene_svn_3_8_07#
update-java-alternatives -s java-1.5.0-sun
Using `/usr/lib/jvm/java-1.5.0-sun/bin/appletviewer'
to provide `appletviewer'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/apt' to provide
`apt'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/extcheck' to
provide `extcheck'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/HtmlConverter'
to provide `HtmlConverter'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/idlj' to
provide `idlj'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/jarsigner' to
provide `jarsigner'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/jar' to provide
`jar'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/javac' to
provide `javac'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/javadoc' to
provide `javadoc'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/javah' to
provide `javah'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/javap' to
provide `javap'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/java-rmi.cgi'
to provide `java-rmi.cgi'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/jconsole' to
provide `jconsole'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/jdb' to provide
`jdb'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/jinfo' to
provide `jinfo'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/jmap' to
provide `jmap'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/jps' to provide
`jps'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/jsadebugd' to
provide `jsadebugd'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/jstack' to
provide `jstack'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/jstatd' to
provide `jstatd'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/jstat' to
provide `jstat'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/native2ascii'
to provide `native2ascii'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/rmic' to
provide `rmic'.
Using `/usr/lib/jvm/java-1.5.0-sun/bin/serialver' to
provide `serialver'.
Using
`/usr/lib/jvm/java-1.5.0-sun/jre/bin/ControlPanel' to
provide `ControlPanel'.
Using `/usr/lib/jvm/java-1.5.0-sun/jre/bin/java' to
provide `java'.
Using `/usr/lib/jvm/java-1.5.0-sun/jre/bin/java_vm' to
provide `java_vm'.
Using `/usr/lib/jvm/java-1.5.0-sun/jre/bin/javaws' to
provide `javaws'.
Using `/usr/lib/jvm/java-1.5.0-sun/jre/bin/keytool' to
provide `keytool'.
Using `/usr/lib/jvm/java-1.5.0-sun/jre/bin/pack200' to
provide `pack200'.
Using `/usr/lib/jvm/java-1.5.0-sun/jre/bin/policytool'
to provide `policytool'.
Using `/usr/lib/jvm/java-1.5.0-sun/jre/bin/rmid' to
provide `rmid'.
Using
`/usr/lib/jvm/java-1.5.0-sun/jre/bin/rmiregistry' to
provide `rmiregistry'.
Using `/usr/lib/jvm/java-1.5.0-sun/jre/bin/unpack200'
to provide `unpack200'.
No alternatives for firefox-javaplugin.so.
No alternatives for mozilla-javaplugin.so.
No alternatives for mozilla-snapshot-javaplugin.so.
[EMAIL PROTECTED]:/home/jkleven/pylucene_svn_3_8_07#
---------------
---------------
MAKEFILE settings:
PyLucene Makefile tweaks:
# FOR gcc 3.4.6 attempt
PREFIX=/usr/local
PREFIX_PYTHON=$(PREFIX)
LIBDIR_NAME=lib
GCJ_HOME=/usr/local/gcc-3.4.6
GCJ_LIBDIR=$(GCJ_HOME)/$(LIBDIR_NAME)
GCJ_STATIC=0 # I have also tried static = 1
LIB_INSTALL=libstdc++.so.6 libgcc_s.so.1
ANT=ant
PYTHON=$(PREFIX_PYTHON)/bin/python
# FOR gcc 4.2.0 attempt
PREFIX=/usr/local
PREFIX_PYTHON=$(PREFIX)
LIBDIR_NAME=lib
GCJ_HOME=/usr/local/gcc-4.2.0
GCJ_LIBDIR=$(GCJ_HOME)/$(LIBDIR_NAME)
GCJ_STATIC=0 # I have also tried static = 1
LIB_INSTALL=libgcj.so.8 libstdc++.so.6 libgcc_s.so.1
ANT=ant
PYTHON=$(PREFIX_PYTHON)/bin/python
WCCFLAGS=-Wno-write-strings
I also had to tweak the Makefile here:
PYTHON_INC=/usr/include/python$(PYTHON_VER)
Because it wasn't finding Python.h without this
change.
and i am using python 2.4 in the Makefile as well.
PYTHON_VER=2.4
--------------
I very well could be doing something very stupid but
after multiple attempts, i still cannot see what that
might be. I'm sorry this thread has changed from a
"how to make my own version of the Similarity class"
into how to compile PyLucene.
Thank you very much -
John
--- Andi Vajda <[EMAIL PROTECTED]> wrote:
>
> On Fri, 9 Mar 2007, John Kleven wrote:
>
> > Ok thanks for the compile tips. I'm hoping to be
> able
> > to test the delegation stuff soon, but still stuck
> on
> > compilation on 6.06 Ubuntu w/ gcc-4.2.0.
> >
> > I've gotten the latest PyLucene source from svn
> and
> > i'm getting it compiled (make test fails tho), but
> i'm
> > pretty sure that when it does the Lucene java
> compile,
> > it is either using my 1.5.0 JDK (which is bad
> > apparently) or it is using GCJ (which is even
> worse
> > apparently).
>
> Yes, you must use a sane JDK as well and that can be
> tricky but Ubuntu has
> some nice utilities that make this a breeze. Perhaps
> this message [1] can
> help, it looks very relevant. You should be able to
> use Sun's JDK 1.5...
>
> > Once i get 1.4.2 sun java installed, how do i tell
> Ant
> > or the pylucene makefile (or shell variable?) to
> use
> > the java bin dir that is from 1.4.2 when compiling
> > Lucene?
>
> If you follow the instructions in [1] and use
> 'update-java-alternatives' as
> described, ant should 'do the right thing (tm)'.
>
> > Also, of note, I received a ton of warnings from
> the
> > g++ as it hit some of the .cpp files .... i'm
> assuming
> > that is normal?
>
> Yes, when using gcj 4.2.x, you need to use
> -Wno-write-strings. See the Linux
> 64 section in the PyLucene Makefile for an example.
> As a matter of fact, other
> than changing LIBDIR_NAME, you should be able to use
> that section as is,
> making sure the paths match your system, of course.
>
> Andi..
>
> [1]
>
http://lists.osafoundation.org/pipermail/pylucene-dev/2006-November/001404.html
> _______________________________________________
> pylucene-dev mailing list
> [email protected]
>
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
>
____________________________________________________________________________________
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev