ocaml / opam-repository

Main public package repository for opam, the source package manager of OCaml.
https://opam.ocaml.org
Creative Commons Zero v1.0 Universal
509 stars 1.1k forks source link

`conf-fswatch` needs update #22256

Open mseri opened 1 year ago

mseri commented 1 year ago

Ubuntu is shipping the library libfswatch inside the binary fswatch package since after 2018

kandu commented 1 year ago

Hi, @mseri,

This is a known issue. The new version of fswatch packaged in debian/ubuntu is currently of broken status in my opinion.

The previous libfswatch-dev package placed the shared object in the right place while the new one didn't.

I don't understand why they made such an unnecessary broken change, not to mention the debian policy of packaging(runtime/develop/source).

Even if it means something which I don't understand, then in the deb package, either would help:

  1. update ld.conf.d in the post-installation phase.
  2. add some cmake or pkg-config file to help developers find the right path to link, so we can hard code the RPATH(another bad idea)

But fswatch packagers did neither.

Since debian is the upstream distribution of ubuntu, we can take a look after a new debian version is released.

kandu commented 1 year ago

Quoted from https://github.com/kandu/ocaml-fswatch/issues/2#issuecomment-1480829671, a way to workaround this issue.

But we can complement the broken debian package on our own.

1. Suppose we are in a debian x86-64 system: add a file named `fswatch.conf` to `/etc/ld.so.conf.d` . and the content of it is `/usr/lib/x86_64-linux-gnu/libfswatch`  then invoke `ldconfig`

2. `LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/libfswatch opam install fswatch_async fswatch_lwt`