Giter Club home page Giter Club logo

Comments (8)

LudovicRousseau avatar LudovicRousseau commented on August 25, 2024

pcsc_assert_wire_constants is defined in pcsc-wirecheck-dist.c generated by pcsc-wirecheck-gen.

What is the result of:

$ make pcsc-wirecheck-dist.c

from pcsc.

FeitianSmartcardReader avatar FeitianSmartcardReader commented on August 25, 2024

strange, the pcsc-wirecheck-dist.c is empty, no any code.

root@ubuntu:/opt/software/package/ccid/CCID/PCSC/src# cat pcsc-wirecheck-dist.c root@ubuntu:/opt/software/package/ccid/CCID/PCSC/src# make pcsc-wirecheck-dist.cmake: `pcsc-wirecheck-dist.c' is up to date.
root@ubuntu:/opt/software/package/ccid/CCID/PCSC/src#

from pcsc.

LudovicRousseau avatar LudovicRousseau commented on August 25, 2024

Remove the file pcsc-wirecheck-dist.c and run make pcsc-wirecheck-dist.c again.

from pcsc.

FeitianSmartcardReader avatar FeitianSmartcardReader commented on August 25, 2024

root@ubuntu:/opt/software/package/ccid/CCID/PCSC/src# make pcsc-wirecheck-dist.c CC pcsc-wirecheck-gen.o
CCLD pcsc-wirecheck-gen
rm -f pcsc-wirecheck-dist.c
./pcsc-wirecheck-gen > pcsc-wirecheck-dist.c.tmp
/bin/bash: line 7: ./pcsc-wirecheck-gen: cannot execute binary file
mv pcsc-wirecheck-dist.c.tmp pcsc-wirecheck-dist.c
root@ubuntu:/opt/software/package/ccid/CCID/PCSC/src#

from pcsc.

FeitianSmartcardReader avatar FeitianSmartcardReader commented on August 25, 2024

Another strange issue is below
I if comment that line, I can build successful on embed linux, but it has issue for multi-slot reader support, then I want do test under Ubuntu, build pcsc source code under ubuntu, I found another issue.
I am using same command to build, put all related file under /usr/ccid
libusb build with no error
build pcsc got error below
If I using below command, it can build without error:
./configure CC=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-gcc --host=arm-fsl-linux prefix=/usr/ccid --enable-libusb LIBUSB_LIBS="-L/usr/ccid/install/lib -lusb-1.0" LIBUSB_CFLAGS="-I/usr/ccid/install/include/libusb-1.0" PCSC_CFLAGS="-I/usr/ccid/include/PCSC" PCSC_LIBS="-L/usr/ccid/lib/ -lpcsclite" --enable-usbdropdir="/usr/ccid/lib/pcsc/drivers" --enable-static --disable-libudev --disable-libsystemd

But if replacement to ubuntu local gcc, it give error:
./configure CC=/usr/bin/gcc --host=arm-fsl-linux prefix=/usr/ccid --enable-libusb LIBUSB_LIBS="-L/usr/ccid/install/lib -lusb-1.0" LIBUSB_CFLAGS="-I/usr/ccid/install/include/libusb-1.0" PCSC_CFLAGS="-I/usr/ccid/include/PCSC" PCSC_LIBS="-L/usr/ccid/lib/ -lpcsclite" --enable-usbdropdir="/usr/ccid/lib/pcsc/drivers" --enable-static --disable-libudev --disable-libsystemd

checking libusb.h usability... yes
checking libusb.h presence... yes
checking for libusb.h... yes
checking for libusb_init... configure: error: libusb not found, use ./configure LIBUSB_LIBS=...

root@ubuntu:/opt/software/package/test/PCSC# cat /usr/ccid/install/lib/pkgconfig/libusb-1.0.pc 
prefix=/usr/ccid/install
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libusb-1.0
Description: C API for USB device access from Linux, Mac OS X, Windows, OpenBSD/NetBSD and Solaris userspace
Version: 1.0.21
Libs: -L${libdir} -lusb-1.0
Libs.private: -lrt  -pthread
Cflags: -I${includedir}/libusb-1.0
root@ubuntu:/opt/software/package/test/PCSC# 

I don't understand the libusb already installed, and I do give the right path, but it still inform error

from pcsc.

LudovicRousseau avatar LudovicRousseau commented on August 25, 2024

I understand the problem.
pcsc-wirecheck-gen is cross compiled for ARM but is executed on the x86 system.

You can avoid the problem by creating an empty pcsc-wirecheck file.

from pcsc.

FeitianSmartcardReader avatar FeitianSmartcardReader commented on August 25, 2024

Add comments:
When I do install pcsc and I found it always give below error

checking for libusb_init... configure: error: libusb not found, use ./configure LIBUSB_LIBS=...

after check config.log, I saw there have error

/usr/ccid/lib/libusb-1.0.so: undefined reference to `clock_gettime'

To sovle this issue, will need do build with -lrt:

./configure CC=/opt/arm-2014.05/bin/arm-none-linux-gnueabi-gcc --host=arm-none-linux --prefix=/usr/ccid --prefix=/usr/ccid --enable-libusb LIBUSB_LIBS="-L/usr/ccid/lib/ -lusb-1.0 -lrt" LIBUSB_CFLAGS="-I/usr/ccid/include/libusb-1.0" PCSC_CFLAGS="-I/usr/ccid/include/PCSC" PCSC_LIBS="-L/usr/ccid/lib/ -lpcsclite" --enable-usbdropdir="/usr/ccid/lib/pcsc/drivers"

from pcsc.

LudovicRousseau avatar LudovicRousseau commented on August 25, 2024

The files pcsc-wirecheck-dist.c, pcsc-wirecheck-gen.c and pcsc-wirecheck-main.c are provide in the .tar.bz2 archive.
If you really want to use the source code from git and do cross-compilation you should generate the missing .c files first.

from pcsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.