Re: Cool-Key on Solaris

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/ 5/10 03:27 PM, Wan-Teh Chang wrote:
On Thu, Mar 4, 2010 at 8:13 PM, Kevin Reinholz<kreinholz@xxxxxxxxx>  wrote:
  g++ -shared -nostdlib -Wl,-M -Wl,.libs/libcoolkeypk11.so.exp -o
.libs/libcoolkeypk11.so /usr/lib/crti.o /usr/lib/values-Xa.o
/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/crtbegin.o
  .libs/libcoolkeypk11_la-coolkey.o .libs/libcoolkeypk11_la-dllmain.o
.libs/libcoolkeypk11_la-locking.o .libs/libcoolkeypk11_la-log.o
.libs/libcoolkeypk11_la-machdep.o .libs/libcoolkeypk11_la-object.o
.libs/libcoolkeypk11_la-PKCS11Exception.o .libs/libcoolkeypk11_la-slot.o
  -Wl,-R -Wl,/usr/local/lib -Wl,-R -Wl,/usr/sfw/lib -L/usr/local/lib
-lckyapplet -ldl -lz -L/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3
-L/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/../../.. -L/usr/sfw/lib
-lstdc++ -lm -lgcc_s /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/crtend.o
/usr/lib/crtn.o
This is the command-line that links libs/libcoolkeypk11.so.
It uses the compiler (g++) to link, which is good.
However, it uses -nostdlib and has a bunch of .o files with
"crt" in their names.  I am not familiar with them.  Sorry...
I would try removing those as well as -lstdc++ and -lgcc_s
from the command line.

Wan-Teh
I tried the following from the src/coolkey subdirectory:

touch .libs/libcoolkeypk11.so.exp

g++ -shared -Wl,-M -Wl,.libs/libcoolkeypk11.so.exp -o .libs/libcoolkeypk11.so .libs/libcoolkeypk11_la-coolkey.o .libs/libcoolkeypk11_la-dllmain.o .libs/libcoolkeypk11_la-locking.o .libs/libcoolkeypk11_la-log.o .libs/libcoolkeypk11_la-machdep.o .libs/libcoolkeypk11_la-object.o .libs/libcoolkeypk11_la-PKCS11Exception.o .libs/libcoolkeypk11_la-slot.o -Wl,-R -Wl,/usr/local/lib -Wl,-R -Wl,/usr/sfw/lib -L/usr/local/lib -lckyapplet -ldl -lz -L/usr/lib -lm -lgcc_s

ldd on the resulting libcoolkeypk11.so shows:

reinholz@etrenank:~/Download/coolkey-1.1.0/src/coolkey$ ldd .libs/libcoolkeypk11.so
    libckyapplet.so.1 =>     /usr/local/lib/libckyapplet.so.1
    libdl.so.1 =>     /lib/libdl.so.1
    libz.so.1 =>     /lib/libz.so.1
    libgcc_s.so.1 =>     /usr/lib/libgcc_s.so.1
    libstdc++.so.6 =>     /usr/lib/libstdc++.so.6
    libm.so.2 =>     /lib/libm.so.2
    libc.so.1 =>     /lib/libc.so.1

ld reveals the same error I got when allowing gcc to build libcoolkeypk11.so automatically:

reinholz@etrenank:~/Download/coolkey-1.1.0/src/coolkey$ ld .libs/libcoolkeypk11.so
ld: warning: cannot find entry symbol _start; not setting start address

I'm not sure why gcc isn't detecting the proper crt* file libcoolkeypk11.so needs to run...or maybe that's not the problem...

reinholz@etrenank:~/Download/coolkey-1.1.0/src/coolkey$ ld /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/crtbegin.o
ld: warning: cannot find entry symbol _start; defaulting to 000000000804807c

I get similar errors when pointing ld at crti.o and crtn.o installed in /usr/lib

That makes me wonder if there's an issue with the _start symbol on the OpenSolaris gcc3 and gcc-4.3.2 packages. (I reproduced the same errors regardless of which version of gcc I used to build and link coolkey).

I'm at a loss...

_______________________________________________
Coolkey-devel mailing list
Coolkey-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/coolkey-devel

[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Women]

  Powered by Linux