PCSC icon indicating copy to clipboard operation
PCSC copied to clipboard

Fixing pkg-config file

Open brad0 opened this issue 1 year ago • 2 comments

https://github.com/LudovicRousseau/PCSC/blob/78c08327b17a4925aa7e90ec89e5bcbc63f2138d/meson.build#L282

With libpcsclite not being linked to libpthread this line should be removed from the pkg-config file too.

Also..

With pcsc-tools you mentioned..

Only libpcsclite_real is linked with the threads library.

But with the Meson build that is not true. Neither library is.

brad0 avatar Aug 11 '24 08:08 brad0

I think you are right about libraries_private.

pcsclite_real has a dependency on threads. https://github.com/LudovicRousseau/PCSC/blob/master/meson.build#L170 From the meson logs I get:

[9/19] cc  -o libpcsclite_real.so.1 libpcsclite_real.so.1.p/src_debug.c.o libpcsclite_real.so.1.p/src_winscard_clnt.c.o libpcsclite_real.so.1.p/src_simclist.c.o libpcsclite_real.so.1.p/src_sys_unix.c.o libpcsclite_real.so.1.p/src_utils.c.o libpcsclite_real.so.1.p/src_winscard_msg.c.o -Wl,--as-needed -Wl,--allow-shlib-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libpcsclite_real.so.1 -Wl,--end-group -pthread

So -pthread is used at link stage but that is not a real library, i.e. not something used with -l.

Is it a problem? I just retried on OpenBSD 7.5 and compilation and link of testpcsc works fine.

LudovicRousseau avatar Aug 11 '24 12:08 LudovicRousseau

I am not so sure about the removal of libraries_private.

I added PTHREAD_LIBS in Libs: in 45f45f94db45108a2f66ddb66825e8f3f59c41a3 and then moved it in Libs.private: in 26e48e3dea33c093e83e22746740bf9629a545d6

But I have not documented WHY I made these changes, and I do not remember (it was in 2004 and 2008).

I do plan to keep it like this. Unless you can demonstrate a problem with that.

LudovicRousseau avatar Aug 12 '24 09:08 LudovicRousseau

No feedback since 2 months. Closing

LudovicRousseau avatar Oct 09 '24 20:10 LudovicRousseau