<div dir="ltr"><div><div>Hi All, <br><br></div>Is there also no fix for libusb 0.1 -> libusb 1.x upgrade that breaks Solaris 11 builds? <br><br></div><div>Thanks very much and Best Regards<br><br></div><div>William To<br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 16, 2016 at 10:25 AM, William To <span dir="ltr"><<a href="mailto:william.to@erg.com.hk" target="_blank">william.to@erg.com.hk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi All, <br><br></div>I am building pcsc-lite on Solaris 11 because Oracle's version only works on Solaris 10, but not on 11. I don't know why because I gave up trying to make it work.<br><br></div>It seems the Solaris-specific version added a lot of code to handle their network stuff, and were broken on Solaris 11.<br><br></div>So that's why I need to build it myself.<br><br></div>Regards<br><br></div>William To<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, May 13, 2016 at 7:55 PM, Ludovic Rousseau <span dir="ltr"><<a href="mailto:ludovic.rousseau@gmail.com" target="_blank">ludovic.rousseau@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-05-13 7:58 GMT+02:00 William To <span dir="ltr"><<a href="mailto:william.to@erg.com.hk" target="_blank">william.to@erg.com.hk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Hi All, <br></div></div></div></blockquote><div><br></div><div>Hello,<br> <br></div><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br></div>Previously I did successfully built pcsc-lite 1.6.1 and ccid-1.3.13 under Solaris 11 using the Sun Developer Studio compiler (cc). Since then, there is a new requirement to use an USB PC/SC card reader that is not supported by ccid-1.3.13 and is only supported at later versions. So I have decided to try build pcsc-lite 1.8.14 and ccid 1.4.21 under Solaris 11. This time I decided to ditch cc and use gcc 4.9.2 from opencsw instead.<br><br></div><div>Here the brick walls I am hitting now :<br><br></div><div>1. Using the following configuration options :<br>env MAKE=gmake NM=gnm STRIP=gstrip RANLIB=granlib LIBUSB_CFLAGS="-I/usr/include" LIBUSB_LIBS="-L/usr/lib -lusb" SYMBOL_VISIBILITY="-fvisibility=default" ./configure --prefix=/usr/local --enable-debugatr --disable-libusb<br></div><div>(libusb on Solaris 11.3 seems incompatible with pcsc-lite so I had to disable it)<br><br></div><div>When I build with "gmake" afterwards, this is what I got:<br><br>Undefined                       first referenced<br> symbol                             in file<br>SCardListReaders                    testpcsc.o<br>SCardSetAttrib                      testpcsc.o<br>SCardGetAttrib                      testpcsc.o<br>g_rgSCardRawPci                     testpcsc.o<br>SCardReconnect                      testpcsc.o<br>SCardFreeMemory                     testpcsc.o<br>SCardDisconnect                     testpcsc.o<br>SCardReleaseContext                 testpcsc.o<br>SCardIsValidContext                 testpcsc.o<br>SCardEstablishContext               testpcsc.o<br>SCardGetStatusChange                testpcsc.o<br>SCardListReaderGroups               testpcsc.o<br>SCardStatus                         testpcsc.o<br>pcsc_stringify_error                testpcsc.o<br>SCardControl                        testpcsc.o<br>SCardConnect                        testpcsc.o<br>g_rgSCardT1Pci                      testpcsc.o<br>g_rgSCardT0Pci                      testpcsc.o<br>SCardTransmit                       testpcsc.o<br><br></div><div>Using objdump I can see that the libpcsclite.so.1 just built hides the symbols above. So problem 1 is how should I configure the build so that gcc will not hide the symbols by default? I tried the "SYMBOL_VISIBILITY="-fvisibility=default" and that does not work. <br></div></div></blockquote><div><br></div></div></div><div>This problem was also reported in <a href="https://github.com/LudovicRousseau/PCSC/issues/4" target="_blank">https://github.com/LudovicRousseau/PCSC/issues/4</a><br><br></div><div>A possible fix is <a href="https://github.com/risto3/PCSC/commit/2176d782188a9ff4453ae24556a340b2c8f549cf" target="_blank">https://github.com/risto3/PCSC/commit/2176d782188a9ff4453ae24556a340b2c8f549cf</a> <br>I have not yet tested and integrated it (no free time).<br><br></div><div>Does it work for you?<br></div><span><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>After changing the src/Makefile to stop hiding the symbols, the build can continue, and then hit this brick wall:<br><br>  CC       pcscd-configfile.o<br>configfile.l: In function âDBGetReaderListDirâ:<br>configfile.l:295:16: error: âstruct direntâ has no member named âd_typeâ<br>    if (direntry->d_type == DT_UNKNOWN)<br>                ^<br>configfile.l:295:28: error: âDT_UNKNOWNâ undeclared (first use in this function)<br>    if (direntry->d_type == DT_UNKNOWN)<br>                            ^<br>configfile.l:295:28: note: each undeclared identifier is reported only once for each function it appears in<br>configfile.l:314:17: error: âstruct direntâ has no member named âd_typeâ<br>     if (direntry->d_type != DT_REG)<br>                 ^<br>configfile.l:314:29: error: âDT_REGâ undeclared (first use in this function)<br>     if (direntry->d_type != DT_REG)<br><br><br></div><div>Problem 2 is I think the dirent.h under Solaris 11 is incompatible with the pcscd-config file. Is there anything I can do about this?<br></div></div></blockquote><div><br></div></span><div>Fixed upstream in <a href="https://github.com/LudovicRousseau/PCSC/commit/fa52ae4e1f1ae3c35596e9aedaa3ce30fc5ceef9" target="_blank">https://github.com/LudovicRousseau/PCSC/commit/fa52ae4e1f1ae3c35596e9aedaa3ce30fc5ceef9</a><br></div><br></div><div class="gmail_quote">Why are people building pcsc-lite on Solaris?<br></div><div class="gmail_quote">Oracle (ex-Sun) does not provide its own version of pcsc-lite any more?<br></div><br></div><div class="gmail_extra">Bye<span><font color="#888888"><br clear="all"></font></span></div><span><font color="#888888"><div class="gmail_extra"><br>-- <br><div> Dr. Ludovic Rousseau</div>
</div></font></span></div>
<br></div></div>_______________________________________________<br>
Pcsclite-muscle mailing list<br>
<a href="mailto:Pcsclite-muscle@lists.alioth.debian.org" target="_blank">Pcsclite-muscle@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle" rel="noreferrer" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle</a><br></blockquote></div><br></div>
</blockquote></div><br></div>