aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-26 19:44:25 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-26 21:10:32 -0400
commit64a34883b2d3f32631621a29163eeb86ccd2cced (patch)
tree3e0a68022f99e3e5bee97c0b045f0c100f4355e0
parent6194258bdd7cb37fefac87f409f6ebcd84d6406a (diff)
progress on XMPP for windows, but not linking yet
-rw-r--r--doc/todo/windows_support.mdwn83
1 files changed, 57 insertions, 26 deletions
diff --git a/doc/todo/windows_support.mdwn b/doc/todo/windows_support.mdwn
index 67dfc970c..75744bdb2 100644
--- a/doc/todo/windows_support.mdwn
+++ b/doc/todo/windows_support.mdwn
@@ -8,32 +8,7 @@ now! --[[Joey]]
or perhaps easier,
<http://hackage.haskell.org/package/Win32-services-wrapper>
-* XMPP library not yet built.
-
- This should work to install the deps, using libs from cygwin
-
-<pre>
-cabal install libxml-sax --extra-lib-dirs=C:\\cygwin\\lib --extra-include-dirs=C:\\cygwin\\usr\\include\\libxml2
-cabal install gnuidn --extra-lib-dirs=C:\\cygwin\\lib --extra-include-dirs=C:\\cygwin\\usr\\include\\
-cabal install gnutls --extra-lib-dirs=C:\\cygwin\\lib --extra-include-dirs=C:\\cygwin\\usr\\include\\
-</pre>
-
- While the 1st line works, the rest fail oddly. Looks like lack of
- quoting when cabal runs c2hs. This can be worked around by
- unpacking the tarball, manually running c2hs, and deleting the .chs
- files.
-
- However, then it fails:
-
-<pre>
-Building gnuidn-0.2.1...
-Preprocessing library gnuidn-0.2.1...
-[1 of 4] Compiling Data.Text.IDN.Internal ( lib\Data\Text\IDN\Internal.hs, dist\build\Data\Text\IDN\Internal.o )
-C:/Program Files/Haskell Platform/2013.2.0.0/mingw/bin/../lib/libmingw32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain@16'
-</pre>
-
- Also needs gsasl, which is not in cygwin.
- See <http://josefsson.org/gsasl4win/README.html>
+* XMPP library not yet built. (See below.)
* View debug log is empty in windows -- all logs go to console.
This messes up a few parts of UI that direct user to the debug log.
@@ -71,3 +46,59 @@ C:/Program Files/Haskell Platform/2013.2.0.0/mingw/bin/../lib/libmingw32.a(main.
* test that adding a repo on a removable drive works; that git is synced to
it and files can be transferred to it and back
* Does stopping in progress transfers work in the webapp?
+
+## trying to build XMPP
+
+ Trying to install the deps, using libs from cygwin. Cabal can be used
+ with some hacking:
+
+ cabal unpack libxml-sax
+ cd libxml-sax-*
+ cabal configure --extra-lib-dirs=C:\\cygwin\\lib --extra-include-dirs=C:\\cygwin\\usr\\include\\libxml2
+ cabal build || true
+ cabal copy
+ cabal register
+
+ cabal unpack gnutls
+ cd gnutls-*
+ cabal configure --extra-lib-dirs=C:\\cygwin\\lib --extra-include-dirs=C:\\cygwin\\usr\\include\\
+ cabal build || true
+ cabal copy
+ cabal register
+
+ # get mingw x86 gasal zip from <ftp://alpha.gnu.org/gnu/gsasl/> and unpack
+ # into the Haskell platform's mingw directory.
+ cabal unpack gsasl
+ cd gsasl-*
+ cabal configure --extra-lib-dirs=C:\\cygwin\\lib --extra-include-dirs=C:\\cygwin\\usr\\include\\
+ cabal build || true
+ cabal copy
+ cabal register --gen-pkg-config
+ grep -v /home/jas gsasl*.conf > hacked.conf
+ ghc-pkg update hacked.conf --global --user --force
+
+ Cannot get haskell gnuidn binding to link. Workaround: It's not hard to hack
+ network-client-xmpp to not use gnuidn.
+
+ dlls don't get found when building git-annex,
+ at TH link time. Worked around by copying /usr/bin/cyggnutls-28.dll to
+ ./gnutls.dll, and the same for several others. Note that gsasl has
+ to be copied from where it was installed in ming2/bin/libgsasl-7.dll
+ to gsasl.dll (the libgsasl.dll from cygwin won't work).
+
+ Loading package gnutls-0.1.5 ... linking ... done.
+ Loading package gsasl-0.3.5 ... linking ... ghc.exe: unable to load package `gsasl-0.3.5'
+ ghc.exe: C:\Documents and Settings\me\Application Data\cabal\gsasl-0.3.5\ghc-7.6.3\HSgsasl-0.3.5.o: unknown symbol `_gsasl_client_start'
+
+ Current problem:
+
+ GHCi runtime linker: fatal error: I found a duplicate definition for symbol
+ _adler32
+ whilst processing object file
+ C:\cygwin\lib\libz.a
+
+ I think this means I can't use the cygwin libs, and need to get mingw
+ builds of gnutls and libxml2 instead.
+
+ TODO: Try <http://josefsson.org/gnutls4win/>, and libxml2 from mingw,
+ and pkg-config from <http://www.gtk.org/download/win32.php>.