Bug 93920 - New port: databases/ocaml-sqlite3 OCaml bindings for databases/sqlite3
Summary: New port: databases/ocaml-sqlite3 OCaml bindings for databases/sqlite3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Aaron Dalton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-28 00:00 UTC by Meikel Brandmeyer
Modified: 2006-07-24 22:19 UTC (History)
0 users

See Also:


Attachments
ocaml-sqlite3.shar (6.96 KB, text/plain)
2006-02-28 00:00 UTC, Meikel Brandmeyer
no flags Details
patch-sqlite3_stubs.c (7.07 KB, text/plain)
2006-06-13 18:49 UTC, mb
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Meikel Brandmeyer 2006-02-28 00:00:22 UTC
	OCaml bindings for the SQLite3 database engine.
Comment 1 Aaron Dalton freebsd_committer freebsd_triage 2006-06-03 05:11:29 UTC
Responsible Changed
From-To: freebsd-ports-bugs->aaron

I'll take it.
Comment 2 Aaron Dalton freebsd_committer freebsd_triage 2006-06-03 05:12:40 UTC
State Changed
From-To: open->feedback

Ask for submitter fix.
Comment 3 Aaron Dalton freebsd_committer freebsd_triage 2006-06-03 05:16:05 UTC
The shar failed to extract properly.  Please resubmit, this time running 
the shar command from the *parent* directory.

$ shar `find ocaml-sqlite3` > ocaml-sqlite3.shar

Please verify that everything is working properly by trying to extract 
it.  Do not open a new PR!  Simply reply to this email.  If you have any 
questions or problems, please let me know.

Cheers!
-- 
Aaron Dalton
aaron@FreeBSD.org
FreeBSD Ports Committer
Comment 4 Aaron Dalton freebsd_committer freebsd_triage 2006-06-09 06:55:20 UTC
Thanks for the updated shar.  It worked fine.  An error occured, 
however, while testing the port on a FreeBSD 4.11 box running GCC v2.95. 
    Please see if you can track down the source of the problem and how 
to best fix it.  Maybe there's an include file missing.  Maybe it needs 
a newer GCC, that sort of thing.  Below is the build log.

Cheers!
-- 
Aaron Dalton
aaron@FreeBSD.org
FreeBSD Ports Committer

==BUILD LOG==
===>  Building for ocaml-sqlite3-0.2.0
ocamlc -c sqlite3.mli
ocamlc -pp camlp4o -c sqlite3.ml
File "sqlite3.ml", line 160, characters 4-5:
cc -UHAVE_ALLOCA_H -I/usr/local/include -I/usr/local/lib/ocaml -O -pipe 
-c sqlite3_stubs.c
Warning U: this match case is unused.
sqlite3_stubs.c: In function `caml_sqlite3_open':
sqlite3_stubs.c:241: syntax error before `char'
sqlite3_stubs.c:242: `buf' undeclared (first use in this function)
sqlite3_stubs.c:242: (Each undeclared identifier is reported only once
sqlite3_stubs.c:242: for each function it appears in.)
sqlite3_stubs.c: In function `caml_sqlite3_exec':
sqlite3_stubs.c:320: syntax error before `struct'
sqlite3_stubs.c:323: `sql' undeclared (first use in this function)
sqlite3_stubs.c:323: `len' undeclared (first use in this function)
sqlite3_stubs.c:324: `cbx' undeclared (first use in this function)
sqlite3_stubs.c:326: syntax error before `int'
sqlite3_stubs.c:336: syntax error before `const'
sqlite3_stubs.c:337: `rc' undeclared (first use in this function)
sqlite3_stubs.c:337: `msg' undeclared (first use in this function)
sqlite3_stubs.c: In function `prepare_allocated':
sqlite3_stubs.c:431: syntax error before `*'
sqlite3_stubs.c:432: `db' undeclared (first use in this function)
sqlite3_stubs.c:436: syntax error before `int'
sqlite3_stubs.c:443: `rc' undeclared (first use in this function)
sqlite3_stubs.c: In function `caml_sqlite3_prepare_it':
sqlite3_stubs.c:473: syntax error before `*'
sqlite3_stubs.c:475: `stmt_p' undeclared (first use in this function)
sqlite3_stubs.c: In function `caml_sqlite3_recompile':
sqlite3_stubs.c:496: syntax error before `const'
sqlite3_stubs.c:497: `sql' undeclared (first use in this function)
sqlite3_stubs.c: In function `caml_sqlite3_bind_parameter_name':
sqlite3_stubs.c:518: syntax error before `int'
sqlite3_stubs.c:519: `i' undeclared (first use in this function)
sqlite3_stubs.c:521: syntax error before `const'
sqlite3_stubs.c:522: `str' undeclared (first use in this function)
sqlite3_stubs.c: In function `caml_sqlite3_bind':
sqlite3_stubs.c:568: syntax error before `int'
sqlite3_stubs.c:569: `i' undeclared (first use in this function)
sqlite3_stubs.c: In function `caml_sqlite3_transfer_bindings':
sqlite3_stubs.c:624: syntax error before `*'
sqlite3_stubs.c:626: `stmt2' undeclared (first use in this function)
sqlite3_stubs.c: In function `caml_sqlite3_column_name':
sqlite3_stubs.c:686: syntax error before `int'
sqlite3_stubs.c:687: `i' undeclared (first use in this function)
sqlite3_stubs.c: In function `caml_sqlite3_column_decltype':
*** Error code 1

Stop in /usr/ports/databases/ocaml-sqlite3/work/ocaml-sqlite3.
*** Error code 1

Stop in /usr/ports/databases/ocaml-sqlite3.
sqlite3_stubs.c:702: syntax error before `int'
sqlite3_stubs.c:703: `i' undeclared (first use in this function)
sqlite3_stubs.c: In function `caml_sqlite3_column':
sqlite3_stubs.c:744: syntax error before `int'
sqlite3_stubs.c:745: `i' undeclared (first use in this function)
sqlite3_stubs.c:746: syntax error before `int'
sqlite3_stubs.c:761: `len' undeclared (first use in this function)
A problem building things on 4.11
Comment 5 mb 2006-06-13 18:49:41 UTC
Hello,

> Thanks for the updated shar.  It worked fine.  An error occured, 
> however, while testing the port on a FreeBSD 4.11 box running GCC v2.95. 
>     Please see if you can track down the source of the problem and how 
> to best fix it.  Maybe there's an include file missing.  Maybe it needs 
> a newer GCC, that sort of thing.  Below is the build log.
I tried to track down the problem. However, since I do not have access
to such a machine, I can only guess what the problem is.

Going through the source code I noticed that variable declarations are
mixed with normal code. This is actually contained in the C99 standard.
However for C89 this is a gcc extension. My assumptions is that the gcc
2.95 of your build machine, does not contain such a extension, yet.

I changed the declarations to the "correct" way. But I cannot test this
change. Please the attached diff.

Sincerely
Meikel
Comment 6 Aaron Dalton freebsd_committer freebsd_triage 2006-06-15 00:52:24 UTC
State Changed
From-To: feedback->open

Sufficient feedback received.
Comment 7 Aaron Dalton freebsd_committer freebsd_triage 2006-07-24 22:19:55 UTC
State Changed
From-To: open->closed

New port added. Thanks!