caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* OCaml-MySQL
@ 2005-11-14 18:09 Daniel Margolis
  2005-11-14 18:43 ` [Caml-list] OCaml-MySQL (fixed) Daniel Margolis
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Margolis @ 2005-11-14 18:09 UTC (permalink / raw)
  To: caml-list

Hi,

I'm trying to get database access working in OCaml, using v. 3.0.9 on  
MacOS 10.4. So first, if anyone has recommendations of a good  
interface for any (free) database server (i.e. I'm not tied to  
implementation--MySQL, PostgreSQL, SQLite, etc, are all fine), I'd  
gladly like to hear them. Performance is something of a concern, but  
my main concern is ease of use--something with an intuitive interface  
would be nice.

Second, I've been trying to get OCaml-MySQL  (from http:// 
raevnos.pennmush.org/code/ocaml-mysql/) working, since it seems a  
good option. So I had to replace the OCamlMakefile it comes with with  
a newer version (because the version it comes with tries to do gcc - 
shared, which is unavailable on OSX) to get it to compile. But when I  
try to build the demo, using "ocamlc mysql.cma demo.ml", I get

> Error on dynamically loaded library: Symbol not found:  
> _mysql_get_host_info
>   Referenced from: ./dllmysql_stubs.so
>   Expected in: flat namespace

I don't know anything much about linking OCaml code to C modules, so  
I'm a bit lost. Can anyone suggest what might be causing this, and  
how I can fix it?

Thanks,
Dan


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

* Re: [Caml-list] OCaml-MySQL (fixed)
  2005-11-14 18:09 OCaml-MySQL Daniel Margolis
@ 2005-11-14 18:43 ` Daniel Margolis
  2005-11-15 11:54   ` Richard Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Margolis @ 2005-11-14 18:43 UTC (permalink / raw)
  To: caml-list

With some help, I've managed to get OCaml-MySQL working. But if  
anyone has any other recommendations of database libraries, still  
feel free to share them with me.

Thanks.


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

* Re: [Caml-list] OCaml-MySQL (fixed)
  2005-11-14 18:43 ` [Caml-list] OCaml-MySQL (fixed) Daniel Margolis
@ 2005-11-15 11:54   ` Richard Jones
  2005-11-15 12:35     ` David Baelde
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Jones @ 2005-11-15 11:54 UTC (permalink / raw)
  To: Daniel Margolis; +Cc: caml-list

On Mon, Nov 14, 2005 at 01:43:39PM -0500, Daniel Margolis wrote:
> With some help, I've managed to get OCaml-MySQL working. But if  
> anyone has any other recommendations of database libraries, still  
> feel free to share them with me.

ocamldbi has a MySQL interface.

http://savannah.nongnu.org/download/modcaml/

Rich.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com


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

* Re: [Caml-list] OCaml-MySQL (fixed)
  2005-11-15 11:54   ` Richard Jones
@ 2005-11-15 12:35     ` David Baelde
  0 siblings, 0 replies; 4+ messages in thread
From: David Baelde @ 2005-11-15 12:35 UTC (permalink / raw)
  To: caml-list

It may be worth pointing that ocaml-mysql is not thread-ready. I
reported that a few months ago and nothing was done. The problem is
that the bindings do not declare blocking sections, so when one thread
calls a mysql function (which can take time) the other threads won't
be scheduled.

I'm glad to hear about ocamldbi. Is it well maintained ? has blocking
sections stuff ? If so, we (savonet.sf.net) should swicth to it.
--
David


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

end of thread, other threads:[~2005-11-15 12:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-14 18:09 OCaml-MySQL Daniel Margolis
2005-11-14 18:43 ` [Caml-list] OCaml-MySQL (fixed) Daniel Margolis
2005-11-15 11:54   ` Richard Jones
2005-11-15 12:35     ` David Baelde

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