Fix using dlopen on OpenBSD
libraries dlopen'd on OpenBSD need to have the major version left off.
Surprising
How do you install 2 different major versions of a library at the same time? You can't do that on OpenBSD?
Surprising
How do you install 2 different major versions of a library at the same time? You can't do that on OpenBSD?
Shared libs and versioning are handled a bit differently with OpenBSD versus other ELF based OS. There are no symlinks. As in no libfoo.so, libfoo.so.1 symlinks. Just libfoo.so.2.0, libfoo.so.3.0.
ah OK.
So will it work if the code uses libpcsclite_real.so.1.0 instead of libpcsclite_real.so.1?
I tried on OpenBSD 7.5 and I have NO problem with the current code.
In the build directory the files are:
openbsd$ ls
build.ninja libpcsclite_real.so.1 pcsc_demo.p
compile_commands.json libpcsclite_real.so.1.p pcscd
config.h libpcscspy.so pcscd.8
doxygen.conf libpcscspy.so.0 pcscd.h
libpcsclite.so libpcscspy.so.0.p pcscd.p
libpcsclite.so.1 meson-info pcsclite.h
libpcsclite.so.1.p meson-logs reader.conf.5
libpcsclite_fake.so meson-private testpcsc
libpcsclite_fake.so.p meson-uninstalled testpcsc.p
libpcsclite_real.so pcsc_demo
I have no problem to run the sample code ./testpcsc for example:
penbsd$ ./testpcsc
MUSCLE PC/SC Lite unitary test Program
THIS PROGRAM IS NOT DESIGNED AS A TESTING TOOL FOR END USERS!
Do NOT use it unless you really know what you do.
Testing SCardEstablishContext : Command successful.
Testing SCardIsValidContext : Command successful.
Testing SCardIsValidContext : Invalid handle. (don't panic)
Testing SCardListReaderGroups : Command successful.
Group 01: SCard$DefaultReaders
Testing SCardFreeMemory : Command successful.
Testing SCardListReaders : Cannot find a smart card reader. (don't panic)
Testing SCardGetStatusChange
Please insert a working reader : ^C
If pcscd is not started I get:
openbsd$ ./testpcsc
MUSCLE PC/SC Lite unitary test Program
THIS PROGRAM IS NOT DESIGNED AS A TESTING TOOL FOR END USERS!
Do NOT use it unless you really know what you do.
Testing SCardEstablishContext : Service not available.
"Service not available." is the expected error.
If I remove libpcsclite_real.so.1 I get instead:
openbsd$ ./testpcsc
MUSCLE PC/SC Lite unitary test Program
THIS PROGRAM IS NOT DESIGNED AS A TESTING TOOL FOR END USERS!
Do NOT use it unless you really know what you do.
loading "libpcsclite_real.so.1" failed: File not found
Testing SCardEstablishContext : Internal error.
I guess your problem is elsewhere.
No feedback since one month. If you think there is a real bug please add your comments.
Closing for now