Problem building on NetBSD Alpha - Dynamic link dependency?

Matthias Kilian kili at outback.escape.de
Wed Jan 9 16:00:12 EST 2008


On Wed, Jan 09, 2008 at 07:42:21PM +0000, jim burton wrote:
> I'm trying to build unregistered 6.8.2 on NetBSD Alpha 2.1.0_STABLE -- I
> have the following problem which seems to be same as this one -
> http://hackage.haskell.org/trac/ghc/ticket/1860 

No, I think it's another problem.

> $ ./configure --enable-hc-boot --enable-hc-boot-unregistered
[...]
> checking for ld... /usr/bin/ld
> checking for path to top of build tree... ./configure[3201]: -v0: not
> found
> ./configure[3203]: utils/pwd/pwd: not found
> configure: error: cannot determine current directory

What happens here is that configure tries to compile some utility
program (utils/pwd/pwd) using an existing ghc, which of course is
impossible when you're porting ghc a platform not already running
ghc. Similar problems are located in libraries and the Cabal-generated
GNUmakefiles.

For the utils/pwd/pwd problem, I really don't understand why that
thing is required at all, since it does little more than get the
pwd and add some slash or backslash escaping/quadrupling depending
on the argument passed to it.

You may try the patch below (and don't forget to re-run autoconf).

Note that this is the quick hack I did for OpenBSD. If the forward slash
hack of util/pwd is really required (for Windows builds?), something
like

hardtop=`pwd | tr '\\' /`

would be more appropriate. And the other sanity checks I deleted
may be necessary in some cases, too, but I really don't see the
point in them.

Ciao,
	Kili

ps: IMHO, libaries/ifBuildable.hs should die a horrible death, too.
It can replaced with a few lines of shell commands..


--- aclocal.m4.orig	Mon Dec 10 19:11:31 2007
+++ aclocal.m4	Fri Jan  4 13:58:49 2008
@@ -1098,28 +1098,7 @@ AC_REQUIRE([AC_PROG_CC])
 AC_DEFUN([FP_FIND_ROOT],[
 AC_MSG_CHECKING(for path to top of build tree)
 
-dnl This would be
-dnl     make -C utils/pwd clean && make -C utils/pwd
-dnl except we don't want to have to know what make is called. Sigh.
-if test ! -f utils/pwd/pwd && test ! -f utils/pwd/pwd.exe; then
-  cd utils/pwd
-  rm -f *.o
-  rm -f *.hi
-  rm -f pwd
-  rm -f pwd.exe
-  $WithGhc -v0 --make pwd -o pwd
-  cd ../..
-fi
-
-hardtop=`utils/pwd/pwd forwardslash`
-
-if ! test -d "$hardtop"; then
-  AC_MSG_ERROR([cannot determine current directory])
-fi   
-
-dnl Remove common automounter nonsense
-dnl
-hardtop=`echo $hardtop | sed 's|^/tmp_mnt.*\(/local/.*\)$|\1|' | sed 's|^/tmp_mnt/|/|'`
+hardtop=`pwd`
 
 AC_SUBST(hardtop)
 


More information about the Glasgow-haskell-users mailing list