List Info

Thread: OpenCT does not compile on Mac OS X




OpenCT does not compile on Mac OS X
user name
2008-03-15 15:28:07
Hello,

I just tried to built OpenCT on Mac OS X (Leopard).

The build fails with:
pcsc.c:38:24: error: ifdhandler.h: No such file or
directory

./configure said:
[...]
checking for PCSC_CFLAGS...
checking for PCSC_LIBS... -Wl,-framework,PCSC
checking for reader.h... no
configure: WARNING: reader.h not found, install pcsc-lite
1.2.9-beta8
or later, or use PCSC_CFLAGS=... ./configure
[...]
PC/SC support:       yes


- ifdhandler.h is _not_ provided by Apple
- ./configure check for reader.h but this file is not used
by any source file

I think that PC/SC support should be dropped when OpenCT is
compiled
on Mac OS X.

bye

-- 
 Dr. Ludovic Rousseau
_______________________________________________
opensc-devel mailing list
opensc-devellists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc
-devel

Re: OpenCT does not compile on Mac OS X
user name
2008-03-15 15:41:03
Please try my branch [1], I think I already solved this. the
reader.h
is not used and most other pcsc-lite checks are not
required.

Alon.

[1] http://www.o
pensc-project.org/svn/openct

On 3/15/08, Ludovic Rousseau <ludovic.rousseaugmail.com> wrote:
> Hello,
>
>  I just tried to built OpenCT on Mac OS X (Leopard).
>
>  The build fails with:
>  pcsc.c:38:24: error: ifdhandler.h: No such file or
directory
>
>  ./configure said:
>  [...]
>  checking for PCSC_CFLAGS...
>  checking for PCSC_LIBS... -Wl,-framework,PCSC
>  checking for reader.h... no
>  configure: WARNING: reader.h not found, install
pcsc-lite 1.2.9-beta8
>  or later, or use PCSC_CFLAGS=... ./configure
>  [...]
>  PC/SC support:       yes
>
>
>  - ifdhandler.h is _not_ provided by Apple
>  - ./configure check for reader.h but this file is not
used by any source file
>
>  I think that PC/SC support should be dropped when
OpenCT is compiled
>  on Mac OS X.
>
>  bye
>
>
>  --
>   Dr. Ludovic Rousseau
>  _______________________________________________
>  opensc-devel mailing list
>  opensc-devellists.opensc-project.org
>  http://www.opensc-project.org/mailman/listinfo/opensc
-devel
>
_______________________________________________
opensc-devel mailing list
opensc-devellists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc
-devel

Re: OpenCT does not compile on Mac OS X
user name
2008-03-16 15:45:28
On Sat, Mar 15, 2008 at 9:41 PM, Alon Bar-Lev
<alon.barlevgmail.com> wrote:
> Please try my branch [1], I think I already solved
this. the reader.h
>  is not used and most other pcsc-lite checks are not
required.

Compilation works after I apply patch in revision 1023
http://www.opensc-project.org/piper
mail/opensc-commits/2008-March/006783.html

-- 
 Dr. Ludovic Rousseau
_______________________________________________
opensc-devel mailing list
opensc-devellists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc
-devel

Re: OpenCT does not compile on Mac OS X
user name
2008-03-27 06:10:11
Am Sonntag, 23. März 2008 21:36:57 schrieb Bruno Harbulot:
> Perhaps the following question should be on the users
list...
> I was intending to try OpenCT on OSX to see if it could
handle an eToken
> in the same way as it makes it work on Linux. I can't
get it to work on
> OSX, but I'm not sure if it's because I haven't
configured it properly
> or if it's because it's not currently supported. By the
looks of
> src/ifd/sys-osx.c, it looks like none of the usb
functions are doing much.

openct usb code was written on linux with the nice linux usb
semantics:
open a device file, use ioctl for the usb functions, but
also use standard
mechanism like poll() / select() to see if the file
descriptor is ok (i.e. 
find out when the device was removed). BSD also works with
this - nice.

but mac os X has - to my knowledge - only a strange library
that doesn't
offer equivalent functionality. AFAIK we can't implement the
same 
functionality we use on linux and BSD with mac os X usb
library api,
without redesigning openct. but I might be wrong. if you
know mac os X
well, maybe you can have a look at that usb library API it
offers, and see
if you can implement the same functions we have on linux?

if the linux code doesn't make sence, I can help with
explaining what it does,
so you can port the functionality.

the ifdhandler main loop will need some changes too:
currently it assumes
to have an array of file descriptor and find out if a device
was removed via
select/poll with errors. on mac os X there is no file
descriptor, thus this 
needs some change.

finally: linux has hot plugging -> we don't need to
monitor the usb or scan it 
all the time. instead the kernel knows when a new device is
attached, and
using a chain of userspace tools the openct map file with
vendor/product or 
usb device class info is consulted. if it matches the
openct-control tool is 
run with information about the device and its
identification.

I have no clue if some tool on mac os X can tell openct:
hey, here is this new 
device and it has that vendor and product id. on linux
"this new device" is 
the filename of the usb device file - such as
/proc/bus/usb/005/010 
or /dev/bus/usb/005/010. on linux the information about the
files openct
can handle is for hotplug: the map file, for udev the rule
file or for hald 
the fdi file. if you have a similar mechanism for mac os X,
I guess you need
to implement a similar file for that mechanism, a script
that gets information
from that mechanism and runs openct-control with the right
parameters,
and in sys-osx.c implement something that looks at the
device string
and uses the api to connect to the right device.

I have no clue if implementing this is hard or not, but I
have no mac os X 
knowledge, no machine, and I'm not interested in it myself.
so this waits
for someone to have a look.

if you look for a working solution without any work,
checkout pcsc-lite and
ccid driver by ludovic rousseau. mac os X includes both, but
you might want
to use the latest version from the author instead because of
some bugs in
the version apple put into mac os X - ludovic can tell you
more about it.

good luck. Regards, Andreas
_______________________________________________
opensc-devel mailing list
opensc-devellists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc
-devel

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )