On Tue Apr 7 22:52:38 EDT 2015, Leif Asbrink wrote:
There are two solutions to this problem. One would be to modify Linrad to look for shared libs with the needed device support at run time, using something like dlopen(). This is already implemented. Linrad uses dlopen on all hardware related libraries and would thell the uset what library is missing. It is then up to the user to search the Internet for libbladeRF.so or whatever is missing.
Hej Leif, I did a quick (and uneventful) build of Linrad last night to refresh my memory of what all is involved. As you noted, the configure script informs you about any missing 3-rd party software for SDR device support. I have a question that I didn't have time to dig into and answer myself. If a device support library is missing (e.g. libperseus-sdr.so) at compile time, can the Linrad executable (via your dlopen() code) still find that library at runtime? Or must the support library and any associated header files for that device be installed at compile time for it to find it at runtime? 73, John -- John C. Peterson, KD6EKQ mailto:jcp@eskimo.com San Diego, CA U.S.A
Hello John,
If a device support library is missing (e.g. libperseus-sdr.so) at compile time, can the Linrad executable (via your dlopen() code) still find that library at runtime? Or must the support library and any associated header files for that device be installed at compile time for it to find it at runtime? Linrad does not use any automagics or configuration files. Everything is contained in the configuration script. All support libraries are loaded with the absolute path which is transferred to Makefile by the configure script. This means that one must run ./configure after having added new hardware related .so files.
Linux has evolved over the years and there were many problems in the past with malfunctions of the traditional configure functions. For this reason Linrad avoids all the complexity by explicitly searching ALL directories where libraries might be placed. That list is in libfind1.c (in total 22 directories) and that file is executed by the configure script. In a packaged version the packager would know where the files are placed in the particular distribution. Just placing all the files where they shold be stored when compiling the distrbution executable would make Linrad look at the right place which means that a missing file will be announced like this: Can not find library /usr/local/lib/libperseus-sdr.so Linrad tries to load from the location where the file was placed when configure was run. The only problem is libwd_dask.so which requires a NDA. It will be easy to place a dummy at the preferred place so Linrad would know where to look for the file. 73 Leif
participants (2)
-
John C. Peterson -
Leif Asbrink