Wednesday, December 10, 2014

Beta testing the Windows Minimal GHC Installer

Summary: There is now a minimal Windows GHC installer that can install the network library.

Michael Snoyman and I are seeking beta testers for our new Windows GHC installer. The installer is very new, and we're keen to get feedback.

Update: If you want to install to Program Files (the default installation path), download the file, right click and hit "Run as administrator". This will be automatic in the next version.

One of the standard problems when upgrading Haskell libraries on Windows is that sometimes you have to upgrade a package which requires a configure script - typically the network library. When that happens, you have to take special measures, and even then, sometimes the binary will fail at runtime (this happens on about half my machines).

Our installer solves that problem by bundling GHC, Cabal and MSYS in one installer. You can install the network library out of the box without any special configuration and it just works.

Our installer does not provide all the packages included with the Haskell Platform, but it does provide an environment where you can easily install those packages. This minimal installer might be more suitable for developers.

Why might I want this installer

The installer is much easier to install than the GHC distribution (has a real installer, sets up the %PATH%, includes Cabal and can build the network library).

The installer has less libraries than the Haskell Platform installer, but includes MSYS so you can build everything in the Platform. The lack of additional packages and close correspondence with GHC (there is one installer for each GHC version) might make it more suitable for library developers. Once GHC 7.10.1 is released, we hope to make a GHC Minimal Installer available within days.

The installer also has more precise control over what is added to the %PATH%. You can add all the binaries it provides, or just add a single binary minghc-7.8.3 which when run at the command prompt temporarily adds all the installed binaries to the %PATH%. Using the switcher, you can easily switch GHC versions.

2 comments:

Anonymous said...

I've installed the ghc installer. Then I did cabal install network and I got this long error message:
Resolving dependencies...
Configuring network-2.6.0.2...
Failed to install network-2.6.0.2
Build log ( C:\Users\kees\AppData\Roaming\cabal\logs\network-2.6.0.2.log ):
Configuring network-2.6.0.2...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking winsock2.h usability... yes
checking winsock2.h presence... yes
checking for winsock2.h... yes
checking ws2tcpip.h usability... yes
checking ws2tcpip.h presence... yes
checking for ws2tcpip.h... yes
checking arpa/inet.h usability... no
checking arpa/inet.h presence... no
checking for arpa/inet.h... no
checking netdb.h usability... no
checking netdb.h presence... no
checking for netdb.h... no
checking netinet/in.h usability... no
checking netinet/in.h presence... no
checking for netinet/in.h... no
checking netinet/tcp.h usability... no
checking netinet/tcp.h presence... no
checking for netinet/tcp.h... no
checking sys/socket.h usability... no
checking sys/socket.h presence... no
checking for sys/socket.h... no
checking sys/uio.h usability... no
checking sys/uio.h presence... no
checking for sys/uio.h... no
checking sys/un.h usability... no
checking sys/un.h presence... no
checking for sys/un.h... no
checking for readlink... no
checking for symlink... no
checking for struct msghdr.msg_control... no
checking for struct msghdr.msg_accrights... no
checking for struct sockaddr.sa_len... no
checking for in_addr_t in netinet/in.h... no
checking for SO_PEERCRED and struct ucred in sys/socket.h... no
checking for getpeereid in unistd.h... checking for getpeereid... no
checking for _head_libws2_32_a in -lws2_32... yes
checking for getaddrinfo... no
checking for getaddrinfo if WINVER is 0x0501... yes
checking for gai_strerror... no
checking whether AI_ADDRCONFIG is declared... no
checking whether AI_ALL is declared... no
checking whether AI_NUMERICSERV is declared... no
checking whether AI_V4MAPPED is declared... no
checking whether IPV6_V6ONLY is declared... yes
checking whether IPPROTO_IP is declared... yes
checking whether IPPROTO_TCP is declared... yes
checking whether IPPROTO_IPV6 is declared... yes
checking for sendfile in sys/sendfile.h... no
checking for sendfile in sys/socket.h... no
checking for gethostent... no
checking for accept4... no
configure: creating ./config.status
./configure: line 4864: test: too many arguments
./configure: line 4864: test: too many arguments
./configure: line 4864: test: too many arguments
./configure: line 4864: test: too many arguments
./configure: line 4864: test: too many arguments
./configure: line 4864: test: too many arguments
configure: error: could not make ./config.status

Neil Mitchell said...

Is that using the MinGHC installer from the web page? If so, can you describe the options you used when setting it up, and raise a ticket at https://github.com/fpco/minghc/issues (that way all the interested developers will see it).