Mailing List Archive

Building lucene4c from subversion
Hello,

I'm new to lucene4c and especially to SVN. Are there
instructions somewhere how to fetch the latest sources
of lucene4c via SVN?

Thanks in advance!
jrobinson

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Building lucene4c from subversion [ In reply to ]
J Robinson wrote:
> Hello,
>
> I'm new to lucene4c and especially to SVN. Are there
> instructions somewhere how to fetch the latest sources
> of lucene4c via SVN?

After you've got Subversion installed, just check it out via:

$ svn checkout http://svn.apache.org/repos/asf/incubator/lucene4c/trunk
lucene4c

That'll drop the working copy in a directory named "lucene4c".

To build it, you'll need to run the "bootstrap" script to run autoconf
and automake, then ./configure --with-apr=/path/to/apr/install

Note that your APR install will need to be a pretty recent Subversion
version of APR, and needs to be built with --enable-experimental-libtool
because currently we only work with APR's jlibtool, not GNU libtool.

You also want to make sure that configure picks up a recent version of
GCJ, preferably GCJ 4. I accomplish this by installing gcc 4 into a
directory and then adding it to the front of my PATH, but I imagine
there are also arguments you could pass to configure to get it to look
for a certain gcj version.

Good luck, and if you have any other questions please feel free to ask.

-garrett
Re: Building lucene4c from subversion [ In reply to ]
Hello Garrett:

Thanks for the tips. Am working on getting a build
going.

Q: Why is JCG required? I thought this was a C
implementation?

jrobinson

--- Garrett Rooney <rooneg@electricjellyfish.net>
wrote:

> J Robinson wrote:
> > Hello,
> >
> > I'm new to lucene4c and especially to SVN. Are
> there
> > instructions somewhere how to fetch the latest
> sources
> > of lucene4c via SVN?
>
> After you've got Subversion installed, just check it
> out via:
>
> $ svn checkout
>
http://svn.apache.org/repos/asf/incubator/lucene4c/trunk
>
> lucene4c
>
> That'll drop the working copy in a directory named
> "lucene4c".
>
> To build it, you'll need to run the "bootstrap"
> script to run autoconf
> and automake, then ./configure
> --with-apr=/path/to/apr/install
>
> Note that your APR install will need to be a pretty
> recent Subversion
> version of APR, and needs to be built with
> --enable-experimental-libtool
> because currently we only work with APR's jlibtool,
> not GNU libtool.
>
> You also want to make sure that configure picks up a
> recent version of
> GCJ, preferably GCJ 4. I accomplish this by
> installing gcc 4 into a
> directory and then adding it to the front of my
> PATH, but I imagine
> there are also arguments you could pass to configure
> to get it to look
> for a certain gcj version.
>
> Good luck, and if you have any other questions
> please feel free to ask.
>
> -garrett
>




__________________________________
Discover Yahoo!
Get on-the-go sports scores, stock quotes, news and more. Check it out!
http://discover.yahoo.com/mobile.html
Re: Building lucene4c from subversion [ In reply to ]
J Robinson wrote:
> Hello Garrett:
>
> Thanks for the tips. Am working on getting a build
> going.
>
> Q: Why is JCG required? I thought this was a C
> implementation?

While the web page hasn't been updated to indicate this yet, we recently
moved from a full C implementation to a C wrapper on top of a GCJ
compiled version of the Java implementation of Lucene. The C
implementation was showing signs of taking way too long to complete, and
using GCJ has allowed us to progress much faster.

-garrett
Re: Building lucene4c from subversion [ In reply to ]
Hello Garrett:

Thanks again for the tips so far.

I've gotten gcc-4.0 installed (into
/home/jrobinson/local), and apr, apr-utils, and
apr-iconv installed in /home/jrobinson/local (using
--with-apr=/home/jrobinson/local
--enable-experimental-libtool
--prefix=/home/jrobinson/local),
and I've added /home/jrobinson/local/bin to my PATH,
and /home/jrobinson/local/lib to my LD_LIBRARY_PATH.

On one machine, I get complaints that there's no
javac:
...
javac -classpath ./lib/lucene-1.4.3.jar -d src
src/org/apache/lucene4c/QueryParserHack.java
make[1]: javac: Command not found
make[1]: ***
[src/org/apache/lucene4c/QueryParserHack.class] Error
127
make[1]: Leaving directory
`/home/jrobinson/src/lucene4c-svn/lucene4c'
make: *** [build] Error 2


On another, it doesn't seem to set the TAR location
right, and I get warnings about aclocal.m4:

cd lucene4c && /bin/sh bootstrap && /bin/sh configure
--with-apr=/home/jrobinson/local
--prefix=/home/jrobinson/local && make
Remember to add `AC_PROG_LIBTOOL' to `configure.in'.
You should update your `aclocal.m4' by running
aclocal.
Putting files in AC_CONFIG_AUX_DIR, `config'.
configure: creating config.nice
checking for a BSD-compatible install...
/usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler...
yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none
needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o
together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler...
yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for gcj... gcj
checking dependency style of gcj... gcc3
checking for gcjh... gcjh
checking for fastjar... no
checking for mkdir... mkdir
checking for find... find
checking for sed... sed
checking for xargs... xargs
checking for rm... rm
checking for JNI_CreateJavaVM in -lgcj... yes
configure: Apache Portable Runtime (APR) library
configuration
checking for APR... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
make[1]: Entering directory
`/home/jrobinson/src/lucene4c-svn/lucene4c'
xvf ./lib/lucene-1.4.3.jar
make[1]: xvf: Command not found

Both machines are running FC1.

More tips are welcome - specifically,
1) where should I get javac from (I don't typically do
java), and
2) how should I resolve the other machine not setting
the tar location right?

Thanks again!
jrobinson

--- Garrett Rooney <rooneg@electricjellyfish.net>
wrote:

> J Robinson wrote:
> > Hello Garrett:
> >
> > Thanks for the tips. Am working on getting a
> build
> > going.
> >
> > Q: Why is JCG required? I thought this was a C
> > implementation?
>
> While the web page hasn't been updated to indicate
> this yet, we recently
> moved from a full C implementation to a C wrapper on
> top of a GCJ
> compiled version of the Java implementation of
> Lucene. The C
> implementation was showing signs of taking way too
> long to complete, and
> using GCJ has allowed us to progress much faster.
>
> -garrett
>
>





__________________________________
Discover Yahoo!
Stay in touch with email, IM, photo sharing and more. Check it out!
http://discover.yahoo.com/stayintouch.html
Re: Building lucene4c from subversion [ In reply to ]
J Robinson wrote:
> Hello Garrett:
>
> Thanks again for the tips so far.
>
> I've gotten gcc-4.0 installed (into
> /home/jrobinson/local), and apr, apr-utils, and
> apr-iconv installed in /home/jrobinson/local (using
> --with-apr=/home/jrobinson/local
> --enable-experimental-libtool
> --prefix=/home/jrobinson/local),
> and I've added /home/jrobinson/local/bin to my PATH,
> and /home/jrobinson/local/lib to my LD_LIBRARY_PATH.
>
> On one machine, I get complaints that there's no
> javac:
> ...
> javac -classpath ./lib/lucene-1.4.3.jar -d src
> src/org/apache/lucene4c/QueryParserHack.java
> make[1]: javac: Command not found
> make[1]: ***
> [src/org/apache/lucene4c/QueryParserHack.class] Error
> 127
> make[1]: Leaving directory
> `/home/jrobinson/src/lucene4c-svn/lucene4c'
> make: *** [build] Error 2

Well, you either need to get some version of javac installed so that we
can build QueryParserHack.class in order to generate it's C++ side
header file with gcjh (yeah, it's a little convoluted), or change the
Makefile.am to do that compilation task with gcj (it's possible to have
gcj compile code to class files, we just haven't gotten around to doing
it yet).

> On another, it doesn't seem to set the TAR location
> right, and I get warnings about aclocal.m4:

The aclocal.m4 warnings are probably safe to ignore, it's not failing to
find TAR though, it's JAR, it looks for the fastjar binary that GCJ
installs. If you have another version of jar available it's possible to
use that as well.

-garrett
Re: Building lucene4c from subversion [ In reply to ]
Garrett Rooney wrote:

> J Robinson wrote:
>
>> Hello Garrett:
>>
>> Thanks again for the tips so far.
>> I've gotten gcc-4.0 installed (into
>> /home/jrobinson/local), and apr, apr-utils, and
>> apr-iconv installed in /home/jrobinson/local (using
>> --with-apr=/home/jrobinson/local
>> --enable-experimental-libtool
>> --prefix=/home/jrobinson/local), and I've added
>> /home/jrobinson/local/bin to my PATH,
>> and /home/jrobinson/local/lib to my LD_LIBRARY_PATH.
>>
>> On one machine, I get complaints that there's no
>> javac:
>> ...
>> javac -classpath ./lib/lucene-1.4.3.jar -d src
>> src/org/apache/lucene4c/QueryParserHack.java
>> make[1]: javac: Command not found
>> make[1]: ***
>> [src/org/apache/lucene4c/QueryParserHack.class] Error
>> 127
>> make[1]: Leaving directory
>> `/home/jrobinson/src/lucene4c-svn/lucene4c'
>> make: *** [build] Error 2
>
>
> Well, you either need to get some version of javac installed so that
> we can build QueryParserHack.class in order to generate it's C++ side
> header file with gcjh (yeah, it's a little convoluted), or change the
> Makefile.am to do that compilation task with gcj (it's possible to
> have gcj compile code to class files, we just haven't gotten around to
> doing it yet).
>
>> On another, it doesn't seem to set the TAR location
>> right, and I get warnings about aclocal.m4:
>
>
> The aclocal.m4 warnings are probably safe to ignore, it's not failing
> to find TAR though, it's JAR, it looks for the fastjar binary that GCJ
> installs. If you have another version of jar available it's possible
> to use that as well.

Ya, we should change those to Fatal errors in the configure script.....
Re: Building lucene4c from subversion [ In reply to ]
Paul Querna wrote:

> Garrett Rooney wrote:
>
>> J Robinson wrote:
>>
>>> Hello Garrett:
>>>
>>> Thanks again for the tips so far.
>>> I've gotten gcc-4.0 installed (into
>>> /home/jrobinson/local), and apr, apr-utils, and
>>> apr-iconv installed in /home/jrobinson/local (using
>>> --with-apr=/home/jrobinson/local
>>> --enable-experimental-libtool
>>> --prefix=/home/jrobinson/local), and I've added
>>> /home/jrobinson/local/bin to my PATH,
>>> and /home/jrobinson/local/lib to my LD_LIBRARY_PATH.
>>>
>>> On one machine, I get complaints that there's no
>>> javac:
>>> ...
>>> javac -classpath ./lib/lucene-1.4.3.jar -d src
>>> src/org/apache/lucene4c/QueryParserHack.java
>>> make[1]: javac: Command not found
>>> make[1]: ***
>>> [src/org/apache/lucene4c/QueryParserHack.class] Error
>>> 127
>>> make[1]: Leaving directory
>>> `/home/jrobinson/src/lucene4c-svn/lucene4c'
>>> make: *** [build] Error 2
>>
>>
>>
>> Well, you either need to get some version of javac installed so that
>> we can build QueryParserHack.class in order to generate it's C++ side
>> header file with gcjh (yeah, it's a little convoluted), or change the
>> Makefile.am to do that compilation task with gcj (it's possible to
>> have gcj compile code to class files, we just haven't gotten around
>> to doing it yet).
>>
>>> On another, it doesn't seem to set the TAR location
>>> right, and I get warnings about aclocal.m4:
>>
>>
>>
>> The aclocal.m4 warnings are probably safe to ignore, it's not failing
>> to find TAR though, it's JAR, it looks for the fastjar binary that
>> GCJ installs. If you have another version of jar available it's
>> possible to use that as well.
>
>
> Ya, we should change those to Fatal errors in the configure script.....

Attached, since 'svn commit' didnt work :)

-Paul
Re: Building lucene4c from subversion [ In reply to ]
> Attached, since 'svn commit' didnt work :)

It looks like Doug just added you to the appropriate authorization file
in svn, so you should be able to commit that yourself now ;-)

-garrett