caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: John Max Skaller <skaller@ozemail.com.au>
To: Pierre Weis <Pierre.Weis@inria.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Caml toplevel and readline
Date: Sat, 16 Jun 2001 06:59:57 +1000	[thread overview]
Message-ID: <3B2A774D.AC3B4767@ozemail.com.au> (raw)
In-Reply-To: <200106142103.XAA09003@pauillac.inria.fr>

Pierre Weis wrote:
> 
> > > ledit is a tool written in camlp4 by Daniel de Raglaudre
> > > which allows line editing on any program.
> > >   http://cristal.inria.fr/~ddr/index-english.html
> >
> >       I've tried that and couldn't get it to work.
> > That goes for about half the C/Ocaml packages I've tried,
> > including, of all things, CamlImages.
> [...]
> > John (Max) Skaller, mailto:skaller@maxtal.com.au
> 
> Hi Max,
> 
> This is really a pity you've found half the Ocaml packages you've
> tried broken and impossible to install. I'm very sorry for that and I
> consider it a shame for us, as we consider ourselves as highly
> competent professionals ...

	Please note I said Ocaml/C packages. And I was NOT
refering to INRIA distributions particularly, but generally
available packages including those from third parties.

	Above it is said ledit is writtin in camlp4,
another package I've had trouble installing. I'm now using
the CDK release of Ocaml. Perhaps that comes bundled with p4:

root@pelican] ~/ledit/ledit-1.8>make
ocamlc -pp "camlp4r pa_extend.cmo q_MLast.cmo" -I `camlp4 -where` -c
pa_local.ml/bin/sh: camlp4: command not found
sh: camlp4r: command not found
Preprocessing error
make: *** [pa_local.cmo] Error 2

	No, it looks like it doesn't. So I build camlp4 (no problems).
Now I can build ledit (although it isn't clear that I should
run 'make install' to use it). I try 

	ledit ocaml

and I have line editing. So this time, I have no problems with
either camlp4 or ledit.

> Also for CamlImages, please report us your problems, we will help you
> and fix the library for everybody.

	OK. I try again. The .configure summary is surprising:

Language: ocaml version 3.01
Installed in: /usr/local/lib/ocaml/camlimages
External libraries: bmp png jpeg tiff xpm ps
Lablgtk: Not found

No Lablgtk? Hmm. I have gtk. (My WM is Enlightenment :-)

OK, try the make:

ocamlc  -I corelib -I ppm -I jpeg -I tiff -I bmp -I gif -I png -I xpm -I
xvthumb -I ps -I graphics -I freetype  -c corelib/camlimages.ml
File "corelib/camlimages.ml", line 24, characters 0-3:
Syntax error
make: *** [corelib/camlimages.cmo] Error 2

Oops. Without even looking, the code is probably using pre 3.01 syntax.
I'll check. Here's the file:

(* Supported libraries *)
let lib_gif = false
let lib_png = true
let lib_jpeg = true
let lib_tiff = true
let lib_freetype = 
let lib_ps = true

(* External files *)
let path_rgb_txt = "/usr/X11R6/lib/X11/rgb.txt"
let path_gs = "/usr/bin/gs"

(* They are written in ML, so always supported *)
let lib_ppm = true
let lib_bmp = true
let lib_xvthumb = true

(* Word size, used for the bitmap swapping memory management *)
let word_size = 4 


Well, the error isn't where the compiler says it is,
but the file is small, and the bug is easy to spot:
the line

	lib_freetype =

should have 'false' as the value, not a blank. I'll edit it.
OK, now it compiles. Try the test as indicated in the INSTALL notes:

>root@pelican] ~/camlimages-1.02/test>make test
ocamlc  -custom -I ../corelib -I ../gif -I ../jpeg -I ../tiff -I ../bmp
-I ../ppm -I ../png -I ../graphics -I ../freetype -I ../xpm -I
../xvthumb -I ../ps -cclib "-L../corelib -L../gif -L../jpeg -L../tiff
-L../png -L../freetype -L../xpm" img.cma graphics.cma graphic_image.cma
freetype.cma gif_img.cma jpeg_img.cma tiff_img.cma bmp_img.cma
ppm_img.cma png_img.cma xvthumb_img.cma xpm_img.cma ps_img.cma -o test
test.ml
/tmp/cc5Dv2bQ.o(.data+0x3c4): undefined reference to
`set_Instance_PixelSizes'
/tmp/cc5Dv2bQ.o(.data+0x3e4): undefined reference to
`get_Big_Glyph_Metrics'
/tmp/cc5Dv2bQ.o(.data+0x3f8): undefined reference to `get_Outline_BBox'
/tmp/cc5Dv2bQ.o(.data+0x3fc): undefined reference to
`get_Face_Properties'
/tmp/cc5Dv2bQ.o(.data+0x400): undefined reference to
`get_Outline_Contents'
collect2: ld returned 1 exit status
Error while building custom runtime system
make: *** [test] Error 2

Hmmm. I know nothing about building runtimes: I use the 
optimising compiler exclusively. 

> Last, please feel free to publicly cite in this mailing list the name
> of all the bogous libraries you've ever found in the INRIA
> distributions or Web sites. We'll be glad to hear about that and then
> to fix the faulty programs, or even remove them from our distributions
> if they are too bogous to be fixed.
> 
> Thank you for helping us to fix our bogous software.

Sigh. I am now using Ocaml to produce software I want other
people to use. I also happen to be using a literate
programming tool written in Python.

I am going to have to ask developers to

	a) download and install Python
	b) download and install interscript
	c) download and install Ocaml
	d) download and install any other third party
		packages I might be using
	e) download and install Felix
	f) download and install Boost (a public set of C++ libraries)

Luckily, Felix is a 'pure Ocaml' program: it only
includes a couple of minor hacks that might be
platform dependent, so at present, I probably don't
need anything under item (d).

I provide python scripts to build Felix -- but they'll
probably only work under Linux, and probably only
on my box. I'm going to have enough trouble making
everything work on other platforms (esp. Windows)
-- assuming the tool chain above is all correctly
installed.

So when people say 'use ledit' I have to ask:
Why should I have to? Why isn't this functionality
standard? 

Basically, I can't use Ocamlp4 in my project,
because it adds yet another step into the tool chain.
It looks frightening enough already. 

I do understand that Ocaml is basically a research project.
And it is a superb package for production use as well,
a rare combination! And I'm really happy that there is now
a comprehensive compilation of third party libraries,
(CDK) so that it is possible that step (d) above
can be kept empty.

-- 
John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  parent reply	other threads:[~2001-06-18  8:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-13 16:37 John Max Skaller
2001-06-14  6:40 ` Mark Wotton
2001-06-14  6:45 ` Jacques Garrigue
2001-06-14 10:32   ` leary
2001-06-14 15:47   ` Brian Rogoff
2001-06-14 19:43   ` John Max Skaller
2001-06-14 21:03     ` Pierre Weis
2001-06-15  5:05       ` leary
2001-06-15 10:21         ` Daniel de Rauglaudre
2001-06-15 20:59       ` John Max Skaller [this message]
2001-06-15 21:10       ` [Caml-list] Big_num not documented in manual John Max Skaller
2001-06-15  9:13     ` [Caml-list] Caml toplevel and readline Alan Schmitt
2001-06-15 14:12       ` Brian Rogoff
2001-06-15  9:34   ` Sven LUTHER
2001-06-16 17:46     ` leary
2001-06-18  7:32   ` Xavier Leroy
2001-06-18  9:48     ` Jacques Garrigue
2001-06-18 16:34       ` John Max Skaller
2001-06-19  1:39         ` Jacques Garrigue
2001-06-19 10:10           ` Sven LUTHER
2001-06-19 10:06         ` Sven LUTHER
     [not found]         ` <9gnrcd$4bv$1@qrnik.zagroda>
2001-06-21  6:05           ` Marcin 'Qrczak' Kowalczyk
2001-06-21  6:40             ` leary
2001-06-21  7:01               ` Jacques Garrigue
2001-06-22 14:56 ` Sven LUTHER
2001-06-22 15:36   ` Brian Rogoff
2001-06-24 20:59     ` Sven LUTHER
2001-06-22 17:52   ` Daniel de Rauglaudre
2001-06-13 20:37 [Caml-list] Repeat: is there a Qt binding for OCaml? Adriaan de Groot
2001-06-14  6:57 ` Jacques Garrigue
2001-06-14  7:51   ` leary
2001-06-14  8:36     ` [Caml-list] Caml toplevel and readline Jacques Garrigue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B2A774D.AC3B4767@ozemail.com.au \
    --to=skaller@ozemail.com.au \
    --cc=Pierre.Weis@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).