
Hello cafe-subscribers, I saw some issues about installing haskell bindings for cURL under Windows, and now I'm trapped too. So, here is actions' log for everything (very detail; you can PgDn to the end with questions): 1. Windows Vista without UAC 2. ghc-6.10.1-i386-windows.exe is installed to C:\Program Files\Haskell "C:\Program Files\Haskell\package.conf" wasn't touched after installation (Cabal nor manually) 3. MinGW-5.1.4 installed to C:\temp\MinGW 4. MSys-1.0 installed to C:\temp\msys\1.0\ 5. curl-7.19.3.tar.bz2 had taken from http://curl.haxx.se/download/curl-7.19.3.tar.bz2 6. Under msys, curl-7.19.3.tar.bz2 is untared into /home/Kuznetsov/curl-7.19.3 7. cURL is made as: cd curl-7.19.3 $ ./configure configure: Configured to build curl/libcurl: ... curl version: 7.19.3 Host setup: i686-pc-mingw32 Install prefix: /usr/local Compiler: gcc SSL support: no (--with-ssl / --with-gnutls) SSH support: no (--with-libssh2) zlib support: no (--with-zlib) krb4 support: no (--with-krb4*) GSSAPI support: no (--with-gssapi) SPNEGO support: no (--with-spnego) c-ares support: no (--enable-ares) ipv6 support: no (--enable-ipv6) IDN support: no (--with-libidn) Build libcurl: Shared=yes, Static=yes Built-in manual: no (--enable-manual) Verbose errors: enabled (--disable-verbose) SSPI support: no (--enable-sspi) ca cert bundle: no ca cert path: no LDAP support: enabled (winldap) LDAPS support: no (--enable-ldaps) $ make ... make[2]: Leaving directory `/home/Kuznetsov/curl-7.19.3/src' make[1]: Leaving directory `/home/Kuznetsov/curl-7.19.3/src' make[1]: Entering directory `/home/Kuznetsov/curl-7.19.3' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/home/Kuznetsov/curl-7.19.3' $ make install ... libtool: install: /bin/install -c .libs/libcurl.dll.a /usr/local/lib/libcurl.dll.a libtool: install: base_file=`basename libcurl.la` libtool: install: dlpath=`/bin/sh 2>&1 -c '. .libs/'libcurl.la'i; echo libcurl-4.dll'` libtool: install: dldir=/usr/local/lib/`dirname ../bin/libcurl-4.dll` libtool: install: test -d /usr/local/lib/../bin || mkdir -p /usr/local/lib/../bin libtool: install: /bin/install -c .libs/libcurl-4.dll /usr/local/lib/../bin/libcurl-4.dll libtool: install: chmod a+x /usr/local/lib/../bin/libcurl-4.dll libtool: install: if test -n '' && test -n 'strip --strip-unneeded'; then eval 'strip --strip-unneeded /usr/local/lib/../bin/libcurl-4.dll' || exit 0; fi libtool: install: /bin/install -c .libs/libcurl.lai /usr/local/lib/ libcurl.la libtool: install: /bin/install -c .libs/libcurl.a /usr/local/lib/libcurl.a libtool: install: chmod 644 /usr/local/lib/libcurl.a libtool: install: ranlib /usr/local/lib/libcurl.a ---------------------------------------------------------------------- Libraries have been installed in: /usr/local/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-LLIBDIR' linker flag ... /bin/install -c -m 644 'curl.h' '/usr/local/include/curl/curl.h' /bin/install -c -m 644 'curlver.h' '/usr/local/include/curl/curlver.h' /bin/install -c -m 644 'easy.h' '/usr/local/include/curl/easy.h' /bin/install -c -m 644 'mprintf.h' '/usr/local/include/curl/mprintf.h' /bin/install -c -m 644 'stdcheaders.h' '/usr/local/include/curl/stdcheaders.h' /bin/install -c -m 644 'types.h' '/usr/local/include/curl/types.h' /bin/install -c -m 644 'multi.h' '/usr/local/include/curl/multi.h' /bin/install -c -m 644 'typecheck-gcc.h' '/usr/local/include/curl/typecheck-gcc.h' /bin/install -c -m 644 'curlbuild.h' '/usr/local/include/curl/curlbuild.h' /bin/install -c -m 644 'curlrules.h' '/usr/local/include/curl/curlrules.h' ... 8. $ which curl && curl /usr/local/bin/curl curl: try 'curl --help' for more information I have following files in C:\temp\msys\1.0\local\bin\ (/usr/local/bin in Unix-scheme): 02.02.2009 15:10 4 029 curl-config 02.02.2009 15:10 98 591 curl.exe 02.02.2009 15:09 262 934 libcurl-4.dll In /usr/local/include/curl ten includes: 02.02.2009 15:10 67 183 curl.h 02.02.2009 15:10 5 865 curlbuild.h 02.02.2009 15:10 7 478 curlrules.h 02.02.2009 15:10 2 799 curlver.h 02.02.2009 15:10 3 526 easy.h 02.02.2009 15:10 2 850 mprintf.h 02.02.2009 15:10 13 039 multi.h 02.02.2009 15:10 1 383 stdcheaders.h 02.02.2009 15:10 33 337 typecheck-gcc.h 02.02.2009 15:10 15 types.h ---- Sorry for many details, but now I can show the wrong behaviour of the haskell bindings for cURL under windows: 9. curl-1.3.4 is taken from hackage and unzipped to /home/Kuznetsov $ cd ~/curl-1.3.4 $ runhaskell Setup.hs configure --extra-include-dirs=/usr/local/include --extra-lib-dirs=/usr/local/lib Configuring curl-1.3.4... $ runhaskell Setup.hs build Preprocessing library curl-1.3.4... Building curl-1.3.4... [1 of 8] Compiling Network.Curl.Debug ( Network\Curl\Debug.hs, dist\build\Network\Curl\Debug.o ) [2 of 8] Compiling Network.Curl.Types ( Network\Curl\Types.hs, dist\build\Network\Curl\Types.o ) [3 of 8] Compiling Network.Curl.Post ( Network\Curl\Post.hs, dist\build\Network\Curl\Post.o ) [4 of 8] Compiling Network.Curl.Opts ( Network\Curl\Opts.hs, dist\build\Network\Curl\Opts.o ) [5 of 8] Compiling Network.Curl.Code ( Network\Curl\Code.hs, dist\build\Network\Curl\Code.o ) [6 of 8] Compiling Network.Curl.Info ( Network\Curl\Info.hs, dist\build\Network\Curl\Info.o ) Network\Curl\Info.hs:80:0: Warning: Defined but not used: `stringTag' Network\Curl\Info.hs:83:0: Warning: Defined but not used: `longTag' Network\Curl\Info.hs:86:0: Warning: Defined but not used: `doubleTag' Network\Curl\Info.hs:89:0: Warning: Defined but not used: `slistTag' [7 of 8] Compiling Network.Curl.Easy ( Network\Curl\Easy.hs, dist\build\Network\Curl\Easy.o ) [8 of 8] Compiling Network.Curl ( Network\Curl.hs, dist\build\Network\Curl.o ) C:\Program Files\Haskell\bin\ar.exe: creating dist\build\libHScurl-1.3.4.a $ runhaskell Setup.hs install Installing library in C:\Program Files\Haskell\curl-1.3.4\ghc-6.10.1 Registering curl-1.3.4... Reading package info from "dist\\installed-pkg-config" ... done. Writing new package config file... done. 10. In package.conf I have seen: InstalledPackageInfo {package = PackageIdentifier {pkgName = PackageName "curl", pkgVersion = Version {versionBranch = [1,3,4], versionTags = []}}, license = BSD3, copyright = "", maintainer = "Sigbjorn Finne < sigbjorn.finne@gmail.com>", author = "Sigbjorn Finne", stability = "", homepage = "", pkgUrl = "", description = "libcurl is a client-side URL transfer library, supporting FTP, FTPS, HTTP,\nHTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS and FILE.\nlibcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading,\nHTTP form based upload, proxies, cookies, user+password authentication\n(Basic, Digest, NTLM, Negotiate, Kerberos4), file transfer resume,\nhttp proxy tunneling and more!\n\nThis package provides a Haskell binding to libcurl.", category = "Network", exposed = True, exposedModules = ["Network.Curl","Network.Curl.Code"," Network.Curl.Info","Network.Curl.Opts","Network.Curl.Post","Network.Curl.Types","Network.Curl.Easy","Network.Curl.Debug"], hiddenModules = [], importDirs = ["C:\\Program Files\\Haskell\\curl-1.3.4\\ghc-6.10.1"], libraryDirs = ["C:\\Program Files\\Haskell\\curl-1.3.4\\ghc-6.10.1","C:/temp/msys/1.0/local/lib"], hsLibraries = ["HScurl-1.3.4"], extraLibraries = ["curl"], extraGHCiLibraries = [], includeDirs = ["C:/temp/msys/1.0/local/include"], includes = [], depends = [PackageIdentifier {pkgName = PackageName "base", pkgVersion = Version {versionBranch = [3,0,3,0], versionTags = []}},PackageIdentifier {pkgName = PackageName "bytestring", pkgVersion = Version {versionBranch = [0,9,1,4], versionTags = []}},PackageIdentifier {pkgName = PackageName "containers", pkgVersion = Version {versionBranch = [0,2,0,0], versionTags = []}}], hugsOptions = [], ccOptions = [], ldOptions = [], frameworkDirs = [], frameworks = [], haddockInterfaces = ["C:\\Program Files\\Haskell\\doc\\curl-1.3.4\\html\\curl.haddock"], haddockHTMLs = ["C:\\Program Files\\Haskell\\doc\\curl-1.3.4\\html"]} In "C:\Program Files\Haskell\curl-1.3.4\ghc-6.10.1\" I have seen HScurl-1.3.4.o , libHScurl-1.3.4.a and other Curl files. 11. Final tests: under msys: $ ghci Prelude> :m Network.Curl module `Network.Curl' is not loaded Bad, but not a disaster. under windows: C:\> ghci GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. Prelude> :m Network.Curl Prelude Network.Curl> let a = curlGet Loading package syb ... linking ... done. Loading package base-3.0.3.0 ... linking ... done. Loading package array-0.2.0.0 ... linking ... done. Loading package containers-0.2.0.0 ... linking ... done. Loading package bytestring-0.9.1.4 ... linking ... done. Loading package curl-1.3.4 ... <interactive>: curl: Не найден указанный модуль. (text in russian here because of localized Vista. The message is near "Can't load specified module") can't load .so/.DLL for: curl (addDLL: could not load DLL) Prelude Network.Curl> So, the question is why curl doesn't work? I tried to use Cabal but it failed with building too. How can I test the fact that C:\temp\msys\1.0\local\bin\libcurl-4.dll is used in curl-1.3.4 ? -- Iliya Kuznetsov +7-916-878-75-70
participants (1)
-
Iliya Kuznetsov