Opened 3 years ago

Closed 3 years ago

#5347 closed bug (worksforme)

Help Me Port Haskell to Haiku OS

Reported by: mcandre Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.0.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Building GHC failed Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I'm following the Building/Porting tutorial, and a few bugs are slowing the process.

Haiku's version of Git has poor OpenSSL support, so "git clone" borks. Solution: Download and unpack the source tarball.

The Perl boot script borks because Perl isn't always in /usr/bin. Solution: Patch boot with boot.patch.

In Haiku, the configure step fails, seemingly because it ignores the --enable-hc-boot and tries to use a non-existing GHC to build GHC.

~/Desktop/ghc-7.0.3> setgcc gcc4
~/Desktop/ghc-7.0.3> gcc --version
gcc (GCC) 4.4.4
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~/Desktop/ghc-7.0.3> export PLATFORM=i386-unknown-haiku
~/Desktop/ghc-7.0.3> ./configure --enable-hc-boot --build=$PLATFORM --host=$PLATFORM --target=$PLATFORM
checking for gfind... no
checking for find... /bin/find
checking for sort... /bin/sort
checking for ghc... no
checking build system type... i386-unknown-haiku
checking host system type... i386-unknown-haiku
checking target system type... i386-unknown-haiku
This GHC () does not generate code for the build platform
   GHC target platform    : 
   Desired build platform : i386-unknown-haiku

There is no GHC because I am trying to port GHC to Haiku!

The above configure command works fine in Mac OS X, my host platform. But the tutorial needs to copy files created during the configure step from Haiku to Mac OS X in order to build a GHC to work from while porting GHC to Haiku.

What am I doing wrong?

Change History (3)

comment:1 Changed 3 years ago by igloo

  • Resolution set to worksforme
  • Status changed from new to closed

You mean with the same source tarball the command works on OS X, but not Haiku?

If so, I'd guess autoreconf or sh on Haiku isn't behaving as expected. I'd suggest tracing through the configure script and seeing what is going wrong (e.g. see whether BootingFromHc isn't getting set correctly, or if the test of its value is going wrong, or what).

By the way, just a heads-up: the porting process tends to bitrot, so you are likely to run into a few more issues along the way. We're also slowly working towards a cross-compiling ghc as an alternative porting process.

I'd recommend working with the HEAD from git, as that's where any fixes will go. Perhaps the easiest way for you to do so would be to check out a tree on OS X and then tar that up.

I'm going to close this ticket; the glasgow-haskell-users list is probably a better place for help on porting.

comment:2 Changed 3 years ago by mcandre

  • Resolution worksforme deleted
  • Status changed from closed to new

I can barely step through the config scripts. Could you setup a quick Haiku installation, say in VMware Player, and follow the same steps?

comment:3 Changed 3 years ago by igloo

  • Resolution set to worksforme
  • Status changed from new to closed

trac is not good for having discussions. Please use the glasgow-haskell-users mailing list instead.

Note: See TracTickets for help on using tickets.