ocaml-stdint
ocaml-stdint copied to clipboard
dllstdint_stubs.so not copied to ~\.opam\system\lib\stublibs when build with opam
Dear Stdint Team,
when I build/install stdint with opam (on cygwin), the file dllstdint_stubs.so is not copied to ~/.opam/system/lib/stublibs, which is the standard opam folder for such files. As a result the .so file is not found when starting executables, unless I copy the file there or add ~/.opam/system/lib/stdint to the load path.
Best regards,
Michael
I'd like to fix that but I have no idea how :cry:. It works fine for me in Linux:
$ ls -l /home/andre/.opam/4.02.1/lib/stublibs/dllstdint_stubs.so
-rwxrwxr-x 1 andre andre 192152 Jul 20 14:47 /home/andre/.opam/4.02.1/lib/stublibs/dllstdint_stubs.so
Unfortunately I don't have a cygwin environment to try to reproduce this. Are you using a recent version of opam?
Dear Andre,
it works for all other packages which need a stublib I used so far (not that many). My stublib folder has this contents (after manually copying the stdint file):
dllbin_prot_stubs.so dllcore_kernel_stubs.so dllcore_stubs.so dllexpect_test_matcher_stubs.so dllstdint_stubs.so
I looked at the opam files, make files and install.ml files of two of these packages and looked if I can find how they do it, but there are no obvious traces of how this is done.
My Opam version is 1.2.2.
For debugging this I can offer two things:
1.) In case you have a windows box somewhere, I can send you a batch and a bash script which reproduce my environment (setup Cygwin with the packages I have, install opam, install the opam packages). It should be less than 10 minutes of manual work and less than 1 hour of compile time.
2.) I could run the stdint install with a system call monitor running. From the trace one could see if it tries to copy it, but it fails for some reason. One imaginable error source is that a wrong path separator is used (Cygwin is windows but uses / and not ).
Best regards,
Michael
P.S.: Another source of errors might be the file extension. On Windows shared libraries tend to have the extension .dll, but on Cygwin it is .so. Maybe there is a mix between the two on Cygwin.
I had a similar issue with header files not being copied to the correct location on cygwin (was a "Windows-path-backslash issue"). With stdint 0.4.2 & oasis 0.4.10 this seems to be fixed. Maybe this is a similar issue, although I never observed a missing dllstdint_stubs.dll
.
For further analysis, I would suggest to do a opam install stdint --keep-build-dir
and have a look at ~/.opam/system/build/stdint whether the stublib has been generated and/or is copied to a strange location.
See also my comments in #19.