Обсуждение: Error when building a dictionnary for tseach

Поиск
Список
Период
Сортировка

Error when building a dictionnary for tseach

От
"Laurent Thevenet"
Дата:
Hi everybody,

I have a problem while trying to make the dictionnary generated by gendict.

I'm using postgresql 8.2.3 on macosx
I get the sources on the postgresql website (not on darwinports or
everywhere else).

First, i went in the contrib/tsearch2/gendict directory and run config.sh :
./config.sh -n fr -s -p french_UTF_8 -i -v -c stem.c -h stem.h
-C'Snowball stemmer for French'
Everything was fine, no errors, ok everywhere

Then went to the ../../dict_fr directory containing the generated
files and run make but get the following error :
Makefile:3: ../../src/Makefile.global: No such file or directory
Makefile:12: /contrib/contrib- global.mk: No such file or directory
make: *** No rule to make target `/contrib/contrib-global.mk'.  Stop.

There is no Makefile.global as indicated but there is
Makefile.global.in so tried to change the path to it but it gave me
more errors (but i'm not a makefile evangelist so don't know if it was
logic to do that).
And contrib-global.mk exists ../../contrib/contrib-global.mk but not
in the absolute path specified so i changed it.
But none of this modifications changed something, i got this error :
 ../../src/Makefile.global.in:318: ../../src/Makefile.port: No such
file or directory
Makefile:12: ../contrib/contrib-global.mk: No such file or directory
make: *** No rule to make target `../contrib/contrib- global.mk'.  Stop.

I googled it and found nothing interesting. So you're my last hope.
For informations, I tried the same with the sources 8.2.1 and 8.2.2.

Thx by advance.
--
Laurent Thevenet
+33 (0)6 74 71 84 44
http://7theories.com

Re: Error when building a dictionnary for tseach

От
Tom Lane
Дата:
"Laurent Thevenet" <laurent.thevenet@7theories.com> writes:
> Then went to the ../../dict_fr directory containing the generated
> files and run make but get the following error :
> Makefile:3: ../../src/Makefile.global: No such file or directory
> Makefile:12: /contrib/contrib- global.mk: No such file or directory
> make: *** No rule to make target `/contrib/contrib-global.mk'.  Stop.

It looks like you didn't do "configure" at the top level of the PG source
tree.  Depending on which files you want to rebuild, you may need not
only "configure" but a full "make" run from the top level before contrib
modules will build.

            regards, tom lane

Re: Error when building a dictionnary for tseach

От
cedric
Дата:
Le mercredi 14 mars 2007 01:32, Laurent Thevenet a écrit :
> Hi everybody,
>
> I have a problem while trying to make the dictionnary generated by gendict.
>
> I'm using postgresql 8.2.3 on macosx
> I get the sources on the postgresql website (not on darwinports or
> everywhere else).
>
> First, i went in the contrib/tsearch2/gendict directory and run config.sh :
> ./config.sh -n fr -s -p french_UTF_8 -i -v -c stem.c -h stem.h
> -C'Snowball stemmer for French'
> Everything was fine, no errors, ok everywhere
>
> Then went to the ../../dict_fr directory containing the generated
> files and run make but get the following error :
After you check configure as suggested and depending where you take stem.c and
stem.h for french_UTF8 you can have more errors. I am about reporting that
(and the way to solve, not a patch).

> Makefile:3: ../../src/Makefile.global: No such file or directory
> Makefile:12: /contrib/contrib- global.mk: No such file or directory
> make: *** No rule to make target `/contrib/contrib-global.mk'.  Stop.
>
> There is no Makefile.global as indicated but there is
> Makefile.global.in so tried to change the path to it but it gave me
> more errors (but i'm not a makefile evangelist so don't know if it was
> logic to do that).
> And contrib-global.mk exists ../../contrib/contrib-global.mk but not
> in the absolute path specified so i changed it.
> But none of this modifications changed something, i got this error :
>  ../../src/Makefile.global.in:318: ../../src/Makefile.port: No such
> file or directory
> Makefile:12: ../contrib/contrib-global.mk: No such file or directory
> make: *** No rule to make target `../contrib/contrib- global.mk'.  Stop.
>
> I googled it and found nothing interesting. So you're my last hope.
> For informations, I tried the same with the sources 8.2.1 and 8.2.2.
>
> Thx by advance.

Re: Error when building a dictionnary for tseach

От
"Laurent Thevenet"
Дата:
Thanks Tom, shame on me.

But there was another issue i had to correct when compiling dict_fr:

Even and perhaps because the snowball patch was applied, stem.c (french UTF_8 stem) was using old signatures of C functions (*_in_grouping_*(...) with 5 arguments instead of 4), so i applied a little regex to correct everything (in vi or with sed :%s/\(in_grouping_b_U(.*,.*,.*,.*\),.*)/\1)/ )

Thanks.

On 3/14/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Laurent Thevenet" <laurent.thevenet@7theories.com> writes:
> Then went to the ../../dict_fr directory containing the generated
> files and run make but get the following error :
> Makefile:3: ../../src/Makefile.global: No such file or directory
> Makefile:12: /contrib/contrib- global.mk: No such file or directory
> make: *** No rule to make target `/contrib/contrib- global.mk'.  Stop.

It looks like you didn't do "configure" at the top level of the PG source
tree.  Depending on which files you want to rebuild, you may need not
only "configure" but a full "make" run from the top level before contrib
modules will build.

                        regards, tom lane



--
Laurent Thevenet
+33 (0)6 74 71 84 44
http://7theories.com

Re: Error when building a dictionnary for tseach

От
"Laurent Thevenet"
Дата:
Hi Cédric,

i had errors when compiling about the C functions signatures *_grouping_* and correct it using a regular expression and now it's compiling but i did not go further so i don't know it will work or not.

If it the same error, where do we have to report it ?


On 3/14/07, cedric <cedric@over-blog.com > wrote:
Le mercredi 14 mars 2007 01:32, Laurent Thevenet a écrit:
> Hi everybody,
>
> I have a problem while trying to make the dictionnary generated by gendict.
>
> I'm using postgresql 8.2.3 on macosx
> I get the sources on the postgresql website (not on darwinports or
> everywhere else).
>
> First, i went in the contrib/tsearch2/gendict directory and run config.sh :
> ./config.sh -n fr -s -p french_UTF_8 -i -v -c stem.c -h stem.h
> -C'Snowball stemmer for French'
> Everything was fine, no errors, ok everywhere
>
> Then went to the ../../dict_fr directory containing the generated
> files and run make but get the following error :
After you check configure as suggested and depending where you take stem.c and
stem.h for french_UTF8 you can have more errors. I am about reporting that
(and the way to solve, not a patch).

> Makefile:3: ../../src/Makefile.global: No such file or directory
> Makefile:12: /contrib/contrib- global.mk: No such file or directory
> make: *** No rule to make target `/contrib/contrib-global.mk'.  Stop.
>
> There is no Makefile.global as indicated but there is
> Makefile.global.in so tried to change the path to it but it gave me
> more errors (but i'm not a makefile evangelist so don't know if it was
> logic to do that).
> And contrib-global.mk exists ../../contrib/contrib-global.mk but not
> in the absolute path specified so i changed it.
> But none of this modifications changed something, i got this error :
>  ../../src/Makefile.global.in:318: ../../src/Makefile.port: No such
> file or directory
> Makefile:12: ../contrib/contrib- global.mk: No such file or directory
> make: *** No rule to make target `../contrib/contrib- global.mk'.  Stop.
>
> I googled it and found nothing interesting. So you're my last hope.
> For informations, I tried the same with the sources 8.2.1 and 8.2.2.
>
> Thx by advance.



--
Laurent Thevenet
+33 (0)6 74 71 84 44
http://7theories.com

Re: Error when building a dictionnary for tseach

От
cedric
Дата:
Le mercredi 14 mars 2007 22:42, Laurent Thevenet a écrit :
> Hi Cédric,
>
> i had errors when compiling about the C functions signatures *_grouping_*
> and correct it using a regular expression and now it's compiling but i did
> not go further so i don't know it will work or not.
>
> If it the same error, where do we have to report it ?
I have already report directly to Tsearch2 devs the new issue with libstemmer,
and provide them an 'old' one wich work nice (also new ispell french utf8
files). I hope they will put those online asap.
Else, as it is a pgsql contrib
http://www.postgresql.org/docs/current/static/bug-reporting.html


Re: Error when building a dictionnary for tseach

От
"Laurent Thevenet"
Дата:
Hi cédric,

do you have a stemmer working fine or french utf8 files ?
Is that right ?
It could be great if you could send them to me because effectively even the ispell files are not suited (i tried everything even from myspell directories converted to ispell)
For information , i tried other languages ispell files, and not a lot are working fine (like greek one, i just tried it)

Thx by advance.

PS : A good article about that but i don't know how this guy made it working ???

http://www.davidgis.fr/blog/index.php?2007/02/01/133-utilisation-de-tsearch2-avec-postgresql-suite

On 3/15/07, cedric <cedric@over-blog.com> wrote:
Le mercredi 14 mars 2007 22:42, Laurent Thevenet a écrit:
> Hi Cédric,
>
> i had errors when compiling about the C functions signatures *_grouping_*
> and correct it using a regular expression and now it's compiling but i did
> not go further so i don't know it will work or not.
>
> If it the same error, where do we have to report it ?
I have already report directly to Tsearch2 devs the new issue with libstemmer,
and provide them an 'old' one wich work nice (also new ispell french utf8
files). I hope they will put those online asap.
Else, as it is a pgsql contrib
http://www.postgresql.org/docs/current/static/bug-reporting.html




--
Laurent Thevenet
+33 (0)6 74 71 84 44
http://7theories.com

Re: Error when building a dictionnary for tseach

От
cedric
Дата:
Le jeudi 15 mars 2007 16:43, Laurent Thevenet a écrit :
> Hi cédric,
>
> do you have a stemmer working fine or french utf8 files ?
> Is that right ?
> It could be great if you could send them to me because effectively even the
> ispell files are not suited (i tried everything even from myspell
> directories converted to ispell)
> For information , i tried other languages ispell files, and not a lot are
> working fine (like greek one, i just tried it)
>
> Thx by advance.
>
> PS : A good article about that but i don't know how this guy made it
> working ???
hey ! 'klando' is my favorite irc nickname ;)
I know how he did .....
>
> http://www.davidgis.fr/blog/index.php?2007/02/01/133-utilisation-de-tsearch
>2-avec-postgresql-suite
>
> On 3/15/07, cedric <cedric@over-blog.com> wrote:
> > Le mercredi 14 mars 2007 22:42, Laurent Thevenet a écrit:
> > > Hi Cédric,
> > >
> > > i had errors when compiling about the C functions signatures
> >
> > *_grouping_*
> >
> > > and correct it using a regular expression and now it's compiling but i
> >
> > did
> >
> > > not go further so i don't know it will work or not.
> > >
> > > If it the same error, where do we have to report it ?
> >
> > I have already report directly to Tsearch2 devs the new issue with
> > libstemmer,
> > and provide them an 'old' one wich work nice (also new ispell french utf8
> > files). I hope they will put those online asap.
> > Else, as it is a pgsql contrib
> > http://www.postgresql.org/docs/current/static/bug-reporting.html