fdopen / opam-repository-mingw

windows package repository for OPAM (mingw and msvc)
https://fdopen.github.io/opam-repository-mingw/
Creative Commons Zero v1.0 Universal
96 stars 34 forks source link

sqlite3 package doesn't install quite right #13

Closed josyoun closed 8 years ago

josyoun commented 8 years ago

After installing both sqlite3 and pkg-config from Cygwin, opam installed the OCaml package sqlite3 just fine. However, it looks like the path is slightly corrupted:

# #require "sqlite3";;
C:\OCaml64\home\Joe\.opam\4.02.3+mingw64c\lib\sqlite3: added to search path
C:\OCaml64\home\Joe\.opam\4.02.3+mingw64c\lib\sqlite3\sqlite3.cma: loaded
Cannot load required shared library dllsqlite3_stubs.
Reason: C:/OCaml64/home/Joe/.opam/4.02.3+mingw64c/lib/stublibs\dllsqlite3_stubs.dll: The specified module could not be found.

Note

$ ls  C:/OCaml64/home/Joe/.opam/4.02.3+mingw64c/lib/stublibs\dllsqlite3_stubs.dll
ls: cannot access C:/OCaml64/home/Joe/.opam/4.02.3+mingw64c/lib/stublibsdllsqlite3_stubs.dll: No such file or directory

$ ls  C:/OCaml64/home/Joe/.opam/4.02.3+mingw64c/lib/stublibs/dllsqlite3_stubs.dll
C:/OCaml64/home/Joe/.opam/4.02.3+mingw64c/lib/stublibs/dllsqlite3_stubs.dll

Basically, the file is there, but the last slash is backslash instead of a forward slash. Anyway, I'm not sure if this is an opam problem or if it's a sqlite3 package problem.

fdopen commented 8 years ago

I don't get this error, install it again with the following steps:

opam remove sqlite3
opam install depext depext-cygwinports
export PATH="/usr/x86_64-w64-mingw32/sys-root/mingw/bin:$PATH"
opam depext -i sqlite3

/usr/x86_64-w64-mingw32/sys-root/mingw/bin must be in front of your PATH during installation and usage inside ocaml. The dlls from there are necessary. Otherwise, gcc might pick up the wrong versions and dllsqlite3_stubs.dll can't be loaded because of missing dlls.

josyoun commented 8 years ago

That fixed it. Thanks again for the help!