caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] oasis and camlp4
@ 2011-03-28 21:19 Joel Reymont
  2011-03-28 22:16 ` [Caml-list] " Sylvain Le Gall
  2011-03-29  2:44 ` [Caml-list] " Guillaume Yziquel
  0 siblings, 2 replies; 5+ messages in thread
From: Joel Reymont @ 2011-03-28 21:19 UTC (permalink / raw)
  To: caml-list

How do you integrate Oasis with camlp4, for example, to make the following comment at the beginning of a file take effect?

(* pp camlp4o pa_labelscope.cmo pa_openin.cmo *)

	Thanks, Joel

--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------





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

* [Caml-list] Re: oasis and camlp4
  2011-03-28 21:19 [Caml-list] oasis and camlp4 Joel Reymont
@ 2011-03-28 22:16 ` Sylvain Le Gall
  2011-03-29  2:44 ` [Caml-list] " Guillaume Yziquel
  1 sibling, 0 replies; 5+ messages in thread
From: Sylvain Le Gall @ 2011-03-28 22:16 UTC (permalink / raw)
  To: caml-list

Hello,

On 28-03-2011, Joel Reymont <joelr1@gmail.com> wrote:
> How do you integrate Oasis with camlp4, for example, to make the
> following comment at the beginning of a file take effect?
>
> (* pp camlp4o pa_labelscope.cmo pa_openin.cmo *)
>
>

For now, this kind of syntax extension has to be handled directly into
the _tags file of ocamlbuild. There will probably be a native support in
oasis 0.3.0.

The solution for now is, considering that pa_labelscope.cmo and
pa_openin.cmo are provided by the findlib package piqi.camlp4:

[...]
# OASIS_STOP

"myfile.ml": syntax_camlp4o, pkg_piqi.camlp4


Adding this line enables the syntax extension. You should also 
"BuildDepends: piqi", to notify your dependency on the package (but
don't BuildDepends on piqi.syntax, because piqi.syntax is in between a
build tools and build depends).

Cheers,
Sylvain Le Gall
-- 
My company: http://www.ocamlcore.com
Linkedin:   http://fr.linkedin.com/in/sylvainlegall
Start an OCaml project here: http://forge.ocamlcore.org
OCaml blogs:                 http://planet.ocamlcore.org



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

* Re: [Caml-list] oasis and camlp4
  2011-03-28 21:19 [Caml-list] oasis and camlp4 Joel Reymont
  2011-03-28 22:16 ` [Caml-list] " Sylvain Le Gall
@ 2011-03-29  2:44 ` Guillaume Yziquel
  2011-03-29  2:57   ` Guillaume Yziquel
  2011-03-29  7:50   ` [Caml-list] [was: oasis and camlp4] libpcre.so.0 No such file or directory Sylvain Le Gall
  1 sibling, 2 replies; 5+ messages in thread
From: Guillaume Yziquel @ 2011-03-29  2:44 UTC (permalink / raw)
  To: Joel Reymont; +Cc: caml-list

Le Monday 28 Mar 2011 à 22:19:34 (+0100), Joel Reymont a écrit :
> How do you integrate Oasis with camlp4, for example, to make the following comment at the beginning of a file take effect?
> 
> (* pp camlp4o pa_labelscope.cmo pa_openin.cmo *)
> 
> 	Thanks, Joel

Hi.

Clearly, I'm quite a newbie when it comes to oasis. I've mostly been
using customised ocamlbuild stuff for my own purposes, so I'd appreciate
some advice.

Basically, I've been busy this evening implementing the zmq_poll()
functionality into the ZeroMQ binding.

Oasis has been installed with the installer from ocamlcore. Somehow not
the best way, judging by the output below. Is there a quick way out of
that, or should I recompile oasis from the source tarball?

yziquel@seldon:~/git/ocaml-zmq$ /home/yziquel/oasis-0.2.0/bin/oasis 
/home/yziquel/oasis-0.2.0/bin/../libexec/oasis: error while loading
shared libraries: libpcre.so.0: cannot open shared object file: No such
file or directory
yziquel@seldon:~/git/ocaml-zmq$ locate libpcre.so.0
yziquel@seldon:~/git/ocaml-zmq$ locate libpcre.so
/lib/libpcre.so.3
/lib/libpcre.so.3.12.1
/usr/lib32/libpcre.so.3
/usr/lib32/libpcre.so.3.12.1
/usr/lib/libpcre.so
yziquel@seldon:~/git/ocaml-zmq$ 

-- 
     Guillaume Yziquel


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

* Re: [Caml-list] oasis and camlp4
  2011-03-29  2:44 ` [Caml-list] " Guillaume Yziquel
@ 2011-03-29  2:57   ` Guillaume Yziquel
  2011-03-29  7:50   ` [Caml-list] [was: oasis and camlp4] libpcre.so.0 No such file or directory Sylvain Le Gall
  1 sibling, 0 replies; 5+ messages in thread
From: Guillaume Yziquel @ 2011-03-29  2:57 UTC (permalink / raw)
  To: Joel Reymont; +Cc: caml-list

Le Tuesday 29 Mar 2011 à 04:44:11 (+0200), Guillaume Yziquel a écrit :
> Le Monday 28 Mar 2011 à 22:19:34 (+0100), Joel Reymont a écrit :
> > How do you integrate Oasis with camlp4, for example, to make the following comment at the beginning of a file take effect?
> > 
> > (* pp camlp4o pa_labelscope.cmo pa_openin.cmo *)
> > 
> > 	Thanks, Joel

All apologies for mistakenly posting it on the mailing list.

-- 
     Guillaume Yziquel


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

* [Caml-list] [was: oasis and camlp4] libpcre.so.0 No such file or directory
  2011-03-29  2:44 ` [Caml-list] " Guillaume Yziquel
  2011-03-29  2:57   ` Guillaume Yziquel
@ 2011-03-29  7:50   ` Sylvain Le Gall
  1 sibling, 0 replies; 5+ messages in thread
From: Sylvain Le Gall @ 2011-03-29  7:50 UTC (permalink / raw)
  To: caml-list

Hello,

On 29-03-2011, Guillaume Yziquel <guillaume.yziquel@citycable.ch> wrote:
> Le Monday 28 Mar 2011 à 22:19:34 (+0100), Joel Reymont a écrit :
>> How do you integrate Oasis with camlp4, for example, to make the following comment at the beginning of a file take effect?
>> 
>> (* pp camlp4o pa_labelscope.cmo pa_openin.cmo *)
>> 
>> 	Thanks, Joel
>
> Hi.
>
> Clearly, I'm quite a newbie when it comes to oasis. I've mostly been
> using customised ocamlbuild stuff for my own purposes, so I'd appreciate
> some advice.
>
> Basically, I've been busy this evening implementing the zmq_poll()
> functionality into the ZeroMQ binding.
>
> Oasis has been installed with the installer from ocamlcore. Somehow not
> the best way, judging by the output below. Is there a quick way out of
> that, or should I recompile oasis from the source tarball?
>
> yziquel@seldon:~/git/ocaml-zmq$ /home/yziquel/oasis-0.2.0/bin/oasis 
> /home/yziquel/oasis-0.2.0/bin/../libexec/oasis: error while loading
> shared libraries: libpcre.so.0: cannot open shared object file: No such
> file or directory
> yziquel@seldon:~/git/ocaml-zmq$ locate libpcre.so.0
> yziquel@seldon:~/git/ocaml-zmq$ locate libpcre.so
> /lib/libpcre.so.3
> /lib/libpcre.so.3.12.1
> /usr/lib32/libpcre.so.3
> /usr/lib32/libpcre.so.3.12.1
> /usr/lib/libpcre.so
> yziquel@seldon:~/git/ocaml-zmq$ 
>

Indeed, this is a known bug:
https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=784&group_id=54&atid=291

The fix is:
# cd /lib
# ln -s libpcre.so.3.12.1 libpcre.so.0
# cd lib32
# ln -s libpcre.so.3.12.1 libpcre.so.0
# ldconfig -v

You can also put the link into any path accessible through
LD_LIBRARY_PATH.

This bug is unfortunate and should be fixed (TM). Just missing time to
do the rebuild that should include libpcre inside the installer.

Cheers,
Sylvain Le Gall
-- 
My company: http://www.ocamlcore.com
Linkedin:   http://fr.linkedin.com/in/sylvainlegall
Start an OCaml project here: http://forge.ocamlcore.org
OCaml blogs:                 http://planet.ocamlcore.org



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

end of thread, other threads:[~2011-03-29  7:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-28 21:19 [Caml-list] oasis and camlp4 Joel Reymont
2011-03-28 22:16 ` [Caml-list] " Sylvain Le Gall
2011-03-29  2:44 ` [Caml-list] " Guillaume Yziquel
2011-03-29  2:57   ` Guillaume Yziquel
2011-03-29  7:50   ` [Caml-list] [was: oasis and camlp4] libpcre.so.0 No such file or directory Sylvain Le Gall

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).