I try to build OCaml project via dune.
I want to let contain “libissl.so” and “libcrypto.so” in OCaml binary.(main.exe)
My dune file is following:
(executable
(public_name sample_pj)
(name main)
(libraries sample_pj lwt cohttp cohttp-lwt-unix ssl ptime)
(flags -cclib -lcrypto -cclib -lssl)
(preprocess
(pps ppx_deriving.std)))
I build that OCaml project and copy to a Ubuntu Docker container(for test).
And i check depends libraries…
root@b565f1720b1f:/tmp# ldd main.exe
linux-vdso.so.1 (0x00007fff6ea4c000)
libssl.so.1.1 => not found
libcrypto.so.1.1 => not found
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fadf5af5000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fadf5757000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fadf5553000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fadf5162000)
/lib64/ld-linux-x86-64.so.2 (0x00007fadf63ac000)
root@b565f1720b1f:/tmp#
So, main.exe does not contain “libssl.so” and “libcrypto.so”.
How can i let contain these shared library into OCaml binary?
I do not have much knowledge about C and shared libraries…
Maybe I’m fundamentally making various misunderstandings?
6 posts - 3 participants