Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mysql on Mac OS X Intel

7 views
Skip to first unread message

cardmagic

unread,
Sep 5, 2006, 2:47:06 PM9/5/06
to
Hello all, I have compiled ocaml 3.10+dev8 which has fixes that allow
threads and allow you to compile findlib correctly on OS X 386. I tried
installing the mysql module however and when I do:

#use "findlib";;
#require "mysql";;

I get:

Cannot load required shared library dllmysql_stubs.
Reason: Symbol not found: _mysql_insert_id
Referenced from:
/usr/local/lib/ocaml/site-lib/mysql/dllmysql_stubs.so
Expected in: flat namespace

Any ideas? Am I doing this right?

Thanks,
-Lucas

cardmagic

unread,
Sep 9, 2006, 4:31:16 AM9/9/06
to
Oh I am so happy, I have figured it out. Grab a copy of
ocaml-mysql-1.0.4 from
http://raevnos.pennmush.org/code/ocaml-mysql/index.html.

Type ./configure

Edit your Makefile to change the export OCAMLMKLIB_FLAGS line to:

export OCAMLMKLIB_FLAGS=-L/usr/lib -L/usr/local/mysql/lib -verbose
-lmysqlclient -lz -lm -lpthread -ldl -lobjc

make && make opt && sudo make install

Works like a charm. Hooray. I think the main part that was missing was
adding the -lmysqlclient. I hope this can be fixed for the next release
of ocaml-mysql.

-Lucas

Dave Fayram

unread,
Sep 29, 2006, 5:26:12 PM9/29/06
to
If you used the standard mysql PKG, there is one more step to make it
compile (and make other mysql compiles go more smoothly):

sudo ln -s /usr/local/mysql/include /usr/local/include/mysql

Then the compile went smoothly for me.

0 new messages