stoken-dev / stoken

RSA SecurID-compatible software token for Linux/UNIX systems
http://stoken.sf.net
GNU Lesser General Public License v2.1
411 stars 78 forks source link

Added missing functions and other updates to compile in win32 #15

Closed nmav closed 9 years ago

nmav commented 10 years ago

Signed-off-by: Nikos Mavrogiannopoulos nmav@gnutls.org

cernekee commented 9 years ago

Hmm, this wound up to be a more complicated project than I expected. I assume you're just building libstoken-1.dll for now, not the CLI or GUI?

I split up your changes and merged them into my -next branch, then fixed a couple of other random things, but I still see the following roadblocks:

BTW, I did all of my testing with the MinGW cross compiler on Fedora 20, as David Woodhouse suggested a few months back. Is that the same setup you're using?

nmav commented 9 years ago

Indeed, it is only the .dll I was interested to for openconnect-gui. I use the f21 mingw packages (to get CNG), but essencially that's the setup I use.

cernekee commented 9 years ago

OK. I've made a few more changes to get the CLI/GUI building (if not running terribly well).

How do you figure out which DLL files to copy from /usr/i686-w64-mingw32/sys-root/mingw/bin into your Windows package? Is there a tool that walks the dependency chain, does qtcreator do it automatically, or is it a manual process?

nmav commented 9 years ago

To find the dependencies I use: objdump -p filename | grep DLL

I try to have only "libgcc_s_sjlj-1.dll" as a dependency. (it's a manual process for me at least)

cernekee commented 9 years ago

I try to have only "libgcc_s_sjlj-1.dll" as a dependency.

Hmm, so for stoken this would entail linking statically with libxml2, nettle, gmp, gtk+ (and its web of dependencies), etc.?

nmav commented 9 years ago

Indeed.

cernekee commented 9 years ago

This is ugly (especially the DLL blacklist) but it's probably good enough for now: https://github.com/cernekee/stoken/commit/43c8e5f6931018459a72e5046348e95eb2e20339

Perhaps we can find somebody to "adopt" the Windows build and implement something better...

If you have any thoughts on how to implement CI for the Fedora-MinGW build, they would be appreciated. I don't know of any way to do this on Travis since they use Ubuntu.

cernekee commented 9 years ago

This was included in stoken v0.8.