Ticket #5154 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Trouble porting GHC to Haiku: wrong shebang in Perl boot script

Reported by: mcandre Owned by: igloo
Priority: normal Milestone:
Component: Build System Version: 7.0.3
Keywords: perl boot shebang compile source Cc:
Operating System: Other Architecture: Unknown/Multiple
Type of failure: Building GHC failed Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

~> perl boot
Can't exec "/usr/bin/perl": No such file or directory at boot line 8.
Running boot-pkgs failed: -1 at boot line 8.
~> which perl
/boot/common/bin/perl

Please change all instances of /usr/bin/perl to /usr/bin/env perl in GHC. That way the GHC build process doesn't depend on perl being installed in a specific place.

Attachments

boot.patch Download (378 bytes) - added by mcandre 2 years ago.
Modifies the Perl boot script to work on many more systems

Change History

Changed 2 years ago by mcandre

Changing the two instances of /usr/bin/perl to /usr/bin/env perl isn't enough to fix the problem on Haiku.

But changing both of them to just perl helps.

~> perl boot
Creating libraries
...

Changed 2 years ago by igloo

  • status changed from new to closed
  • resolution set to wontfix

The GHC build process will detect the location of perl, and use that.

However, the binary distributions make various assumptions about the system, so will never be fully universal.

If you make Haiku packages of GHC, then they should work fine.

Changed 2 years ago by mcandre

  • status changed from closed to new
  • resolution wontfix deleted

I don't understand. "Porting GHC to a new platform" ( http://hackage.haskell.org/trac/ghc/wiki/Building/Porting) says to run perl boot . The GHC build process as described in that document does NOT detect the location of Perl, rather it assumes Perl is in /usr/bin . This part of the build process fails on Haiku unless the shebang and system call are changed. And the rest of the build process depends on this.

Changed 2 years ago by igloo

Oh, hmm. What do these commands say for you?

perl --version
echo '#!/tmp/perl' > q.pl; echo 'print "Hello\n"'>> q.pl; perl q.pl

Changed 2 years ago by mcandre

~> perl --version

This is perl, v5.10.1 (*) built for BePC-haiku

Copyright 1987-2009, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
~> echo '#!/tmp/perl' > q.pl; echo 'print "Hello\n"'>> q.pl; perl q.pl
Hello

A recent Perl is installed in Haiku, it's just in a different place than most Unixes.

~> which perl
/boot/common/bin/perl

That's why I'm asking for Perl shebangs to be changed to the more general /usr/bin/env perl , or even better, simply perl . In the boot script, the system call should also be modified.

Changed 2 years ago by igloo

  • owner set to igloo

Ah, I see. So with perl boot it's not the #! line causing the problem, but the system call when running boot-pkgs.

Changed 2 years ago by mcandre

Modifies the Perl boot script to work on many more systems

Changed 2 years ago by mcandre

BOTH lines need to be changed. Patch uploaded.

Changed 2 years ago by igloo

  • status changed from new to closed
  • resolution set to fixed

I believe perl boot will work now (changeset:51bbdda993815fc0c3e55cbfcc60ffd512b9d4bd); please reopen if you still have problems.

Note: See TracTickets for help on using tickets.