Ticket #4014 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

hsc2hs cannot open custom template file

Reported by: golubovsky Owned by: igloo
Priority: high Milestone: 6.12.3
Component: hsc2hs Version: 6.12.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Note: this happens to hsc2hs which comes with binary ghc-6.12.2.

hsc2hs from darcs.haskell.org seems to not have this issue

When invoking hsc2hs like this:

hsc2hs -t /dev/null HS_GLFW_H.hsc

(or any other filename with -t, the hsc file has its own template), the output follows:

hsc2hs: : openBinaryFile: does not exist (No such file or directory)

Note the second colon: filename should be there, and it is empty.

strace log shows that there is an attempt to open a file with empty name (ca. line 534):

open("", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_LARGEFILE) = -1 ENOENT (No such file or directory)

Attachments

hsc2hs_strace.log Download (40.6 KB) - added by golubovsky 3 years ago.
Strace log from running hsc2hs -t /dev/null

Change History

Changed 3 years ago by golubovsky

Strace log from running hsc2hs -t /dev/null

Changed 3 years ago by igloo

  • owner set to igloo
  • priority changed from normal to high
  • status changed from new to assigned
  • milestone set to 6.12.3

Thanks for the report

Changed 3 years ago by igloo

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

Fixed in HEAD and 6.12 branch by:

Tue Apr 27 16:45:46 BST 2010  Ian Lynagh <igloo@earth.li>
  * Don't give an empty template flag argument if there is no flag; trac #4014
Note: See TracTickets for help on using tickets.