darcs

Issue 1985 Darcs 2.5 does not build on MacOS X

Title Darcs 2.5 does not build on MacOS X
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List ajsk, dmitry.kurochkin, flo, rkudiyarov
Assigned To rkudiyarov
Topics Mac

Created on 2010-10-30.19:06:33 by rkudiyarov, last changed 2017-07-31.00:08:55 by gh.

Files
File name Uploaded Type Edit Remove
no-haskell98.patch kowey, 2010-11-15.12:11:38 text/x-patch
smime.p7s rkudiyarov, 2010-10-30.19:06:32 application/pkcs7-signature
Messages
msg12853 (view) Author: rkudiyarov Date: 2010-10-30.19:06:32
Hello 

I try to upgrade my darcs to 2.5 version on MacOS Snow Leopard. All packages are installed at ~/.cabal.

I run:

LestatBook:~ user$ cabal upgrade darcs --reinstall
Resolving dependencies...
Configuring process-1.0.1.3...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
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 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 for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for setitimer,... no
checking for sysconf... yes
checking value of SIG_DFL... 0
checking value of SIG_IGN... 1
configure: creating ./config.status
config.status: creating include/HsProcessConfig.h
Preprocessing library process-1.0.1.3...
Building process-1.0.1.3...
[1 of 3] Compiling System.Process.Internals ( System/Process/Internals.hs, dist/build/System/Process/Internals.o )
[2 of 3] Compiling System.Process   ( System/Process.hs, dist/build/System/Process.o )
[3 of 3] Compiling System.Cmd       ( System/Cmd.hs, dist/build/System/Cmd.o )
Registering process-1.0.1.3...
Installing library in /Users/user/.cabal/lib/process-1.0.1.3/ghc-6.12.3
Registering process-1.0.1.3...
Configuring regex-base-0.93.2...
Preprocessing library regex-base-0.93.2...
Building regex-base-0.93.2...
[1 of 4] Compiling Text.Regex.Base.RegexLike ( Text/Regex/Base/RegexLike.hs, dist/build/Text/Regex/Base/RegexLike.o )
[2 of 4] Compiling Text.Regex.Base.Context ( Text/Regex/Base/Context.hs, dist/build/Text/Regex/Base/Context.o )
[3 of 4] Compiling Text.Regex.Base  ( Text/Regex/Base.hs, dist/build/Text/Regex/Base.o )
[4 of 4] Compiling Text.Regex.Base.Impl ( Text/Regex/Base/Impl.hs, dist/build/Text/Regex/Base/Impl.o )
Registering regex-base-0.93.2...
Installing library in /Users/user/.cabal/lib/regex-base-0.93.2/ghc-6.12.3
Registering regex-base-0.93.2...
Configuring regex-posix-0.94.4...
Preprocessing library regex-posix-0.94.4...
Building regex-posix-0.94.4...
[1 of 6] Compiling Text.Regex.Posix.Wrap ( dist/build/Text/Regex/Posix/Wrap.hs, dist/build/Text/Regex/Posix/Wrap.o )
[2 of 6] Compiling Text.Regex.Posix.String ( Text/Regex/Posix/String.hs, dist/build/Text/Regex/Posix/String.o )
[3 of 6] Compiling Text.Regex.Posix.Sequence ( Text/Regex/Posix/Sequence.hs, dist/build/Text/Regex/Posix/Sequence.o )
[4 of 6] Compiling Text.Regex.Posix.ByteString ( Text/Regex/Posix/ByteString.hs, dist/build/Text/Regex/Posix/ByteString.o )
[5 of 6] Compiling Text.Regex.Posix.ByteString.Lazy ( Text/Regex/Posix/ByteString/Lazy.hs, dist/build/Text/Regex/Posix/ByteString/Lazy.o )
[6 of 6] Compiling Text.Regex.Posix ( Text/Regex/Posix.hs, dist/build/Text/Regex/Posix.o )
Registering regex-posix-0.94.4...
Installing library in /Users/user/.cabal/lib/regex-posix-0.94.4/ghc-6.12.3
Registering regex-posix-0.94.4...
Configuring regex-compat-0.93.1...
Preprocessing library regex-compat-0.93.1...
Building regex-compat-0.93.1...
[1 of 1] Compiling Text.Regex       ( Text/Regex.hs, dist/build/Text/Regex.o )
Registering regex-compat-0.93.1...
Installing library in /Users/user/.cabal/lib/regex-compat-0.93.1/ghc-6.12.3
Registering regex-compat-0.93.1...

/var/folders/Fr/FrBohuSZFRSYX1QXv2uHrE+++TI/-Tmp-/darcs-2.520390/darcs-2.5/Distribution/ShellHarness.hs:13:7:
    Could not find module `System':
      Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
darcs-2.5 failed during the configure step. The exception was:
ExitFailure 1

Thanks,
Roman
Attachments
msg13012 (view) Author: kowey Date: 2010-11-12.18:24:02
Hi and thanks for the very timely bug report.  Note that you shouldn't 
need to use --reinstall when you upgrade darcs.

Normally what you want to run is:

 cabal update
 cabal install darcs

And this will install the latest version.

Need-action: troubleshooting build failure

Florian: could I ask you to have a look? is there a haskell98 dep 
somewhere?
msg13016 (view) Author: flo Date: 2010-11-13.22:43:16
I cannot recreate that, neither on my personal setup, nor on my build 
setup.

To me, it seems more like a cabal issue.
msg13055 (view) Author: kowey Date: 2010-11-15.12:11:38
Roman: does something like the following work?

 cd /tmp
 tar xzvf ~/.cabal/packages/hackage.haskell.org/darcs/2.5/darcs-
2.5.tar.gz 
 cd darcs-2.5
 # edit Distribution/ShellHarness.hs replacing the import System( system 
) with System.Cmd ( system ) as in the attached patch
 cabal install
Attachments
msg13205 (view) Author: ajsk Date: 2010-11-22.11:38:02
Same happening here on linux-x64 with GHC 7.0.1, the patch gets it to a
new point. GHC installed from haskell.org's binary installation tarball.

# cabal install --global
Resolving dependencies...
[1 of 2] Compiling Distribution.ShellHarness (
Distribution/ShellHarness.hs, dist/setup/Distribution/ShellHarness.o )

Distribution/ShellHarness.hs:114:37:
    Not in scope: data constructor `Permissions'
cabal: Error: some packages failed to install:
darcs-2.5 failed during the configure step. The exception was:
ExitFailure 1
msg13206 (view) Author: ganesh Date: 2010-11-22.11:40:48
GHC 7 isn't supported yet, but (probably) will be supported by darcs 
2.5.1. Can you use 6.12.3 in the meantime?
msg13208 (view) Author: ajsk Date: 2010-11-22.11:55:02
I can, and I have many versions of GHC installed. Perhaps the cabal file
needs to tell it to use the specific GHC version. This would avoid alot
of confusion. Is it a possibility, or is cabal not smart enough for that?
msg13216 (view) Author: ajsk Date: 2010-11-22.12:38:24
Using cabal, on ghc 6.12.3... tries to pull in bytestring-0.9.1.8, which
fails to install. Will try manual build.
msg13217 (view) Author: ganesh Date: 2010-11-22.13:00:45
In general darcs supports a range of GHC versions (6.10 -> 6.12 at the 
moment). It just doesn't yet support the latest GHC because that's quite 
new.

A quick look at the docs suggests we could indeed add build-tools: ghc 
>= 6.10 && < 7.1 to cover this specification; that seems like a good 
plan.
msg13219 (view) Author: mornfall Date: 2010-11-22.14:25:56
Ganesh Sittampalam <bugs@darcs.net> writes:

> In general darcs supports a range of GHC versions (6.10 -> 6.12 at the 
> moment). It just doesn't yet support the latest GHC because that's quite 
> new.
>
> A quick look at the docs suggests we could indeed add build-tools: ghc 
>>= 6.10 && < 7.1 to cover this specification; that seems like a good 
> plan.

We might want >= 6.12 on windows, given how it seems that 6.10 produces
darcs that randomly hangs when trying to use network (Buildbot, SPJ's
issue1993).

Other than that, I agree it is probably a good idea to add the
constraint.

Yours,
   Petr.
msg13224 (view) Author: ajsk Date: 2010-11-22.22:27:31
I finally got it to build. I had to completly remove all the libs
installed in the ~/.cabal/lib directory, delete the darcs-src dir, and
unpack it so that it was pristine, then cabal install. Only then did the
errors stop, and the binary build. using --global still fails horribly
-- due to the global libs installed, and I want to keep those. No
matter, the binary is done, and works.

@rkudiyarov are you using the correct GHC? Try what I did, it may work.
History
Date User Action Args
2010-10-30 19:06:33rkudiyarovcreate
2010-11-12 18:24:03koweysetstatus: unknown -> needs-reproduction
priority: bug
title: Darcs 2.5 on osx -> Darcs 2.5 does not build on MacOS X
nosy: + flo
messages: + msg13012
topic: + Mac
assignedto: flo
2010-11-13 22:43:17flosetmessages: + msg13016
2010-11-15 12:11:39koweysetstatus: needs-reproduction -> waiting-for
assignedto: flo -> rkudiyarov
messages: + msg13055
files: + no-haskell98.patch
2010-11-22 11:38:03ajsksetnosy: + ajsk
messages: + msg13205
2010-11-22 11:40:48ganeshsetmessages: + msg13206
2010-11-22 11:55:02ajsksetmessages: + msg13208
2010-11-22 12:38:25ajsksetmessages: + msg13216
2010-11-22 13:00:46ganeshsetmessages: + msg13217
2010-11-22 14:25:56mornfallsetmessages: + msg13219
2010-11-22 22:27:32ajsksetmessages: + msg13224
2017-07-31 00:08:55ghsetstatus: waiting-for -> given-up