darcs

Issue 1846 Darcs does not build in out-of-the-box Haskell Platform on Windows

Title Darcs does not build in out-of-the-box Haskell Platform on Windows
Priority not-our-bug Status given-up
Milestone Resolved in
Superseder Nosy List bobcalco, dmitry.kurochkin, eivuokko, jaredj, kirby, kowey, twb, wglozer
Assigned To
Topics Documentation, Windows

Created on 2010-05-17.12:14:42 by bobcalco, last changed 2017-07-30.23:57:58 by gh.

Files
File name Uploaded Type Edit Remove
unnamed bobcalco, 2010-05-17.14:10:37 text/html
unnamed bobcalco, 2010-06-02.02:44:31 text/html
Messages
msg11081 (view) Author: bobcalco Date: 2010-05-17.12:14:40
After fresh install of Haskell Platform 2010.1.0.0 (using GHC 6.12.1) on
Windows 7, running 'cabal install darcs' fails when it cannot find
curl-related headers and C libraries. At the very least, instructions on
pre-requisites like this should be provided to ensure successful
compilation from source.

...
Linking
C:\Users\Ellel\AppData\Local\Temp\darcs-2.4.36660\darcs-2.4.3\dist\setup\setup.exe
...
Configuring darcs-2.4.3...
setup.exe: Missing dependencies on foreign libraries:
* Missing header file: curl/curl.h
* Missing C libraries: curl, curl
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
cabal: Error: some packages failed to install:
darcs-2.4.3 failed during the configure step. The exception was:
ExitFailure 1

Also: Which compiler(s)/version(s) must be present (and used to compile
dependent C libraries) to ensure binary compatibility? MS C++, MSYS,
Cygwin?
msg11082 (view) Author: bobcalco Date: 2010-05-17.12:20:50
OK answered my own question by attempting 'cabal install curl'...

Resolving dependencies...
Downloading curl-1.3.5...
Configuring curl-1.3.5...
cabal: The package has a './configure' script. This requires a Unix
compatibility toolchain such as MinGW+MSYS or Cygwin.
cabal: Error: some packages failed to install:
curl-1.3.5 failed during the configure step. The exception was:
ExitFailure 1
msg11083 (view) Author: kowey Date: 2010-05-17.12:24:28
Thanks for the report, Bob.  This is slightly tricky:

* the binary ships with curl support for best performance (incidentally,
if you'd care to test the 2.4.4 release for us, it's
http://darcs.net/binaries/windows/darcs-2.4.4-win1.zip )

* http://wiki.darcs.net/BuildingUnderWindows suggests to build with
-f-curl under Windows as this is the least painful way to get a running
Darcs (but it's not in the manual).  It also provides instructions on
building with Curl support (MSYS)

How do you think we should approach this?  I'm not sure what is the
right way for the wiki (relatively unstable) and the user manual
(relatively stable) to relate to each other.  Maybe Trent has some
thoughts on the matter.
msg11084 (view) Author: bobcalco Date: 2010-05-17.14:10:37
I'm trying to get it working with my Cygwin install, but no bananas:

*$ cabal install curl
Resolving dependencies...
Configuring curl-1.3.5...
cygwin warning:
  MS-DOS style path detected:
C:\Users\Bob\AppData\Roaming\cabal/share/config.site
  Preferred POSIX equivalent is:
/cygdrive/c/Users/Bob/AppData/Roaming/cabal/share/config.site
  CYGWIN environment variable option "nodosfilewarning" turns off this
warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
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 ANSI C... none needed
checking how to run the C preprocessor... gcc -E
configure: creating ./config.status
config.status: creating curl.buildinfo
cabal.exe: Missing dependency on a foreign library:
* Missing C library: curl
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal.exe: Error: some packages failed to install:
curl-1.3.5 failed during the configure step. The exception was:
ExitFailure 1
*
I have libcurl 3 and every other package having to do with curl that is
provided by the cygwin setup.exe. Not sure why it can't find it from within
my cygwin bash shell. I don't think it has to do with the POSIX path
warning, all kinds of other things have compiled curl support (like some
Ruby gems for my Rails work).

I will go ahead and use the binary distribution (if I must choose, it's more
important at the moment that I get up and running with darcs than that I
compile it from the source), will be happy to test 2.4.4 for you.

As far as building on Windows: I happen to have cygwin for completely
unrelated development reasons, but in general I don't like having to compile
with the cygwin DLL requirement, so getting it working on MSYS with MinGW
(or even on Cygwin using MinGW) would be the more ideal approach.

I will definitely check out the wiki's advice along these when I have more
free time to play with building it.

Parenthetically I'll add: I so love my Ubuntu development machine! ;)

- Bob

On Mon, May 17, 2010 at 8:24 AM, Eric Kow <bugs@darcs.net> wrote:

>
> Eric Kow <kowey@darcs.net> added the comment:
>
> Thanks for the report, Bob.  This is slightly tricky:
>
> * the binary ships with curl support for best performance (incidentally,
> if you'd care to test the 2.4.4 release for us, it's
> http://darcs.net/binaries/windows/darcs-2.4.4-win1.zip )
>
> * http://wiki.darcs.net/BuildingUnderWindows suggests to build with
> -f-curl under Windows as this is the least painful way to get a running
> Darcs (but it's not in the manual).  It also provides instructions on
> building with Curl support (MSYS)
>
> How do you think we should approach this?  I'm not sure what is the
> right way for the wiki (relatively unstable) and the user manual
> (relatively stable) to relate to each other.  Maybe Trent has some
> thoughts on the matter.
>
> ----------
> nosy: +eivuokko, jaredj, kirby, kowey, twb, wglozer
> topic: +Documentation, Windows
>
> __________________________________
> Darcs bug tracker <bugs@darcs.net>
> <http://bugs.darcs.net/issue1846>
> __________________________________
>



-- 
Bob Calco
DBA Softcraft Solutions
16906 Harrierridge Pl.
Lithia, FL 33547
813.383.4968
bob.calco@softcraft-solutions.com
Attachments
msg11085 (view) Author: bobcalco Date: 2010-05-17.14:11:24
OK I see now that MinGW gcc 3.4.5 is installed with the Haskell platform
on Windows. That's fantastic. It would be really nice if somehow
dependent C libraries could be downloaded and installed automatically in
that installation environment... but this is probably a Haskell Platform
or Cabal issue rather than a Darcs issue.
msg11086 (view) Author: bobcalco Date: 2010-05-17.14:54:40
OK, the "easy way," i.e.,

cabal install darcs -f-curl

built fine. (Though, there were LOTS and LOTS of warnings about
deprecated code features, which I presume you know about.)

So I have a working 2.4.3 version that is (I presume) not using curl,
and a 2.4.4 binary version that you provided. I defined a %DARCS_HOME%
path pointing to where I unzipped the file you sent, and when I include
it in my system Path I get "2.4.4 (release)". When I remove that from my
path, I get the 2.4.3 (release) that was built using -f-curl.
msg11142 (view) Author: kowey Date: 2010-05-28.21:42:05
On Mon, May 17, 2010 at 12:14:42 +0000, Bob Calco wrote:
> After fresh install of Haskell Platform 2010.1.0.0 (using GHC 6.12.1) on
> Windows 7, running 'cabal install darcs' fails when it cannot find
> curl-related headers and C libraries.

Alright, we've got to work out to what extent this is Darcs bug.

Is our documentation adequate?
------------------------------

* The manual claims that building darcs with just 'cabal install' is the
  "Easy Way".  This claim is false under Windows unless you have curl
  installed.  The Easy Way under Windows would be to build with 'cabal
  install -f-curl' (although right now, people would be really much
  better off with Curl, if I understand correctly).

* http://wiki.darcs.net/BuildingUnderWindows seems to reflect reality
  very well, even telling you how to grab the MSYS curl stuff.

Bob, any comments there?

> Also: Which compiler(s)/version(s) must be present (and used to compile
> dependent C libraries) to ensure binary compatibility? MS C++, MSYS,
> Cygwin?
 
Do you think this is adequately addressed by the docs?

Is our build system adequate?
-----------------------------
> setup.exe: Missing dependencies on foreign libraries:
> * Missing header file: curl/curl.h
> * Missing C libraries: curl, curl
> This problem can usually be solved by installing the system packages that
> provide these libraries (you may need the "-dev" versions). If the libraries
> are already installed but in a non-standard location then you can use the
> flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
> cabal: Error: some packages failed to install:
> darcs-2.4.3 failed during the configure step. The exception was:
> ExitFailure 1

It sounds like Cabal is giving enough information to work out what's
going wrong here.

I wonder... what are good solutions to this problem, though?

Do we stand to gain much by making things fancier, for example by
detecting that the user does not have the curl libraries we need
and if so, default to HTTP?
 
-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
msg11179 (view) Author: bobcalco Date: 2010-06-02.02:44:31
On Fri, May 28, 2010 at 5:43 PM, Eric Kow <kowey@darcs.net> wrote:

> On Mon, May 17, 2010 at 12:14:42 +0000, Bob Calco wrote:
> > After fresh install of Haskell Platform 2010.1.0.0 (using GHC 6.12.1) on
> > Windows 7, running 'cabal install darcs' fails when it cannot find
> > curl-related headers and C libraries.
>
> Alright, we've got to work out to what extent this is Darcs bug.
>
> Is our documentation adequate?
> ------------------------------
>
> * The manual claims that building darcs with just 'cabal install' is the
>  "Easy Way".  This claim is false under Windows unless you have curl
>  installed.  The Easy Way under Windows would be to build with 'cabal
>  install -f-curl' (although right now, people would be really much
>  better off with Curl, if I understand correctly).
>
> * http://wiki.darcs.net/BuildingUnderWindows seems to reflect reality
>  very well, even telling you how to grab the MSYS curl stuff.
>
> Bob, any comments there?
>

The documentation was clear, once I was aware of it. :)


>
> > Also: Which compiler(s)/version(s) must be present (and used to compile
> > dependent C libraries) to ensure binary compatibility? MS C++, MSYS,
> > Cygwin?
>
> Do you think this is adequately addressed by the docs?
>
> Is our build system adequate?
> -----------------------------
> > setup.exe: Missing dependencies on foreign libraries:
> > * Missing header file: curl/curl.h
> > * Missing C libraries: curl, curl
> > This problem can usually be solved by installing the system packages that
> > provide these libraries (you may need the "-dev" versions). If the
> libraries
> > are already installed but in a non-standard location then you can use the
> > flags --extra-include-dirs= and --extra-lib-dirs= to specify where they
> are.
> > cabal: Error: some packages failed to install:
> > darcs-2.4.3 failed during the configure step. The exception was:
> > ExitFailure 1
>
> It sounds like Cabal is giving enough information to work out what's
> going wrong here.
>
> I wonder... what are good solutions to this problem, though?
>

Ideally, dependency sources could be packaged somehow, and the build system
would be able to detect the need to compile from source and "just do the
right thing" ... obviously, that's a lot to ask, especially on Windows. But
the fact that Haskell Platform provides a MinGW compiler out of the box
means it's theoretically feasible.

I do NOT think this is a Darcs problem, honestly.


>
> Do we stand to gain much by making things fancier, for example by
> detecting that the user does not have the curl libraries we need
> and if so, default to HTTP?
>

 Well, it's worth it one the level, namely, so that it is easy out of the
box to install an "optimal" darcs version, with curl.

But, as long as binaries are available by other means, it may not be a
justified use of your development time.

- Bob


> --
> Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
> PGP Key ID: 08AC04F9
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkwAOOgACgkQBUrOwgisBPkENACg3l02dxnUK5rBK/6nocf5AIay
> 1/4An2rQbXXBxmaJvC+DvwXa5ZBY9AHY
> =Sd4Q
> -----END PGP SIGNATURE-----
>
>


-- 
Bob Calco
DBA Softcraft Solutions
16906 Harrierridge Pl.
Lithia, FL 33547
813.383.4968
bob.calco@softcraft-solutions.com
Attachments
msg11184 (view) Author: kowey Date: 2010-06-02.09:26:05
Thanks, Bob!  I think we'll just focus on getting good binaries out and
hope that one day we'll sort this out properly
History
Date User Action Args
2010-05-17 12:14:42bobcalcocreate
2010-05-17 12:20:52bobcalcosetmessages: + msg11082
2010-05-17 12:24:31koweysettopic: + Windows, Documentation
nosy: + kowey, twb, wglozer, eivuokko, kirby, jaredj
messages: + msg11083
2010-05-17 14:10:40bobcalcosetfiles: + unnamed
messages: + msg11084
2010-05-17 14:11:26bobcalcosetmessages: + msg11085
2010-05-17 14:54:41bobcalcosetmessages: + msg11086
2010-05-28 21:42:06koweysetmessages: + msg11142
title: Darcs does not build in out-of-the-box Haskell Platform on Windows -> Darcs does not build in out-of-the-box Haskell Platform on Windows
2010-06-02 02:44:32bobcalcosetfiles: + unnamed
messages: + msg11179
title: Darcs does not build in out-of-the-box Haskell Platform on Windows -> Darcs does not build in out-of-the-box Haskell Platform on Windows
2010-06-02 09:26:05koweysetpriority: bug -> not-our-bug
status: unknown -> deferred
messages: + msg11184
2017-07-30 23:57:58ghsetstatus: deferred -> given-up