You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucy.apache.org by Nick Wellnhofer <we...@aevum.de> on 2013/05/05 01:13:43 UTC

[lucy-dev] Stand-alone C library ready for testing

Hello lucy_dev,

The stand-alone C library is ready for testing by a wider audience. On UNIX-like systems, simply run:

    $ git clone https://git-wip-us.apache.org/repos/asf/lucy.git
    $ cd lucy/c
    $ ./configure
    $ make -j5 test

Please use the -j option to help testing parallel builds. It's a lot faster, too. On my MacBook, a complete build takes about 19 seconds. If you run into problems, try without -j.

For Windows systems, you can find build instructions in c/INSTALL.

Other features of the build system
----------------------------------

Clean the build:

    $ make clean

Clean all files including those generated by configure:

    $ make distclean

Use a different C compiler:

    $ CC=other-cc ./configure

Pass additional compiler flags:

    $ ./configure -- -flag1 -flag2

Generate code coverage report (requires lcov):

    $ ./configure --enable-coverage
    $ make -j5 coverage
    $ open coverage/index.html

OSes and compilers tested by me so far
--------------------------------------

OS X 10.8, clang
Ubuntu 12.10, gcc
Debian sid, gcc
Windows 7, MSVC 6, nmake
Windows 7, MSVC 10, nmake
Windows 7, MinGW, gcc, nmake
Windows 7, MinGW, gcc, mingw32-make
Windows 7, Cygwin, gcc

Still TODO
----------

- Library versioning
- Installation
- Man pages

Nick


Re: [lucy-dev] Stand-alone C library ready for testing

Posted by "Andrew S. Townley" <as...@atownley.org>.
Very cool!  Great work!!

On 5 May 2013, at 1:13 AM, Nick Wellnhofer wrote:

> Hello lucy_dev,
> 
> The stand-alone C library is ready for testing by a wider audience. On UNIX-like systems, simply run:
> 
>    $ git clone https://git-wip-us.apache.org/repos/asf/lucy.git
>    $ cd lucy/c
>    $ ./configure
>    $ make -j5 test
> 
> Please use the -j option to help testing parallel builds. It's a lot faster, too. On my MacBook, a complete build takes about 19 seconds. If you run into problems, try without -j.
> 
> For Windows systems, you can find build instructions in c/INSTALL.
> 
> Other features of the build system
> ----------------------------------
> 
> Clean the build:
> 
>    $ make clean
> 
> Clean all files including those generated by configure:
> 
>    $ make distclean
> 
> Use a different C compiler:
> 
>    $ CC=other-cc ./configure
> 
> Pass additional compiler flags:
> 
>    $ ./configure -- -flag1 -flag2
> 
> Generate code coverage report (requires lcov):
> 
>    $ ./configure --enable-coverage
>    $ make -j5 coverage
>    $ open coverage/index.html
> 
> OSes and compilers tested by me so far
> --------------------------------------
> 
> OS X 10.8, clang
> Ubuntu 12.10, gcc
> Debian sid, gcc
> Windows 7, MSVC 6, nmake
> Windows 7, MSVC 10, nmake
> Windows 7, MinGW, gcc, nmake
> Windows 7, MinGW, gcc, mingw32-make
> Windows 7, Cygwin, gcc
> 
> Still TODO
> ----------
> 
> - Library versioning
> - Installation
> - Man pages
> 
> Nick
> 

--
Andrew S. Townley <as...@atownley.org>
http://atownley.org




Re: [lucy-dev] Stand-alone C library ready for testing

Posted by Marvin Humphrey <ma...@rectangular.com>.
On Mon, May 6, 2013 at 3:24 PM, Nick Wellnhofer <we...@aevum.de> wrote:
> On May 6, 2013, at 23:18 , Marvin Humphrey <ma...@rectangular.com> wrote:
>
>> On an ancient CentOS 5.0 system with PCRE 6.6 installed, I got a build
>> failure because PCRE didn't define all the symbols we needed.
>
> My latest commit should fix this.

Yep!  CentOS5.0/PCRE6.6/GCC works now.

Maybe we should try setting up an ASF buildbot for FreeBSD?

> And to everyone interested in testing the C library: I forgot to mention
> that it would be helpful if you could test the PCRE support. You need the
> PCRE headers and library in a standard location for this to work. I think I
> should add some diagnostics to configure to tell whether PCRE was found or
> not.

Dunno whether the ASF FreeBSD build box has PCRE, I doubt it.

Marvin Humphrey

Re: [lucy-dev] Stand-alone C library ready for testing

Posted by Nick Wellnhofer <we...@aevum.de>.
On May 6, 2013, at 23:18 , Marvin Humphrey <ma...@rectangular.com> wrote:

> On an ancient CentOS 5.0 system with PCRE 6.6 installed, I got a build failure
> because PCRE didn't define all the symbols we needed.

My latest commit should fix this. I will also add a feature test to Charmonizer that checks whether PCRE was compiled with UTF-8 support.

And to everyone interested in testing the C library: I forgot to mention that it would be helpful if you could test the PCRE support. You need the PCRE headers and library in a standard location for this to work. I think I should add some diagnostics to configure to tell whether PCRE was found or not.

Nick



Re: [lucy-dev] Stand-alone C library ready for testing

Posted by Marvin Humphrey <ma...@rectangular.com>.
On Sat, May 4, 2013 at 4:13 PM, Nick Wellnhofer <we...@aevum.de> wrote:
> The stand-alone C library is ready for testing by a wider audience.

Fantastic, Nick!

> On UNIX-like systems, simply run:
>
>     $ git clone https://git-wip-us.apache.org/repos/asf/lucy.git
>     $ cd lucy/c
>     $ ./configure
>     $ make -j5 test
>
> Please use the -j option to help testing parallel builds. It's a lot faster,
> too. On my MacBook, a complete build takes about 19 seconds. If you run into
> problems, try without -j.

I've got a Fedora 17 instance with PCRE 8.21 running in VirtualBox on my MBP
"retina".  The whole build and test takes a little over six seconds.
Everything succeeds.

On an ancient CentOS 5.0 system with PCRE 6.6 installed, I got a build failure
because PCRE didn't define all the symbols we needed.  After zapping
HAS_PCRE_H in charmony.h, the build completed and tests succeeded, albeit with
all the RegexTokenizer tests skipped.

Marvin Humphrey

Re: [lucy-dev] Stand-alone C library ready for testing

Posted by Peter Karman <pe...@peknet.com>.
Nick Wellnhofer wrote on 5/4/13 6:13 PM:

> OSes and compilers tested by me so far
> --------------------------------------
> 
> OS X 10.8, clang
> Ubuntu 12.10, gcc
> Debian sid, gcc
> Windows 7, MSVC 6, nmake
> Windows 7, MSVC 10, nmake
> Windows 7, MinGW, gcc, nmake
> Windows 7, MinGW, gcc, mingw32-make
> Windows 7, Cygwin, gcc
> 


CentOS 5.9 (x86) ok

71 batches passed. 5219 tests passed.
Result: PASS

[karpet@ira:~/src/lucy/c]$ uname -a
Linux ira.peknet.com 2.6.18-348.4.1.el5 #1 SMP Tue Apr 16 16:02:56 EDT 2013 i686
i686 i386 GNU/Linux

[karpet@ira:~/src/lucy/c]$ gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --disable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)




-- 
Peter Karman  .  http://peknet.com/  .  peter@peknet.com

Re: [lucy-dev] Stand-alone C library ready for testing

Posted by Peter Karman <pe...@peknet.com>.
Peter Karman wrote on 5/5/13 11:01 AM:
> Nick Wellnhofer wrote on 5/4/13 6:13 PM:
>> Hello lucy_dev,
>>
>> The stand-alone C library is ready for testing by a wider audience. On UNIX-like systems, simply run:
>>
>>     $ git clone https://git-wip-us.apache.org/repos/asf/lucy.git
>>     $ cd lucy/c
>>     $ ./configure
>>     $ make -j5 test
>>
> 
> no errors. just a couple warnings:

make distclean && make test

fixed the warnings.


-- 
Peter Karman  .  http://peknet.com/  .  peter@peknet.com

Re: [lucy-dev] Stand-alone C library ready for testing

Posted by Peter Karman <pe...@peknet.com>.
Nick Wellnhofer wrote on 5/4/13 6:13 PM:
> Hello lucy_dev,
> 
> The stand-alone C library is ready for testing by a wider audience. On UNIX-like systems, simply run:
> 
>     $ git clone https://git-wip-us.apache.org/repos/asf/lucy.git
>     $ cd lucy/c
>     $ ./configure
>     $ make -j5 test
> 

no errors. just a couple warnings:

[karpet@pekmac:~/projects/lucy/c]$ clang -v
Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn)
Target: x86_64-apple-darwin10
Thread model: posix

[karpet@pekmac:~/projects/lucy/c]$ uname -a
Darwin pekmac.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT
2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

[...snip...]

../core/Lucy/Test/Analysis/TestPolyAnalyzer.c:45:10: warning: implicit
declaration of function 'RegexTokenizer_is_available' is
      invalid in C99 [-Wimplicit-function-declaration]
    if (!RegexTokenizer_is_available()) {
         ^
../core/Lucy/Test/Analysis/TestRegexTokenizer.c:40:10: warning: implicit
declaration of function 'RegexTokenizer_is_available' is
      invalid in C99 [-Wimplicit-function-declaration]
    if (!RegexTokenizer_is_available()) {
         ^
1 warning generated.

[...snip...]

clang -std=gnu99 -D_GNU_SOURCE -D CFP_LUCY -O2 -fno-strict-aliasing -fno-common
-fvisibility=hidden -I . -I src -I ../core -I autogen/include -I
../modules/analysis/snowstem/source/include -I ../modules/unicode/ucd -I
../modules/unicode/utf8proc   -c -o ../modules/unicode/utf8proc/utf8proc.o
../modules/unicode/utf8proc/utf8proc.c
../core/Lucy/Test/Search/TestQueryParserSyntax.c:383:10: warning: implicit
declaration of function 'RegexTokenizer_is_available' is
      invalid in C99 [-Wimplicit-function-declaration]
    if (!RegexTokenizer_is_available()) {
         ^
1 warning generated.



-- 
Peter Karman  .  http://peknet.com/  .  peter@peknet.com