Hello,

I am trying to compile darcs on Solaris 10 Intel, and have partially
succeeded.  Partially because my own tests seems to work, but I had to
hack around a compile time error and also 'make test' fails.

I would like to know if someone knows how to avoid the hack I use, and
why the test suite fails and maybe also a way to fix the failures.

I am running Solaris on top of VMware and using ghc 6.4.2 (and gcc
3.4.3).  I found a precompiled distribution of ghc for Solaris Intel
through Georg Sauthoff, but it does not include the readline and X11
modules.  I have assumed that darcs does not use readline, is this
correct?

The problem seems to be the C file "term.h".  Configure gives a
warning about this file and when compiling "External.hs" I get an
error.  I fixed the problem by modifying "GNUmakefile" so that i
removes the "-DHAVE_CURSES" flag to ghc.  With this change to the
makefile I can compile darcs and have successfully pulled my current
project via ssh.  I also did some manual testing and everything seems to
work just fine.  The test suite that comes with darcs does not succeed
though.

Below is a dump of how I managed to compile and test.  I have added
some comments inclosed in << "comment" >>.  Sorry it is a bit long.

Cheers,

 --  Peter Mechlenborg


[EMAIL PROTECTED]:~/tmp/darcs-1.0.8] ./configure
... [snip] ...
checking for libcurl... FAILED
configure: WARNING: curl-config was not found
... [snip] ...
checking term.h usability... no
checking term.h presence... yes
configure: WARNING: term.h: present but cannot be compiled
configure: WARNING: term.h:     check for missing prerequisite headers?
configure: WARNING: term.h: see the Autoconf documentation
configure: WARNING: term.h:     section "Present But Cannot Be Compiled"
configure: WARNING: term.h: proceeding with the preprocessor's result
configure: WARNING: term.h: in the future, the compiler will take precedence
configure: WARNING:     ## ----------------------------- ##
configure: WARNING:     ## Report this to [EMAIL PROTECTED] ##
configure: WARNING:     ## ----------------------------- ##
checking for term.h... yes
... [snip] ...

[EMAIL PROTECTED]:~/tmp/darcs-1.0.8] make
... [snip] ...
ghc -cpp -package QuickCheck -package util -package parsec -O -funbox-strict-fields -Wall -Werror -I. -DHAVE_CURSES -c External.hs
In file included from /tmp/ghc3328.hc:9:
/usr/include/term.h:1034: error: syntax error before "bool"
/usr/include/term.h:1060: error: syntax error before "SGTTY"
/usr/include/term.h:1081: error: syntax error before "sgr_mode"
/usr/include/term.h:1082: error: syntax error before "sgr_faked"
/usr/include/term.h:1092: error: syntax error before "funckeystarter"
/usr/include/term.h:1094: error: syntax error before "_fl_rawmode"
/usr/include/term.h:1101: error: syntax error before "_input_queue"
/usr/include/term.h:1108: error: syntax error before '*' token
/usr/include/term.h:1111: error: syntax error before "bit_vector"
/usr/include/term.h:1115: error: syntax error before "check_turn_off"
/usr/include/term.h:1116: error: syntax error before "non_faked_mode"
/usr/include/term.h:1117: error: syntax error before "_cur_pair"
/usr/include/term.h:1118: error: syntax error before '*' token
/usr/include/term.h:1120: error: syntax error before '}' token
/usr/include/term.h:1207: error: syntax error before "int"
/usr/include/term.h:1207: error: `vidputs' declared as function returning a function
/usr/include/term.h:1207: error: syntax error before ')' token
make: *** [External.o] Error 1


--without-curses
[EMAIL PROTECTED]:~/tmp/darcs-1.0.8] vi GNUmakefile << modified GNUmakefile >>

[EMAIL PROTECTED]:~/tmp/darcs-1.0.8] make << make succeeds, but there are some warnings >>
... [snip] ...
ghc  -optc-O2 -c c_compat.c
c_compat.c: In function `open_read':
c_compat.c:21: warning: implicit declaration of function `open'
c_compat.c: In function `smart_wait':
c_compat.c:48: warning: implicit declaration of function `psignal'
ghc  -optc-O2 -c maybe_relink.c
maybe_relink.c: In function `maybe_relink':
maybe_relink.c:128: warning: implicit declaration of function `open'
ghc  -optc-O2 -c atomic_create.c
atomic_create.c: In function `sloppy_atomic_create':
atomic_create.c:37: warning: implicit declaration of function `open'
ghc  -optc-O2 -c fpstring.c
In file included from /export/home/peter/ghc/lib/ghc-6.4.2.20060607/include/ghcconfig.h:4, from /export/home/peter/ghc/lib/ghc-6.4.2.20060607/include/HsFFI.h:21,
                from fpstring.h:1,
                from fpstring.c:28:
/export/home/peter/ghc/lib/ghc-6.4.2.20060607/include/ghcautoconf.h:378:1: warning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/iso/stdlib_iso.h:30,
                from /usr/include/stdlib.h:18,
                from fpstring.c:17:
/usr/include/sys/feature_tests.h:188:1: warning: this is the location of the previous definition
ghc  -optc-O2 -c rts.c
Linking darcs ...
:  -o darcs
rm -f Main.hi Main.o
ghc -cpp -package QuickCheck -package util -package parsec -O -funbox-strict-fields -Wall -Werror -I. -optl-lcurses -optl-lz -o darcsman darcsman.hs c_compat.o maybe_relink.o atomic_create.o fpstring.o Autoconf.o CheckFileSystem.o ColourPrinter.o Compat.o Curl.o DarcsIO.o Pristine.o DarcsArguments.o DarcsFlags.o DarcsUtils.o CommandLine.o DateMatcher.o Depends.o Diff.o Exec.o External.o FastPackedString.o FileName.o FilePathMonad.o FilePathUtils.o IsoDate.o Lcs.o Lock.o Map.o Match.o Motd.o Patch.o PatchApply.o PatchBundle.o PatchCheck.o PatchChoices.o PatchCommute.o PatchCore.o PatchInfo.o PatchMatch.o PatchMatchData.o PatchRead.o PatchReadMonads.o PatchSet.o PatchShow.o PatchViewing.o Population.o PopulationData.o PrintPatch.o Printer.o RawMode.o RegChars.o RepoFormat.o RepoPrefs.o DarcsRepo.o Repository.o Resolution.o SHA1.o SignalHandler.o SlurpDirectory.o Stringalike.o Test.o ThisVersion.o UTF8.o Workaround.o FileSystem.o AtExit.o GitRepo.o Add.o AmendRecord.o Annotate.o Apply.o ArgumentDefaults.o Changes.o Check.o Context.o DarcsCommands.o DarcsURL.o DiffCommand.o Dist.o Email.o Get.o GuiUtils.o Help.o Init.o MainGui.o Mv.o Optimize.o Pull.o Push.o Put.o Query.o QueryManifest.o Record.o RemoteApply.o Remove.o Repair.o Replace.o Resolve.o Revert.o Rollback.o SelectChanges.o Send.o SetPref.o Tag.o TheCommands.o TouchesFiles.o TrackDown.o Unrecord.o Unrevert.o WhatsNew.o
./darcsman > darcs.1

[EMAIL PROTECTED]:~/tmp/darcs-1.0.8] make test
test -f \Context.hs || echo unknown | ./stringify Context context > \Context.hs
Checking that there are no TABs in Haskell sources
add.......................darcs not found as /export/home/peter/tmp/darcs-1.0.8/../darcs at lib/perl/Test/Darcs.pm line 61.
# Looks like your test died before it could output anything.
add.......................dubious
       Test returned status 255 (wstat 65280, 0xff00)

[EMAIL PROTECTED]:~/tmp/darcs-1.0.8] cd .. << This is a bit strange. The test suite wants a darcs exec. in the parent dir?? >>

[EMAIL PROTECTED]:~/tmp] ln -s darcs-1.0.8/darcs darcs

[EMAIL PROTECTED]:~/tmp] cd darcs-1.0.8/

[EMAIL PROTECTED]:~/tmp/darcs-1.0.8] make test
test -f \Context.hs || echo unknown | ./stringify Context context > \Context.hs
Checking that there are no TABs in Haskell sources
add.......................ok
add_in_subdir.............ok
amend-record..............ok
annotate..................ok
changes...................ok
changes_send_context......ok
changes_with_move.........ok
disable...................ok
dist......................ok
init......................ok
merging_newlines..........ok
missed_resolution.........ok
mv........................ok
obliterate................ok
optimize..................ok
pending_has_conflicts.....ok
printer...................ok
pull......................ok
       2/19 unexpectedly succeeded
pull_many_files...........ok
push......................ok
put.......................ok
record....................ok
repodir...................ok
resolve...................ok
set_scripts_executable....ok
setpref...................ok
tag.......................ok
unpull....................ok
unrecord..................ok
whatsnew..................ok 1/0sh: date.t: not found
whatsnew..................ok
All tests successful (2 subtests UNEXPECTEDLY SUCCEEDED).
Files=30, Tests=257, 161 wallclock secs (35.32 cusr + 54.00 csys = 89.32 CPU)
Running 0_test.sh ...                            FAILED!
Output from failed 0_test.sh:
0_test.sh: syntax error at line 8: `x=$' unexpected
Running addexitval.sh ...                        passed.
Running addmv.sh ...                             passed.
Running addrace.sh ...                           passed.
Running addrm.sh ...                             passed.
Running annotate.sh ...                          passed.
Running bad_pending_after_pull.sh ...            FAILED!
Output from failed bad_pending_after_pull.sh:

[ -n "$DARCS" ] || DARCS=$PWD/../darcs
export EMAIL=tester
bad_pending_after_pull.sh: EMAIL=tester: is not an identifier
Running dateparser.sh ...                        FAILED!
Output from failed dateparser.sh:

test $DARCS || DARCS=`pwd`/../darcs
darcs=$DARCS

if [ -e tmp ]; then
   rm -rf tmp;
fi
dateparser.sh: test: argument expected
Running directory_confusion.sh ...               passed.
Running get_tag.sh ...                           passed.
Running illegal_mv.sh ...                        passed.
Running impossible_unrevert.sh ...               FAILED!
Output from failed impossible_unrevert.sh:

test $DARCS || DARCS=$PWD/../darcs
rm -rf temp
mkdir temp
cd temp
$DARCS init
echo ALL ignore-times > _darcs/prefs/defaults
echo a > foo
$DARCS add foo
$DARCS record -a -m a -A test
Finished recording patch 'a'
echo b > foo
echo y | $DARCS revert -a
Finished reverting.
echo y/d/y | tr / \\012 | $DARCS unrecord

Mon Sep  4 15:58:26 CEST 2006  test
 * a
Shall I unrecord this patch? (1/1)  [ynWvpxqadjk], or ? for help:
This operation will make unrevert impossible!
Proceed? [yn]
Invalid response, try again!
This operation will make unrevert impossible!
Proceed? [yn]
Finished unrecording.
# since the unrevert is impossible, we should fail if it succeeds...
! echo y | $DARCS unrevert
impossible_unrevert.sh: !: not found

darcs failed:  There's nothing to unrevert!
Running justrm.sh ...                            passed.
Running look_for_add.sh ...                      passed.
Running merge_three_patches.sh ...               passed.
Running mergeresolved.sh ...                     passed.
Running mv.sh ...                                passed.
Running mv_and_remove_tests.sh ...               passed.
Running no_pristine.sh ...                       FAILED!
Output from failed no_pristine.sh:

test $DARCS || DARCS=$PWD/../darcs
ACTUAL_DARCS=`which $DARCS`
DARCSPATH=`dirname $ACTUAL_DARCS`
export PATH="$DARCSPATH:$PATH"
no_pristine.sh: PATH=/export/home/peter/tmp/darcs-1.0.8/..:/export/home/peter/tmp/darcs-1.0.8/tests/bin:/usr/bin:/usr/openwin/bin:/usr/ucb:/export/home/peter/bin:/usr/bin:/usr/sfw/bin:/usr/X11/bin:/usr/local/bin:/usr/sbin:/usr/sfw/sbin:/usr/openwin/bin:/export/home/peter/ghc/bin: is not an identifier
Running nonewline.sh ...                         passed.
Running partial.sh ...                           passed.
Running pending.sh ...                           FAILED!
Output from failed pending.sh:

test $DARCS || DARCS=$PWD/../darcs
ACTUAL_DARCS=`which $DARCS`
DARCSPATH=`dirname $ACTUAL_DARCS`
export PATH="$DARCSPATH:$PATH"
pending.sh: PATH=/export/home/peter/tmp/darcs-1.0.8/..:/export/home/peter/tmp/darcs-1.0.8/tests/bin:/usr/bin:/usr/openwin/bin:/usr/ucb:/export/home/peter/bin:/usr/bin:/usr/sfw/bin:/usr/X11/bin:/usr/local/bin:/usr/sbin:/usr/sfw/sbin:/usr/openwin/bin:/export/home/peter/ghc/bin: is not an identifier
Running perms.sh ...                             FAILED!
Output from failed perms.sh:

uname | grep "MINGW" > /dev/null && exit 0

test $DARCS || DARCS=$PWD/../darcs
rm -rf temp1 temp2
mkdir temp1
cd temp1
$DARCS init
echo record author me > _darcs/prefs/defaults
echo ALL all >> _darcs/prefs/defaults
echo ALL verbose >> _darcs/prefs/defaults
echo ALL ignore-times >> _darcs/prefs/defaults
touch foo
$DARCS add foo
Adding 'foo'
$DARCS record -m add_foo
About to get the unrecorded changes.
diffing dir...
I've gotten unrecorded.
Writing the patch file...
Applying to current...
Syncing timestamps...
Finished recording patch 'add_foo'
echo hello >> foo
$DARCS record -m mod_foo
About to get the unrecorded changes.
diffing dir...
I've gotten unrecorded.
Writing the patch file...
Applying to current...
Syncing timestamps...
Finished recording patch 'mod_foo'
cd ..
$DARCS get --repo-name temp2 temp1
Copying patch 2 of 2... done!
Finished getting.
cd temp2
cp ../temp1/_darcs/prefs/defaults _darcs/prefs
echo y/d/y | tr / \\012 | $DARCS unpull
diffing dir...

Mon Sep  4 15:58:49 CEST 2006  me
 * mod_foo
Shall I unpull this patch? (1/2)  [ynWvpxqadjk], or ? for help:

Mon Sep  4 15:58:49 CEST 2006  me
 * add_foo
Shall I unpull this patch? (2/2)  [ynWvpxqadjk], or ? for help:
Finished unpulling.
test -e foo -a ! -s foo
perms.sh: test: unknown operator foo
Running posthook.sh ...                          FAILED!
Output from failed posthook.sh:

test $DARCS || DARCS=$PWD/../darcs

rm -rf temp1
mkdir temp1
cd temp1
$DARCS init
touch foo
$DARCS add foo

# Check that prompting works as expected when answering yes...
echo yes | $DARCS whatsnew -s --posthook 'touch posthook-ran'
A ./foo

The following command is set to execute.
Execute the following command now (yes or no)?
touch posthook-ran
test -f posthook-ran
rm posthook-ran

# Check that prompting works as expected when answering no...
echo no | $DARCS whatsnew -s --posthook 'touch posthook-ran'
A ./foo

The following command is set to execute.
Execute the following command now (yes or no)?
touch posthook-ran
test ! -e posthook-ran
posthook.sh: test: argument expected
Running pull_binary.sh ...                       FAILED!
Output from failed pull_binary.sh:

test $DARCS || DARCS=$PWD/../darcs
ACTUAL_DARCS=`which $DARCS`
DARCSPATH=`dirname $ACTUAL_DARCS`
export PATH="$DARCSPATH:$PATH"
pull_binary.sh: PATH=/export/home/peter/tmp/darcs-1.0.8/..:/export/home/peter/tmp/darcs-1.0.8/tests/bin:/usr/bin:/usr/openwin/bin:/usr/ucb:/export/home/peter/bin:/usr/bin:/usr/sfw/bin:/usr/X11/bin:/usr/local/bin:/usr/sbin:/usr/sfw/sbin:/usr/openwin/bin:/export/home/peter/ghc/bin: is not an identifier
Running push.sh ...                              FAILED!
Output from failed push.sh:

test $DARCS || DARCS=$PWD/../darcs
ACTUAL_DARCS=`which $DARCS`
DARCSPATH=`dirname $ACTUAL_DARCS`
export PATH="$DARCSPATH:$PATH"
push.sh: PATH=/export/home/peter/tmp/darcs-1.0.8/..:/export/home/peter/tmp/darcs-1.0.8/tests/bin:/usr/bin:/usr/openwin/bin:/usr/ucb:/export/home/peter/bin:/usr/bin:/usr/sfw/bin:/usr/X11/bin:/usr/local/bin:/usr/sbin:/usr/sfw/sbin:/usr/openwin/bin:/export/home/peter/ghc/bin: is not an identifier
Running query_manifest.sh ...                    FAILED!
Output from failed query_manifest.sh:

check_manifest () {
   : > files.tmp
   echo . > dirs.tmp
   echo . > files-dirs.tmp
   for x in $1 ; do
       echo "./$x" >> files.tmp
       echo "./$x" >> files-dirs.tmp
   done
   for x in $2 ; do
       echo "./$x" >> dirs.tmp
       echo "./$x" >> files-dirs.tmp
   done
$DARCS query manifest $3 --files --no-directories | sort > darcs-files.tmp $DARCS query manifest $3 --no-files --directories | sort > darcs-dirs.tmp $DARCS query manifest $3 --files --directories | sort > darcs-files-dirs.tmp
   for x in files dirs files-dirs ; do
       sort -o sorted-$x.tmp $x.tmp
       diff sorted-$x.tmp darcs-$x.tmp
   done
}

test $DARCS || DARCS=$PWD/../darcs

rm -rf temp
mkdir temp
cd temp
$DARCS init

check_manifest "" "" "--no-pending"
check_manifest "" "" "--pending"
touch a b
$DARCS add a
check_manifest "" "" "--no-pending"
check_manifest "a" "" "--pending"
$DARCS add b
mkdir c
check_manifest "" "" "--no-pending"
1d0
< ./a
Running recordrace.sh ...                        passed.
Running replace_after_pending_add.sh ...         FAILED!
Output from failed replace_after_pending_add.sh:

[ -n "$DARCS" ] || DARCS=$PWD/../darcs
export EMAIL=tester
replace_after_pending_add.sh: EMAIL=tester: is not an identifier
Running replace_after_pending_mv.sh ...          FAILED!
Output from failed replace_after_pending_mv.sh:

[ -n "$DARCS" ] || DARCS=$PWD/../darcs
export EMAIL=tester
replace_after_pending_mv.sh: EMAIL=tester: is not an identifier
Running revert_interactive.sh ...                passed.
Running rmconflict.sh ...                        passed.
Running rmdir.sh ...                             FAILED!
Output from failed rmdir.sh:

test $DARCS || DARCS=$PWD/../darcs

rm -rf temp1
mkdir temp1
cd temp1
$DARCS init
mkdir foo
echo hello world > foo/bar
echo hello world > foo/baz
mkdir foo/dir
$DARCS add foo foo/bar foo/dir foo/baz
$DARCS record -a -m add -A x
Finished recording patch 'add'
rm -rf foo
test -e _darcs/pristine/foo/baz
rmdir.sh: test: argument expected
Running sametwice.sh ...                         FAILED!
Output from failed sametwice.sh:

test $DARCS || DARCS=$PWD/../darcs
rm -rf temp1 temp2
mkdir temp1
cd temp1
$DARCS init
echo record author me > _darcs/prefs/defaults
echo ALL all >> _darcs/prefs/defaults
echo ALL verbose >> _darcs/prefs/defaults
echo ALL ignore-times >> _darcs/prefs/defaults
touch foo
$DARCS add foo
Adding 'foo'
$DARCS record -m add_foo
About to get the unrecorded changes.
diffing dir...
I've gotten unrecorded.
Writing the patch file...
Applying to current...
Syncing timestamps...
Finished recording patch 'add_foo'
echo hello >> foo
$DARCS record -m mod_foo
About to get the unrecorded changes.
diffing dir...
I've gotten unrecorded.
Writing the patch file...
Applying to current...
Syncing timestamps...
Finished recording patch 'mod_foo'
cd ..
$DARCS get --repo-name temp2 temp1
Copying patch 2 of 2... done!
Finished getting.
cd temp2
cp ../temp1/_darcs/prefs/defaults _darcs/prefs
echo y/d/y | tr / \\012 | $DARCS unpull
diffing dir...

Mon Sep  4 15:59:00 CEST 2006  me
 * mod_foo
Shall I unpull this patch? (1/2)  [ynWvpxqadjk], or ? for help:

Mon Sep  4 15:59:00 CEST 2006  me
 * add_foo
Shall I unpull this patch? (2/2)  [ynWvpxqadjk], or ? for help:
Finished unpulling.
test -e foo -a ! -s foo
sametwice.sh: test: unknown operator foo
Running send.sh ...                              FAILED!
Output from failed send.sh:

test $DARCS || DARCS=$PWD/../darcs
export DARCS_EDITOR=echo
send.sh: DARCS_EDITOR=echo: is not an identifier
Running send_apply.sh ...                        passed.
Running several_commands.sh ...                  passed.
Running three_way_conflict.sh ...                passed.
Running tricky_unrecord.sh ...                   passed.
Running uniqueoptions.sh ...                     passed.
Running unpull.sh ...                            passed.
Running what_sl.sh ...                           passed.
TESTS FAILED!
       0_test.sh
       bad_pending_after_pull.sh
       dateparser.sh
       impossible_unrevert.sh
       no_pristine.sh
       pending.sh
       perms.sh
       posthook.sh
       pull_binary.sh
       push.sh
       query_manifest.sh
       replace_after_pending_add.sh
       replace_after_pending_mv.sh
       rmdir.sh
       sametwice.sh
       send.sh
make: *** [test_scripts] Error 1


_______________________________________________
darcs-users mailing list
[email protected]
http://www.abridgegame.org/mailman/listinfo/darcs-users

Reply via email to