caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* pcre build problems on Mac OS X
@ 2006-08-16 15:04 Christoph
  2006-08-16 20:48 ` [Caml-list] " Erik de Castro Lopo
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph @ 2006-08-16 15:04 UTC (permalink / raw)
  To: caml-list

Trying to 'make' or 'gmake' pcre on ocaml 3.09.2, I get the following  
traceback:

gmake[1]: Entering directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
gmake[2]: Entering directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
ocamldep pcre.mli > ._bcdi/pcre.di
ocamldep pcre.ml > ._d/pcre.d
gmake[2]: Leaving directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
gmake[2]: Entering directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
ocamlc -c -cc "cc" -ccopt "-fPIC -O2 \
                         -DPIC   \
                             -o pcre_stubs.o " pcre_stubs.c
pcre_stubs.c:40:18: error: pcre.h: No such file or directory
pcre_stubs.c:73: error: parse error before '*' token
pcre_stubs.c: In function 'pcre_callout_handler':
pcre_stubs.c:75: error: 'cb' undeclared (first use in this function)
pcre_stubs.c:75: error: (Each undeclared identifier is reported only  
once
pcre_stubs.c:75: error: for each function it appears in.)
pcre_stubs.c:116: error: 'PCRE_ERROR_CALLOUT' undeclared (first use  
in this function)
pcre_stubs.c: In function 'pcre_ocaml_init':
pcre_stubs.c:143: error: 'pcre_callout' undeclared (first use in this  
function)
pcre_stubs.c: In function 'pcre_dealloc_tables':
pcre_stubs.c:150: error: 'pcre_free' undeclared (first use in this  
function)
pcre_stubs.c: In function 'pcre_dealloc_regexp':
pcre_stubs.c:156: error: 'pcre_free' undeclared (first use in this  
function)
pcre_stubs.c: In function 'pcre_compile_stub':
pcre_stubs.c:196: error: 'pcre' undeclared (first use in this function)
pcre_stubs.c:196: error: 'regexp' undeclared (first use in this  
function)
pcre_stubs.c: In function 'pcre_study_stub':
pcre_stubs.c:231: error: 'pcre_extra' undeclared (first use in this  
function)
pcre_stubs.c:231: error: 'extra' undeclared (first use in this function)
pcre_stubs.c:231: error: 'pcre' undeclared (first use in this function)
pcre_stubs.c:231: error: parse error before ')' token
pcre_stubs.c: In function 'pcre_set_imp_match_limit_stub':
pcre_stubs.c:241: error: 'pcre_extra' undeclared (first use in this  
function)
pcre_stubs.c:241: error: 'extra' undeclared (first use in this function)
pcre_stubs.c:241: error: parse error before ')' token
pcre_stubs.c:244: error: 'PCRE_EXTRA_MATCH_LIMIT' undeclared (first  
use in this function)
pcre_stubs.c: In function 'pcre_get_match_limit_stub':
pcre_stubs.c:257: error: 'pcre_extra' undeclared (first use in this  
function)
pcre_stubs.c:257: error: 'extra' undeclared (first use in this function)
pcre_stubs.c:257: error: parse error before ')' token
pcre_stubs.c:259: error: 'PCRE_EXTRA_MATCH_LIMIT' undeclared (first  
use in this function)
pcre_stubs.c: In function 'pcre_fullinfo_stub':
pcre_stubs.c:271: error: 'pcre' undeclared (first use in this function)
pcre_stubs.c:271: error: parse error before ')' token
pcre_stubs.c:271: error: 'pcre_extra' undeclared (first use in this  
function)
pcre_stubs.c:271: error: parse error before ')' token
pcre_stubs.c: In function 'pcre_options_stub':
pcre_stubs.c:288: error: 'PCRE_INFO_OPTIONS' undeclared (first use in  
this function)
pcre_stubs.c: In function 'pcre_size_stub':
pcre_stubs.c:289: error: 'PCRE_INFO_SIZE' undeclared (first use in  
this function)
pcre_stubs.c: In function 'pcre_studysize_stub':
pcre_stubs.c:290: error: 'PCRE_INFO_STUDYSIZE' undeclared (first use  
in this function)
pcre_stubs.c: In function 'pcre_capturecount_stub':
pcre_stubs.c:291: error: 'PCRE_INFO_CAPTURECOUNT' undeclared (first  
use in this function)
pcre_stubs.c: In function 'pcre_backrefmax_stub':
pcre_stubs.c:292: error: 'PCRE_INFO_BACKREFMAX' undeclared (first use  
in this function)
pcre_stubs.c: In function 'pcre_namecount_stub':
pcre_stubs.c:293: error: 'PCRE_INFO_NAMECOUNT' undeclared (first use  
in this function)
pcre_stubs.c: In function 'pcre_nameentrysize_stub':
pcre_stubs.c:294: error: 'PCRE_INFO_NAMEENTRYSIZE' undeclared (first  
use in this function)
pcre_stubs.c: In function 'pcre_firstbyte_stub':
pcre_stubs.c:299: error: 'PCRE_INFO_FIRSTBYTE' undeclared (first use  
in this function)
pcre_stubs.c: In function 'pcre_firsttable_stub':
pcre_stubs.c:327: error: 'PCRE_INFO_FIRSTTABLE' undeclared (first use  
in this function)
pcre_stubs.c: In function 'pcre_lastliteral_stub':
pcre_stubs.c:359: error: 'PCRE_INFO_LASTLITERAL' undeclared (first  
use in this function)
pcre_stubs.c: In function 'pcre_study_stat_stub':
pcre_stubs.c:381: error: 'pcre_extra' undeclared (first use in this  
function)
pcre_stubs.c:381: error: parse error before ')' token
pcre_stubs.c: In function 'pcre_exec_stub':
pcre_stubs.c:399: error: syntax error before '*' token
pcre_stubs.c:400: error: syntax error before '*' token
pcre_stubs.c:413: error: 'code' undeclared (first use in this function)
pcre_stubs.c:413: error: 'extra' undeclared (first use in this function)
pcre_stubs.c:417: error: 'PCRE_ERROR_NOMATCH' undeclared (first use  
in this function)
pcre_stubs.c:418: error: 'PCRE_ERROR_PARTIAL' undeclared (first use  
in this function)
pcre_stubs.c:419: error: 'PCRE_ERROR_MATCHLIMIT' undeclared (first  
use in this function)
pcre_stubs.c:420: error: 'PCRE_ERROR_BADPARTIAL' undeclared (first  
use in this function)
pcre_stubs.c:421: error: 'PCRE_ERROR_BADUTF8' undeclared (first use  
in this function)
pcre_stubs.c:422: error: 'PCRE_ERROR_BADUTF8_OFFSET' undeclared  
(first use in this function)
pcre_stubs.c:452: error: variable 'new_extra' has initializer but  
incomplete type
pcre_stubs.c:452: error: 'PCRE_EXTRA_CALLOUT_DATA' undeclared (first  
use in this function)
pcre_stubs.c:452: warning: excess elements in struct initializer
pcre_stubs.c:452: warning: (near initialization for 'new_extra')
pcre_stubs.c:452: warning: excess elements in struct initializer
pcre_stubs.c:452: warning: (near initialization for 'new_extra')
pcre_stubs.c:452: warning: excess elements in struct initializer
pcre_stubs.c:452: warning: (near initialization for 'new_extra')
pcre_stubs.c:452: warning: excess elements in struct initializer
pcre_stubs.c:452: warning: (near initialization for 'new_extra')
pcre_stubs.c:452: error: storage size of 'new_extra' isn't known
pcre_stubs.c:494: error: 'PCRE_ERROR_CALLOUT' undeclared (first use  
in this function)
pcre_stubs.c: In function 'pcre_get_stringnumber_stub':
pcre_stubs.c:546: error: 'pcre' undeclared (first use in this function)
pcre_stubs.c:546: error: parse error before ')' token
pcre_stubs.c:548: error: 'PCRE_ERROR_NOSUBSTRING' undeclared (first  
use in this function)
pcre_stubs.c: In function 'pcre_config_utf8_stub':
pcre_stubs.c:564: error: 'PCRE_CONFIG_UTF8' undeclared (first use in  
this function)
pcre_stubs.c: In function 'pcre_config_newline_stub':
pcre_stubs.c:568: error: 'PCRE_CONFIG_NEWLINE' undeclared (first use  
in this function)
pcre_stubs.c: In function 'pcre_config_link_size_stub':
pcre_stubs.c:572: error: 'PCRE_CONFIG_LINK_SIZE' undeclared (first  
use in this function)
pcre_stubs.c: In function 'pcre_config_match_limit_stub':
pcre_stubs.c:576: error: 'PCRE_CONFIG_MATCH_LIMIT' undeclared (first  
use in this function)
pcre_stubs.c: In function 'pcre_config_stackrecurse_stub':
pcre_stubs.c:580: error: 'PCRE_CONFIG_STACKRECURSE' undeclared (first  
use in this function)
gmake[2]: *** [pcre_stubs.o] Error 2
gmake[2]: Leaving directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
gmake[1]: *** [byte-code-library] Error 2
gmake[1]: Leaving directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
gmake: *** [all] Error 2

Looking into the distribution, I see that pcre.h is only in the 'win'  
directory - is that how it's supposed to be?

Thank you in advance for any helpful input....

best regards,
Christoph


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] pcre build problems on Mac OS X
  2006-08-16 15:04 pcre build problems on Mac OS X Christoph
@ 2006-08-16 20:48 ` Erik de Castro Lopo
  2006-08-16 21:15   ` Christoph Pingel
  2006-08-17  2:36   ` skaller
  0 siblings, 2 replies; 4+ messages in thread
From: Erik de Castro Lopo @ 2006-08-16 20:48 UTC (permalink / raw)
  To: caml-list

Hi Christoph,

I must admit that I've never built PCRE from scratch but I might
still be able to help.

Christoph wrote:

> Trying to 'make' or 'gmake' pcre on ocaml 3.09.2, I get the following  
> traceback:
> 
> gmake[1]: Entering directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
> gmake[2]: Entering directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
> ocamldep pcre.mli > ._bcdi/pcre.di
> ocamldep pcre.ml > ._d/pcre.d
> gmake[2]: Leaving directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
> gmake[2]: Entering directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
> ocamlc -c -cc "cc" -ccopt "-fPIC -O2 \
>                          -DPIC   \
>                              -o pcre_stubs.o " pcre_stubs.c
> pcre_stubs.c:40:18: error: pcre.h: No such file or directory

Thats probably because you haven't install PCRE first.

<snip>

> Looking into the distribution, I see that pcre.h is only in the 'win'  
> directory - is that how it's supposed to be?

Probably. Building any Unix software on windows is a royal PITA
so people often include a bunch of special files for building
under windows.

For sane systems like Unix and MaxOSX, building PCRE support for
Ocaml probably requires that the PCRE library is already installed
on the system. You can get that library here:

    http://www.pcre.org/

There may also be instructions with the Ocaml bindings. You should
read the Unix section of those instructions.

Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo
+-----------------------------------------------------------+
"Every time you get a windows programmer asking you to write some
ass-backward workaround, think of it as a crack junkie asking you
to help stuff his pipe because his hands are too shaky."
-- Conrad Parker


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] pcre build problems on Mac OS X
  2006-08-16 20:48 ` [Caml-list] " Erik de Castro Lopo
@ 2006-08-16 21:15   ` Christoph Pingel
  2006-08-17  2:36   ` skaller
  1 sibling, 0 replies; 4+ messages in thread
From: Christoph Pingel @ 2006-08-16 21:15 UTC (permalink / raw)
  To: Erik de Castro Lopo; +Cc: caml-list

Thanks, Erik, I just figured that one out by myself - I embarassingly  
forgot step one from the install instructions. :-)

Works just fine now.

best regards,
Christoph


Am 16.08.2006 um 22:48 Uhr schrieb Erik de Castro Lopo:

> Hi Christoph,
>
> I must admit that I've never built PCRE from scratch but I might
> still be able to help.
>
> Christoph wrote:
>
>> Trying to 'make' or 'gmake' pcre on ocaml 3.09.2, I get the following
>> traceback:
>>
>> gmake[1]: Entering directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
>> gmake[2]: Entering directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
>> ocamldep pcre.mli > ._bcdi/pcre.di
>> ocamldep pcre.ml > ._d/pcre.d
>> gmake[2]: Leaving directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
>> gmake[2]: Entering directory `/usr/local/work/pcre-ocaml-5.11.1/lib'
>> ocamlc -c -cc "cc" -ccopt "-fPIC -O2 \
>>                          -DPIC   \
>>                              -o pcre_stubs.o " pcre_stubs.c
>> pcre_stubs.c:40:18: error: pcre.h: No such file or directory
>
> Thats probably because you haven't install PCRE first.
>
> <snip>
>
>> Looking into the distribution, I see that pcre.h is only in the 'win'
>> directory - is that how it's supposed to be?
>
> Probably. Building any Unix software on windows is a royal PITA
> so people often include a bunch of special files for building
> under windows.
>
> For sane systems like Unix and MaxOSX, building PCRE support for
> Ocaml probably requires that the PCRE library is already installed
> on the system. You can get that library here:
>
>     http://www.pcre.org/
>
> There may also be instructions with the Ocaml bindings. You should
> read the Unix section of those instructions.
>
> Erik
> -- 
> +-----------------------------------------------------------+
>   Erik de Castro Lopo
> +-----------------------------------------------------------+
> "Every time you get a windows programmer asking you to write some
> ass-backward workaround, think of it as a crack junkie asking you
> to help stuff his pipe because his hands are too shaky."
> -- Conrad Parker
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] pcre build problems on Mac OS X
  2006-08-16 20:48 ` [Caml-list] " Erik de Castro Lopo
  2006-08-16 21:15   ` Christoph Pingel
@ 2006-08-17  2:36   ` skaller
  1 sibling, 0 replies; 4+ messages in thread
From: skaller @ 2006-08-17  2:36 UTC (permalink / raw)
  To: Erik de Castro Lopo; +Cc: caml-list

On Thu, 2006-08-17 at 06:48 +1000, Erik de Castro Lopo wrote:

> Probably. Building any Unix software on windows is a royal PITA
> so people often include a bunch of special files for building
> under windows.

Only if you use lame build systems like autotools :)

If you use a better system such as the one used by Felix
or OMake, which are both designed to work on Windows as well 
as Unix, it isn't so bad: probably using Manifests on Win64
is the same difficulty as coping with the plethora of
incompatible Unicies.

The biggest problem is non-portable C code .. Ocaml code tends
to build out of the box everywhere provided you can find
the libraries you need .. congrats to the Inria team on 
managing this well.

BTW: why use PCRE? TRE is a better system IMHO (and is Posix
compliant).

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-08-17  2:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-16 15:04 pcre build problems on Mac OS X Christoph
2006-08-16 20:48 ` [Caml-list] " Erik de Castro Lopo
2006-08-16 21:15   ` Christoph Pingel
2006-08-17  2:36   ` skaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).