Opened 17 years ago

Closed 17 years ago

#10965 closed defect (fixed)

Can't build darcs with ghc-6.6

Reported by: steve@… Owned by: gwright@…
Priority: High Milestone:
Component: ports Version: 1.3.2
Keywords: Cc: gwright@…
Port:

Description

Firstly - thanks for the great work!

I noticed that the ghc port was finally buildable on my intel mac, so I installed it and then tried to build darcs.

Sadly, the darcs build failed. I understand that darcs is buildable with GHC 6.6, but I guess that darcs 1.0.8 is not. Must we wait for a new darcs release, or can the darcs port build from the ghc-6.6 branch of darcs?

Failure messages follow:

% sudo port install darcs                                               / 13:22
--->  Fetching darcs
--->  Verifying checksum(s) for darcs
--->  Extracting darcs
--->  Applying patches to darcs
--->  Configuring darcs
--->  Building darcs with target all
Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_devel_darcs/work/darcs-1.0.8" && PREFIX=/opt/local make all" returned error 2
Command output: Rebuild dependencies ...
test -f \Context.hs || echo unknown | ./stringify Context context > \Context.hs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c ThisVersion.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c Autoconf.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c Workaround.hs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c FastPackedString.hs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c Printer.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c DarcsUtils.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c Compat.hs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c AtExit.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c SignalHandler.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c DarcsURL.hs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c Lock.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c CheckFileSystem.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c Exec.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c Curl.hs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c CommandLine.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c PatchMatchData.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c DarcsFlags.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c External.hs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c ColourPrinter.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c UTF8.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c FileName.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c DarcsIO.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c RegChars.lhs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c Map.hs
ghc -I/opt/local/include -cpp  -package QuickCheck -package parsec -package unix -O -funbox-strict-fields -I/opt/local/include -Wall -Werror -I. -I/opt/local/include -DHAVE_CURSES -DHAVE_CURL -c Lcs.lhs

Lcs.lhs:433:8: Not in scope: type constructor or class `HasBounds'
make: *** [Lcs.o] Error 1

Error: Status 1 encountered during processing.

Attachments (3)

patch-Lcs.lhs (1.8 KB) - added by jon.olsson@… 17 years ago.
Patch 1 needed for GHC 6.6 build
patch-configure.ac (681 bytes) - added by jon.olsson@… 17 years ago.
Patch 2 needed with GHC 6.6
darcs.diff (321 bytes) - added by jon.olsson@… 17 years ago.
Portfile diff to include the two patches

Download all attachments as: .zip

Change History (10)

comment:1 Changed 17 years ago by steve@…

Just for fun, I tried compiling darcs-1.0.9rc1 with the macports ghc-6.6. It gets further, but fails at the linking stage:

Linking darcs ...
ghc -cpp  -package QuickCheck -package mtl -package parsec -package html -package unix -O -funbox-strict-fields  -Wall -Werror -I. -DHAVE_CURSES -DHAVE_CURL -optl-L/opt/local/lib -optl-lcurl -optl-L/opt/local/lib -optl-L/opt/local/lib -optl-lssl -optl-lcrypto -optl-L/opt/local/lib -optl-lz -optl-lcurses -o darcsman darcsman.hs c_compat.o maybe_relink.o atomic_create.o fpstring.o umask.o hscurl.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 Global.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
/usr/bin/l/usr/bin/ld: Undefined symbols:
_regexzmcompatzm0zi71_TextziRegex_a1_closure
_regexzmcompatzm0zi71_Textzd: iRegUndefined symbols:
_regexzmcompatzm0zi71_TextziRegex_a1_closurex_a1_info
_re
_egexzmcompatzm0zi71_TextziRegex_mkregexzmcompatzm0zi71_TRegex_cloextziRegex_a1_info
s_regexzmcompatzm0zi71_TextziRegex_ure
m_regkRegex_closure
_regexzmcompatzm0zi71_TeexxtzzmicRoemgpeaxt_mzkRemg0ezxi_7i1n_fToe
xtz_irRegexezgmecxo_mmpkaRtezgme0xz_ii71_nTfeox
tzi_Rreeggeexx_zlmvl3_ccolmopsautrzem
0z_ir7e1g_exzTmepxotsziixRzemg0ezxi_7l1v_Telx3t_zcilRoesguerxez
iPo_sixzrieSgterxiznmgp_omsaikxezRmege0xzOip7t1s__TcelxotszuirRee
gexziPosixziString_makeRegexOpts__regexzmposixzmclosure
_regexzmposixzm0zi71_TextziR0zi71_TextziRegexziPosixziString_makeRegexOpts_info
_regexzegexziPosixmposixzm0zi71_TextziRegexziPosixziWrap_execziSBlatrinnk_closg_makuree
collect2: ld retuRegexOpts_info
_regexzmposixzm0zi71_Terned x1 exit sttziRegexziPosixziWratus
ap_execBlank_closure
collect2: ld returned 1 exit status
make: *** [darcsman] Error 1
make: *** Waiting for unfinished jobs....
make: *** [darcs] Error 1

comment:2 Changed 17 years ago by jon.olsson@…

Try adding --make to ghc switches in the makefile, that'll pick up the library depencies correctly.

Changed 17 years ago by jon.olsson@…

Attachment: patch-Lcs.lhs added

Patch 1 needed for GHC 6.6 build

Changed 17 years ago by jon.olsson@…

Attachment: patch-configure.ac added

Patch 2 needed with GHC 6.6

Changed 17 years ago by jon.olsson@…

Attachment: darcs.diff added

Portfile diff to include the two patches

comment:3 Changed 17 years ago by jon.olsson@…

And this patch is also needed:

--- patch-GNUmakefile.orig      2006-11-02 16:34:14.000000000 +0100
+++ patch-GNUmakefile   2006-11-02 16:34:25.000000000 +0100
@@ -4,7 +4,7 @@
  
  C_OBJS := compat.o fpstring.o zlib_helper.o c_context.o
  
-+GHCFLAGS += -I${PREFIX}/include
++GHCFLAGS += -I${PREFIX}/include -package mtl
 +
  ifeq ($(SYS), windows)
  GHCFLAGS += -iwin32 -Iwin32 -threaded -DOVERRIDE_RENAMEFILE -DWIN32

comment:4 Changed 17 years ago by markd@…

Cc: gwright@… added

Cc maintainer.

comment:5 Changed 17 years ago by gwright@…

Owner: changed from yeled@… to gwright@…
Priority: BlockerImportant
Status: newassigned

Should be fixed. I dropped the priority from Blocker -> Important. Blocker means that the problem affects many ports. "Important" should be used for ports that don't build.

Give it a try and if it works for others I'll close the bug.

-Greg

comment:6 Changed 17 years ago by ryan@…

The patches work for me...this should probably be closed.

comment:7 Changed 17 years ago by gwright@…

Resolution: fixed
Status: assignedclosed

Thanks for giving it a try. I'm closing this bug.

-Greg

Note: See TracTickets for help on using tickets.