Hi Folks,

I'm trying to build OpenSC for the 64-bit Sparcv9 target on Solaris 10,
and am running into various issues.

Before diving into details, is there a good instruction guide for
selecting 64-bit sparcv9 when running configure?

Here's my story (so far):

Not knowing better, I just tried the obvious approach of doing an
'export CFLAGS="-m64"' before running ./configure.  This worked until
getting a link error against libltdl.  On my Solaris system, libltdl is
installed at /opt/csw/share/libtool for the source and /opt/csw/lib for
the library (libltdl.so).  Unfortunately, the Blastwave libtool package
seems to only install a 32-bit version of the libltdl.so library, so I
went ahead and reconfigured the source at /opt/csw/share/libtool to
build a 64-bit target (by again setting CFLAGS="-m64" before running
./configure).

After that, I was able to point the LTLIB environment variables at the
new ltdl setup.

export LTLIB_LIBS="-L/new/ltdl/lib/path -lltdl"
export LTLIB_CFLAGS="-I/opt/csw/share/libtool/libltdl"
export CFLAGS="-m64"
./configure

This seemed to work okay, but when I attempted to run the pkcs11-spy.so
library, I got a 32-bit link error.  Here's the ldd of pkcs11-spy.so:

$ ldd libtest.so
        libssl.so.0.9.7 =>       /usr/sfw/lib/libssl.so.0.9.7  - wrong
ELF class: ELFCLASS32
        libcrypto.so.0.9.7 =>    /usr/sfw/lib/libcrypto.so.0.9.7  -
wrong ELF class: ELFCLASS32
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libltdl.so.3 =>  /usr/local/lib/libltdl.so.3
        libdl.so.1 =>    /lib/64/libdl.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libresolv.so.2 =>        /lib/64/libresolv.so.2
        libc.so.1 =>     /lib/64/libc.so.1
        libgcc_s.so.1 =>         /usr/sfw/lib/libgcc_s.so.1  - wrong ELF
class: ELFCLASS32
        libmp.so.2 =>    /lib/64/libmp.so.2
        libmd.so.1 =>    /lib/64/libmd.so.1
        libscf.so.1 =>   /lib/64/libscf.so.1
        libgcc_s.so.1 =>         /usr/sfw/lib/libgcc_s.so.1  - wrong ELF
class: ELFCLASS32
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        libgen.so.1 =>   /lib/64/libgen.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        /platform/SUNW,Sun-Fire-V210/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,Sun-Fire-V210/lib/sparcv9/libmd_psr.so.1


The problem appears to be the /usr/sfw/lib stuff.  If the system instead
chose to link against the /usr/sfw/lib/sparcv9 libraries, then it would
work.  I'm going to try to hack that in tomorrow, but would appreciate
any pointers to past experience with getting 64-bit sparcv9 working!

-- 
Thanks!
Matt Ball, Staff Engineer, Sun Microsystems, Inc.
500 Eldorado Blvd, Bldg 5, Broomfield, CO 80021
Office: 303-272-7580  Cell: 303-717-2717  Fax: 303-272-3023

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to