JRuby

Shell scripts from JRuby dist tarball built on Windows don't work on Linux due to wrong line endings

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.1
  • Fix Version/s: JRuby 1.1
  • Component/s: Miscellaneous
  • Labels:
    None
  • Number of attachments :
    0

Description

I checked out the JRuby source on Windows and built jruby-bin-1.0.0RC2.tar.gz on Windows. I then copied over the tarball to a Linux machine, extracted it, and attempted to run JRuby:

[albert@dogbert ~]$ jruby-1.0.0RC2/bin/jruby foo.rb
-bash: jruby-1.0.0RC2/bin/jruby: /bin/bash^M: bad interpreter: No such file or directory

This error is due to the jruby script (and probably the other scripts) having Windows line endings instead of UNIX line endings.

Ant's FixCRLF Task can probably fix this issue.

Activity

Hide
Charles Oliver Nutter added a comment -

The workaround is to build on Linux. We'll see if we can fix this post 1.0 though.

Show
Charles Oliver Nutter added a comment - The workaround is to build on Linux. We'll see if we can fix this post 1.0 though.
Hide
Charles Oliver Nutter added a comment -

Albert: if you're still out there, want to provide a patch for build.xml?

Show
Charles Oliver Nutter added a comment - Albert: if you're still out there, want to provide a patch for build.xml?
Hide
Albert Strasheim added a comment -

The easy solution here might be to set a proper svn:eol-style property on the relevant files in the repository.

Show
Albert Strasheim added a comment - The easy solution here might be to set a proper svn:eol-style property on the relevant files in the repository.
Hide
Charles Oliver Nutter added a comment -

I'm not sure that would help, since by the time you've built a dist the files have already been checked out Windows-style.

Show
Charles Oliver Nutter added a comment - I'm not sure that would help, since by the time you've built a dist the files have already been checked out Windows-style.
Hide
Thomas E Enebo added a comment -

I will point out that windows now has this issue with cygwin since cygwin now requires shell scripts to not have \r\n lines in them. Looks like CRLF ant task can solve this for us.

Show
Thomas E Enebo added a comment - I will point out that windows now has this issue with cygwin since cygwin now requires shell scripts to not have \r\n lines in them. Looks like CRLF ant task can solve this for us.
Hide
Vladimir Sizikov added a comment -

Fixed in rev. r5861 on trunk.

Show
Vladimir Sizikov added a comment - Fixed in rev. r5861 on trunk.
Hide
Charles Oliver Nutter added a comment -

Marking bugs with invalid "fixed for release" as fixed in 1.1.

Show
Charles Oliver Nutter added a comment - Marking bugs with invalid "fixed for release" as fixed in 1.1.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: