Skip to content

Document Meson install process (part of #31)

Karl Fogel requested to merge kfogel/dia:31-doc-meson-install into master

Update INSTALL to document the new Meson process instead of the old autotools process, following up to commit b230c290 (!14 (merged)).

WARNING: I'm not experienced in Meson, so I cargo-culted the build instructions here from another project (https://gitlab.gnome.org/GNOME/fractal), with slight adjustments based partly on !14 (merged). More adjustments might be necessary -- see below.

After I built and installed Dia from source using these new instructions (that is, from commit 45256e25) and tried to run it, I at first got an error:

$ meson . build --prefix=/usr/local
$ ninja -C build
$ sudo ninja -C build install
[... output from all three commands above looked fine ...]
$ hash -r   /* Register /usr/local/bin/dia in $PATH */
$ which dia
/usr/local/bin/dia
$ dia
dia: error while loading shared libraries: libdia.so: cannot open shared object file: No such file or directory
$

I tried an obvious manual fix, which worked:

$ ls -lh /usr/local/lib/libdia.so 
ls: cannot access '/usr/local/lib/libdia.so': No such file or directory
$ sudo cp -a build/lib/libdia.so /usr/local/lib/
$ ls -lh /usr/local/lib/libdia.so
-rwxr-xr-x 1 kfogel kfogel 2.6M Apr 17 13:13 /usr/local/lib/libdia.so
$ dia
[... successful launch this time ...]

I guess that the step I performed manually above should be done by ninja -C build install. I don't know enough about Meson to make that happen, but I assume it's a separate patch from this one -- in other words, once that's fixed, the instructions offered in this merge request might be correct on their own. But again, I'm not Meson-expert enough to be sure. I hope someone who knows more will look over this and Do The Right Thing.

Merge request reports