I am trying to port a project and switch to meson and succeeded with exception of figuring out how to tell meson to install run time loaded libraries – which have to be build and installed via libtool to create the .so files. I made to compile the object but then I get some error I do not understand.
This is how I open the plugins in my software:
if ((gxsm_module = g_module_open (filename, G_MODULE_BIND_LAZY)) != NULL)...
I tried all those variants with the same result:
shared_library('PanView',...
shared_module('ProbeIndicator',...
build_target('pyremote',
'pyremote.cpp',
dependencies : deps,
target_type : 'shared_module',
install_dir: install_path,
install: true,
)
==>
[17/73] Linking target plug-ins/common/libpyremote.so
c++ (Debian 11.2.0-13) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
and later at install this error
Installing core-source/gxsm4 to /usr/local/bin
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 138, in run
return options.run_func(options)
File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 771, in run
installer.do_install(datafilename)
File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 548, in do_install
self.install_targets(d, dm, destdir, fullprefix)
File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 666, in install_targets
raise RuntimeError(f'File {t.fname!r} could not be found')
RuntimeError: File 'plug-ins/common/libpyremote.so' could not be found
FAILED: meson-install
/usr/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.