A couple of things I see:

You are using the pcsc provided by Sun. I compiled the pcsc-lite-1.5.3
and made sure it found its include and lib. My --prefix for all of the
packages was /opt/smartcard. configure, make, install each
into /opt/smartcard in this order: pcsc-lite, ccid, opensc, libp11,
engine_plcs11.

I had not tried the Sun pcsc. I am using an Ultra 25, not a SunRay,
and am using an external reader USB reader.  It might work.


Marc Rios Valles wrote:
> Hi Douglas,
> 
> 
> This is my configure output:
> 
> 
> ./configure --enable-pcsc

I used:
../src/configure --prefix=/opt/smartcard --disable-rpath 
--with-openssl=/usr/sfw \
    --enable-pcsc --with-pcsclite=/opt/smartcard \
    --with-pcsc-provider=/opt/smartcard/lib/libpcsclite.so.1 --disable-ldap \
    --disable-doc 
--with-xsl-stylesheetsdir=/usr/share/sgml/docbook/xsl-stylesheets


> checking for a BSD-compatible install... /opt/sfw/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /opt/sfw/bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking build system type... sparc-sun-solaris2.10
> checking host system type... sparc-sun-solaris2.10
> checking for gcc... cc

Its not using gcc but cc. What cc did it find?
Is it the SUNWspro version?
  in mine, it says: checking for gcc... gcc


> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... no

  Its not GCC.
Mine says:
checking whether we are using the GNU C compiler... yes
and all the lines following where that says "cc" mine says "gcc"
  I force GCC with:
     export CC=gcc
  and
     PATH=...:/usr/sfw/bin:...:/usr/ccs/bin:...


> checking whether cc accepts -g... yes
> checking for cc option to accept ISO C89... none needed
> checking for style of include used by make... GNU
> checking dependency style of cc... none
> checking for pkg-config... /usr/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking how to run the C preprocessor... cc -E
> checking for grep that handles long lines and -e... /usr/sfw/bin/ggrep
> checking for egrep... /usr/sfw/bin/ggrep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking whether byte ordering is bigendian... yes
> checking svn checkout... no
> checking how to run the C preprocessor... cc -E
> checking for a BSD-compatible install... /opt/sfw/bin/install -c
> checking whether ln -s works... yes
> checking for a thread-safe mkdir -p... /opt/sfw/bin/mkdir -p
> checking for a sed that does not truncate output... /opt/sfw/bin/sed
> checking whether make sets $(MAKE)... (cached) yes
> checking for a sed that does not truncate output... (cached) 
> /opt/sfw/bin/sed
> checking for fgrep... /usr/sfw/bin/ggrep -F
> checking for non-GNU ld... /usr/ccs/bin/ld
> checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
> checking for BSD- or MS-compatible name lister (nm)... /usr/ccs/bin/nm -p
> checking the name lister (/usr/ccs/bin/nm -p) interface... BSD nm
> checking the maximum length of command line arguments... 786240
> checking whether the shell understands some XSI constructs... yes
> checking whether the shell understands "+="... no
> checking for /usr/ccs/bin/ld option to reload object files... -r
> checking for objdump... no
> checking how to recognize dependent libraries... pass_all
> checking for ar... ar
> checking for strip... strip
> checking for ranlib... ranlib
> checking command to parse /usr/ccs/bin/nm -p output from cc object... ok
> checking for dlfcn.h... yes
> checking for objdir... .libs
> checking for cc option to produce PIC... -KPIC -DPIC
> checking if cc PIC flag -KPIC -DPIC works... yes
> checking if cc static flag -Bstatic works... no
> checking if cc supports -c -o file.o... yes
> checking if cc supports -c -o file.o... (cached) yes
> checking whether the cc linker (/usr/ccs/bin/ld) supports shared 
> libraries... yes
> checking dynamic linker characteristics... solaris2.10 ld.so
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... no
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... yes
> checking for windres... no
> checking for xsltproc... xsltproc
> checking for svn... svn
> checking for wget... wget
> checking for tr... tr
> checking xsl-stylesheets... /usr/share/sgml/docbook/xsl-stylesheets
> checking for inline... inline
> checking for ANSI C header files... (cached) yes
> checking for sys/wait.h that is POSIX.1 compatible... yes
> checking errno.h usability... yes
> checking errno.h presence... yes
> checking for errno.h... yes
> checking fcntl.h usability... yes
> checking fcntl.h presence... yes
> checking for fcntl.h... yes
> checking malloc.h usability... yes
> checking malloc.h presence... yes
> checking for malloc.h... yes
> checking for stdlib.h... (cached) yes
> checking for inttypes.h... (cached) yes
> checking for string.h... (cached) yes
> checking for strings.h... (cached) yes
> checking sys/time.h usability... yes
> checking sys/time.h presence... yes
> checking for sys/time.h... yes
> checking for unistd.h... (cached) yes
> checking locale.h usability... yes
> checking locale.h presence... yes
> checking for locale.h... yes
> checking getopt.h usability... yes
> checking getopt.h presence... yes
> checking for getopt.h... yes
> checking for an ANSI C-conforming const... yes
> checking for uid_t in sys/types.h... yes
> checking for size_t... yes
> checking whether time.h and sys/time.h may both be included... yes
> checking for error_at_line... no
> checking whether lstat dereferences a symlink specified with a trailing 
> slash... yes
> checking whether stat accepts an empty string... no
> checking for vprintf... yes
> checking for _doprnt... yes
> checking for getpass... yes
> checking for gettimeofday... yes
> checking for memset... yes
> checking for mkdir... yes
> checking for strdup... yes
> checking for strerror... yes
> checking for setutent... yes
> checking for vsyslog... yes
> checking for setlocale... yes
> checking for getopt_long... yes
> checking for strlcpy... yes
> checking for socket in -lsocket... yes
> checking for res_query in -lresolv... yes
> checking for lt_dlopen in -lltdl... yes
> checking ltdl.h usability... yes
> checking ltdl.h presence... yes
> checking for ltdl.h... yes
> checking for pthread_join in LIBS= with CFLAGS=-pthreads... no
> checking whether pthreads work with -pthreads... no
> checking for the pthreads library -lpthread... yes
> checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
> checking if more special flags are required for pthreads... -D_REENTRANT
> checking for xlc_r... no
> checking for cc_r... no
> checking for inflate in -lz... yes
> checking zlib.h usability... yes
> checking zlib.h presence... yes
> checking for zlib.h... yes
> checking for readline in -lreadline... no
> checking for readline in -lreadline... yes
> checking readline/readline.h usability... yes
> checking readline/readline.h presence... yes
> checking for readline/readline.h... yes
> checking if iconv library available within libc... yes
> checking iconv.h usability... yes
> checking iconv.h presence... yes
> checking for iconv.h... yes
> checking for OPENSSL... yes
> checking for PCSC... yes
> checking winscard.h usability... yes
> checking winscard.h presence... yes
> checking for winscard.h... yes
> checking for libassuan-config... no
> checking for LIBASSUAN - version >= 0.9.2... no
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating doc/Makefile
> config.status: creating doc/nonpersistent/Makefile
> config.status: creating etc/Makefile
> config.status: creating src/Makefile
> config.status: creating src/common/Makefile
> config.status: creating src/include/Makefile
> config.status: creating src/include/winconfig.h
> config.status: creating src/include/opensc/Makefile
> config.status: creating src/libopensc/Makefile
> config.status: creating src/libopensc/opensc-config
> config.status: creating src/libopensc/libopensc.pc
> config.status: creating src/libopensc/libpkcs15init.pc
> config.status: creating src/libopensc/libscconf.pc
> config.status: creating src/openssh/Makefile
> config.status: creating src/pkcs11/Makefile
> config.status: creating src/pkcs15init/Makefile
> config.status: creating src/scconf/Makefile
> config.status: creating src/signer/Makefile
> config.status: creating src/signer/npinclude/Makefile
> config.status: creating src/tests/Makefile
> config.status: creating src/tests/regression/Makefile
> config.status: creating src/tools/Makefile
> config.status: creating win32/Makefile
> config.status: creating win32/versioninfo.rc.in
> config.status: creating config.h
> config.status: executing depfiles commands
> config.status: executing libtool commands
> 
> 
> OpenSC has been configured with the following options:
> 
> 
> 
> Version: 0.11.8
> User binaries: /usr/local/bin
> Configuration files: /usr/local/etc
> XSL stylesheets: /usr/share/sgml/docbook/xsl-stylesheets
> 
> 
> man support: yes
> doc support: no
> zlib support: yes
> readline support: yes
> iconv support: yes
> OpenSSL support: yes
> PC/SC support: yes
> OpenCT support: no
> NSPlugin support: no
> 
> 
> PC/SC default provider: /usr/lib/libpcsclite.so

This is the Sun version of pcsc.

  > pinentry: /usr/bin/gpinentry
> 
> 
> Host: sparc-sun-solaris2.10
> Compiler: cc
> Preprocessor flags: -I/usr/include -I/usr/sfw/include -I/opt/sfw/include 
> -I/opt/libassuan/include -I/usr/include/smartcard -D_TS_ERRNO 
> -I/usr/local/include
> Compiler flags: -I/usr/include -I/usr/sfw/include -I/opt/sfw/include 
> -I/opt/libassuan/include -I/usr/include/smartcard -D_TS_ERRNO
> Linker flags: -L/usr/lib -R/usr/lib -L/usr/local/lib -R/usr/local/lib 
> -L/usr/sfw/lib -R/usr/sfw/lib -L/opt/sfw/lib -L/opt/libassuan/lib 
> -R/opt/libassuan/lib -L/usr/include/smartcard/ -lintl -R/usr/ucblib/ 
> -I/usr/ucblib/ -K PIC -L/usr/local/lib -R/usr/local/lib
> Libraries: -lsocket -lresolv
> 
> 
> LTLIB_CFLAGS:
> LTLIB_LIBS: -lltdl
> READLINE_CFLAGS:
> READLINE_LIBS: -lreadline -lncurses
> ZLIB_CFLAGS:
> ZLIB_LIBS: -lz
> ICONV_CFLAGS:
> ICONV_LIBS:
> OPENSSL_CFLAGS: -I/usr/sfw/include
> OPENSSL_LIBS: -L/usr/sfw/lib -R/usr/sfw/lib -lssl -lcrypto -lsocket 
> -lnsl -ldl
> OPENCT_CFLAGS:
> OPENCT_LIBS:
> PCSC_CFLAGS: -D_REENTRANT 
> -I/net/sunray-ps1.sfbay/data/vol01/sunray/pcsclite/1.1/build/07/proto/sparc/usr/include/smartcard/PCSC

Do the includes defined here match the /usr/lib/libpcsclite.so ?


> LIBASSUAN_CFLAGS:
> LIBASSUAN_LIBS:
> 
> 
> 
> As I said, I have no problem compiling it, but when installing (make 
> install) I get all that errors.
> 
> The hanging command is only when I put the -G argument to gcc. This is 
> the command:
> 

Configure above says you are using the cc compiler, I am nit sure if this
is a test, or why it says gcc here.

> 
> configure:3158: gcc -I/usr/include -I/usr/sfw/include -I/opt/sfw/include 
> -I/opt/libassuan/include -I/usr/include/smartcard -D_TS_ERRNO -G 
> -I/usr/include -I/usr/sfw/include -I/opt/sfw/include 
> -I/opt/libassuan/include -I/usr/include/smartcard -D_TS_ERRNO -L/usr/lib 
> -R/usr/lib -L/usr/local/lib -R/usr/local/lib -L/usr/sfw/lib 
> -R/usr/sfw/lib -L/opt/sfw/lib -L/opt/libassuan/lib -R/opt/libassuan/lib 
> -L/usr/include/smartcard/ -lintl -R/usr/ucblib/ -I/usr/ucblib/ 
> conftest.c >&5
> configure:3162: $? = 0
> configure:3200: result: a.out
> configure:3219: checking whether the C compiler works
> configure:3229: ./a.out
> 
> 
> 
> My libs are in /usr/include/smartcard because are the libraries that 
> solaris has to work with the sunray Readers. You can check it here: 
> http://www.sun-rays.org/srss.html#pc_sc-lite-1.1
> 
> Can You send me the packages you have compiled?

No. It was not built against the same pcsc and would not support the Sun Ray
reader as it uses the includes and libs from the pcsc-lite-1.5.3.

> 
> 
> Thanks
> 
> 
> -- 
> Marc Rios Vallès
> [email protected]
> 
> 
> C3PO, S.A.
> http://www.c3po.es
> C/ Alejandro Goicoechea, 6 Local 9 - 08960 St. Just Desvern, Barcelona
> Tel. 93 417 99 55 - Fax 93 253 12 80
> 
>  > As a test, I rebuilt pcsc-lite-1.5.3, ccid-1.3.10, opensc-0.11.8,
>  > libp11-0.2.4, engine_pkcs11-0.1.5 on Solaris 10 using /usr/sfw/bin/gcc.
>  >
>  > I was able to get pkcs11-tool to read the objects off the card, using
>  > a GemPC Twin USC reader.
>  >
>  > So if you have the configure output of the pcsc-lite and ccid
>  > I would be willing to take a look at them.
>  >
>  > Marc Rios Valles wrote:
>  > > Hi Douglas
>  > >
>  > > > Marc Rios Valles wrote:
>  > > > > Hi to everybody,
>  > > > >
>  > > > >
>  > > > > I'm trying to compile OpenSC in Solaris 10-SPARC and I'm having 
> lots
>  > > > > of trouble in the make install script.
>  > > >
>  > > > I have used the Sun provided gcc and openssl in /usr/sfw/
>  > > >
>  > > > CC=gcc
>  > > > CFLAGS=-g
>  > > > CPPFLAGS="-DDEBUG 
> -I/afs/anl.gov/appl/libtool-1.5.14/sun4x_510/include
>  > > > -D_TS_ERRNO" LDFLAGS="-g -R/opt/smartcard/lib -R/usr/sfw/lib
>  > > > -L/afs/anl.gov/appl/libtool-1.5.14/sun4x_510/lib"
>  > > > OPENSSL_CFLAGS="-I/usr/sfw/include"
>  > > > LD_LIBRARY_PATH="/opt/smartcard/lib:/usr/sfw/lib:"
>  > > > PKG_CONFIG_PATH="/opt/smartcard/lib/pkgconfig"
>  > > > PTHREAD_CFLAGS="-pthreads"
>  > >
>  > > I don't have any /afs directory. I'm using libtool from sunfreeware.com
>  > > I don't have either /opt/smartcard. I am using the libraries 
> provided by
>  > > sun and are installed at /usr/lib.
>  > >
>  > > > export PTHREAD_CFLAGS
>  > > > export OPENSSL_LIBS OPENSSL_CFLAGS
>  > > > export CC CFLAGS CPPFLAGS LDFLAGS
>  > > >
>  > > > ../src/configure --prefix=/opt/smartcard \
>  > > > --disable-rpath \
>  > > > --with-openssl=/usr/sfw \
>  > > > --enable-pcsc \
>  > > > --with-pcsclite=/opt/smartcard \
>  > > > --with-pcsc-provider=/opt/smartcard/lib/libpcsclite.so.1 \
>  > > > --disable-ldap \
>  > > > --disable-doc \
>  > > > --with-xsl-stylesheetsdir=/usr/share/sgml/docbook/xsl-stylesheets
>  > > >
>  > > > > I compile it with this flags:
>  > > > >
>  > > > >
>  > > > > export
>  > >
>  > > 
> PATH=/opt/SUNWspro/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/sfw/bin:/us
>  > >
>  > > > >r/ccs/bin:/opt/sfw/bin:/usr/ucb:$PATH
>  > > > >
>  > > > >
>  > > > > export CFLAGS="-I/usr/include -I/usr/sfw/include -I/opt/sfw/include
>  > > > > -I/opt/libassuan/include -I/usr/include/smartcard"
>  > > >
>  > > > I was using pcsclite compile, so did not use /usr/include/smartcard
>  > > > What is libassuan?
>  > >
>  > > Libassuan is a library to show a window to get the PIN from some cards.
>  > > Don't worry for this. This library uses pinentry to work.
>  > >
>  > > > > export LDFLAGS="-L/usr/lib -R/usr/lib -L/usr/local/lib
>  > > > > -R/usr/local/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/opt/sfw/lib
>  > > > > -L/opt/libassuan/lib -R/opt/libassuan/lib -L/usr/include/smartcard/
>  > > > > -lintl -R/usr/ucblib/ -I/usr/ucblib/ "
>  > > >
>  > > > Why do you need /usr/ucblib? \
>  > >
>  > > If I don't include /usr/ucblib the compiler showed an error so I 
> include
>  > > it here.
>  > >
>  > > > > export LIBUSB_CFLAGS="-I/usr/sfw/include"
>  > > > >
>  > > > >
>  > > > > export LIBUSB_LIBS="-I/usr/sfw/lib -R/usr/sfw/lib -lusb"
>  > > > >
>  > > > >
>  > > > > export OPENSSL_CFLAGS="-I/usr/sfw/include"
>  > > > >
>  > > > >
>  > > > > export OPENSSL_LIBS="-L/usr/sfw/lib -R/usr/sfw/lib -lssl -lcrypto
>  > > > > -lsocket -lnsl -ldl"
>  > > > >
>  > > > >
>  > > > > export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig
>  > > > >
>  > > > >
>  > > > > export CC=cc
>  > > > >
>  > > > >
>  > > > > export CXX=CCd
>  > > > >
>  > > > >
>  > > > > I have tried lots of different things like put -fPIC in CFLAGS and
>  > > > > LDFLAGS and I always get this error:
>  > > > > Text relocation remains referenced
>  > > > > against symbol offset in file
>  > > > > <unknown> 0x1460 /usr/lib/libopensc.a(sc.o)
>  > > > > <unknown> 0x1464 /usr/lib/libopensc.a(sc.o)
>  > > > > <unknown> 0x1468 /usr/lib/libopensc.a(sc.o)
>  > > > > <unknown> 0xa7c /usr/lib/libopensc.a(asn1.o)
>  > > > > <unknown> 0xa80 /usr/lib/libopensc.a(asn1.o)
>  > > > > <unknown> 0xa84 /usr/lib/libopensc.a(asn1.o)
>  > > > > <unknown> 0xa88 /usr/lib/libopensc.a(asn1.o)
>  > > > > <unknown> 0xa8c /usr/lib/libopensc.a(asn1.o)
>  > > > > <unknown> 0x2e44 /usr/lib/libopensc.a(asn1.o)
>  > > > > <unknown> 0x2e48 /usr/lib/libopensc.a(asn1.o)
>  > > > > <unknown> 0x2e4c /usr/lib/libopensc.a(asn1.o)
>  > > > > ...
>  > > > > __iob 0x80c /usr/lib/libopensc.a(ui.o)
>  > > > > __iob 0x8ac /usr/lib/libopensc.a(ui.o)
>  > > > > __iob 0x8b0 /usr/lib/libopensc.a(ui.o)
>  > > > > __iob 0x8c8 /usr/lib/libopensc.a(ui.o)
>  > > > > __iob 0x8cc /usr/lib/libopensc.a(ui.o)
>  > > > > read 0x34f0 /usr/lib/libopensc.a(card-piv.o)
>  > > > > fread 0x37c /usr/lib/libopensc.a(pkcs15-cache.o)
>  > > > > fflush 0xb14 /usr/lib/libopensc.a(ui.o)
>  > > > > uncompress 0x10d8 /usr/lib/libopensc.a(pkcs15-infocamere.o)
>  > > > > uncompress 0x6b8 /usr/lib/libopensc.a(pkcs15-actalis.o)
>  > > > > uncompress 0x248 /usr/lib/libopensc.a(compression.o)
>  > > > > inflateEnd 0x1a4 /usr/lib/libopensc.a(compression.o)
>  > > > > inflateEnd 0x1c4 /usr/lib/libopensc.a(compression.o)
>  > > > > inflateEnd 0x4e0 /usr/lib/libopensc.a(compression.o)
>  > > > > inflate 0x18c /usr/lib/libopensc.a(compression.o)
>  > > > > inflate 0x418 /usr/lib/libopensc.a(compression.o)
>  > > > > inflateInit2_ 0x15c /usr/lib/libopensc.a(compression.o)
>  > > > > inflateInit2_ 0x380 /usr/lib/libopensc.a(compression.o)
>  > > > > ld: fatal: relocations remain against allocatable but non-writable
>  > > > > sections
>  > > > >
>  > > > >
>  > > > >
>  > > > > To compile I'm using the solaris folder inside opensc. I'm trying
>  > > > > opensc-0.11.7 but opensc-0.11.8 gets the same error.
>  > > > >
>  > > > >
>  > > > >
>  > > > > I have read the I should pass -G to gcc but this provokes that gcc
>  > > > > gets hanged at configure.
>  > > >
>  > > > What hangs? Which gcc?
>  > >
>  > > gcc hangs when is doing the test of compilation.
>  > > -bash-3.00$ gcc -v
>  > > Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
>  > > Configured with:
>  > > /gates/sfw10/builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
>  > > --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
>  > > --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
>  > > --enable-shared
>  > > Thread model: posix
>  > > gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
>  > >
>  > > > > Any idea?? Does anybody have opensc compiled for solaris 10-SPARC?
>  > >
>  > > If I use your flags It shows the same error... Could you send me a
>  > > package from opensc 0.11.8 for SPARC? It will help me a lot!!!
>  > >
>  > >
>  > > Many thanks for all!
>  > >
>  > > > > Thanks
>  > > > > --
>  > > > > Marc Rios Vallès
>  > > > > [email protected]
>  > > > >
>  > > > >
>  > > > > C3PO, S.A.
>  > > > > http://www.c3po.es
>  > > > > C/ Alejandro Goicoechea, 6 Local 9 - 08960 St. Just Desvern,
>  > > > > Barcelona Tel. 93 417 99 55 - Fax 93 253 12 80
>  > >
>  > > 
> ------------------------------------------------------------------------
>  > >
>  > > > > _______________________________________________
>  > > > > opensc-devel mailing list
>  > > > > [email protected]
>  > > > > http://www.opensc-project.org/mailman/listinfo/opensc-devel
>  > >
>  > > --
>  > > Marc Rios Vallès
>  > > [email protected]
>  > >
>  > >
>  > > C3PO, S.A.
>  > > http://www.c3po.es
>  > > C/ Alejandro Goicoechea, 6 Local 9 - 08960 St. Just Desvern, Barcelona
>  > > Tel. 93 417 99 55 - Fax 93 253 12 80

-- 

  Douglas E. Engert  <[email protected]>
  Argonne National Laboratory
  9700 South Cass Avenue
  Argonne, Illinois  60439
  (630) 252-5444
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to