Fatal error: unknown C primitive `re_replacement_text' (fwd)

88 views
Skip to first unread message

Martin

unread,
Feb 5, 2007, 6:27:01 PM2/5/07
to micmatch
This is a repost of a bug report:

Date: Mon, 05 Feb 2007 11:55:34 +0100
From: "[ISO-8859-15] Francisco Jos? Valverde Albacete" <...>
To: Martin Jambon <...>
Subject: Re: [Caml-list] Views in OCaml

Hi

I've finally decided to give micmatch a try (I was wary because of
the
use of camlp4) but I was cutoff both in the GODI installation and
when
trying to compile the tar bundle (both PCRE and Str versions) by:

horus:/usr/local/src/micmatch root# make str
cd micmatch_str && make
make RESULT=pa_micmatch_str pabc bcl
making ._d/syntax_str.d from syntax_str.ml
Fatal error: unknown C primitive `re_replacement_text'
Preprocessing error
make[3]: *** [._d/syntax_str.d] Error 2
make[3]: *** Deleting file `._d/syntax_str.d'
make[2]: *** [pack-byte-code] Error 2
make[1]: *** [pa_lib] Error 2
make: *** [str] Error 2

(with simply make to build the PCRE variant the error looks the same,
also in GODI)

My GODI installation is quite straightforward, and the test
configuration went OK. Is anything the matter with the PCRE versions
or
is the camlp4 code doing anything funny?

Thanks for the SW and your time

Fran Valverde
Univ. Carlos III de Madrid

===============================================================================

Date: Mon, 5 Feb 2007 12:12:20 -0800 (PST)
From: Martin Jambon <...>
To: "[ISO-8859-15] Francisco Jos? Valverde Albacete" <...>
Subject: Re: [Caml-list] Views in OCaml

On Mon, 5 Feb 2007, [ISO-8859-15] Francisco Jos? Valverde Albacete
wrote:

> Hi
>
> I've finally decided to give micmatch a try (I was wary because of the
> use of camlp4)

I understand your hesitation. Well, micmatch is still alive and
maintained
after two and a half years of existence.

> but I was cutoff both in the GODI installation and when
> trying to compile the tar bundle (both PCRE and Str versions) by:
>
> horus:/usr/local/src/micmatch root# make str
> cd micmatch_str && make
> make RESULT=pa_micmatch_str pabc bcl
> making ._d/syntax_str.d from syntax_str.ml
> Fatal error: unknown C primitive `re_replacement_text'
> Preprocessing error
> make[3]: *** [._d/syntax_str.d] Error 2
> make[3]: *** Deleting file `._d/syntax_str.d'
> make[2]: *** [pack-byte-code] Error 2
> make[1]: *** [pa_lib] Error 2
> make: *** [str] Error 2
>
> (with simply make to build the PCRE variant the error looks the same,
> also in GODI)
>
> My GODI installation is quite straightforward, and the test
> configuration went OK. Is anything the matter with the PCRE versions or
> is the camlp4 code doing anything funny?

Which OS are you using?

Someone already signalled a problem with a recent version of NetBSD in
late December, and I did not solve it.
I really should have a public mailing-list for these things.

The problem is in the command that preprocesses camlp4 files, in
order to maintain compatibility with different version of camlp4.
It's not pretty stuff.

(plus I just found out that "make str" fails if "make" (pcre) is not
performed before so let's work on micmatch_pcre, the problem should be
the same).

Here is what you can do:
1) from the root of the micmatch archive, do "make" to compile the
PCRE
version

2) It should fail with:
> making ._d/syntax_pcre.d from syntax_pcre.ml
> Fatal error: unknown C primitive `re_replacement_text'

or maybe another file than this one.
Go to the micmatch_pcre/ subdirectory and run this:

ocamlrun ./version_filter \
-pp "camlp4o pa_extend.cmo q_MLast.cmo -loc loc -impl" \
syntax_pcre.ml > /dev/null

It should give the same error message. re_replacement_text is a C
function
from the Str library which is used by this version_filter program.
There
is a reason for this weird command, and it's not clear to me why it
fails.
It is related to a problem in loading str.cma, but I don't know
much more.

Here is what I should do in order:
1) Create mailing-lists for micmatch and other projects of mine
2) Fix the bugs:
* the bug you are signalling (by somehow removing the direct call
to
ocamlrun)
* the one I just found out about micmatch_str
3) Make a bugfix release


So thank you for your interest in micmatch. I don't promise anything,
but
I will let you know when I have a solution for you.


Martin

===============================================================================

Date: Mon, 05 Feb 2007 23:32:51 +0100
From: "[ISO-8859-15] Francisco Jos? Valverde Albacete" <...>
To: Martin Jambon <...>
Subject: Re: [Caml-list] Views in OCaml

Martin Jambon wrote:
> I understand your hesitation. Well, micmatch is still alive and maintained
> after two and a half years of existence.
>
Well I am more impressed that you seem to have actually put Regexp
processing *inside* OCaml by using camlp4 which is no ordinary feat!
> Which OS are you using?
Actually it's Max OSX, which is NetBSD with makeup.
> Someone already signalled a problem with a recent version of NetBSD in
> late December, and I did not solve it.
> I really should have a public mailing-list for these things.
>
....Deleted stuff.....
> Here is what I should do in order:
> 1) Create mailing-lists for micmatch and other projects of mine
> 2) Fix the bugs:
> * the bug you are signalling (by somehow removing the direct call to
> ocamlrun)
> * the one I just found out about micmatch_str
> 3) Make a bugfix release
>
Well you seem to have things in your hands...
> So thank you for your interest in micmatch. I don't promise anything, but
> I will let you know when I have a solution for you.
>
I get it. Thanks. I will eagerly wait for news of the new versions of
micmatch, but I won't hold my breath. ;)

BTW, I mainly do text processing... I was going to use micmatch to
process some corpora for some experiments of mine.

Regards,

Fran Valverde - DTSC
Univ. Carlos III de Madrid

Reply all
Reply to author
Forward
0 new messages