Opened 8 years ago

Closed 8 years ago

#5697 closed bug (fixed)

loadObj() fails with a Unicode file path on Windows

Reported by: guest Owned by: simonmar
Priority: high Milestone: 7.4.1
Component: GHCi Version: 7.0.4
Keywords: panic Cc:
Operating System: Windows Architecture: x86
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by simonpj)

>> cabal install vector

Loading package primitive-0.4.0.1 ... ghc.exe: panic! (the 'impossible' happened)
  (GHC version 7.0.3 for i386-unknown-mingw32):
        loadObj "C:\\Users\\Username\\AppData\\Roaming\\cabal\\primitive-0.4.0.1\\ghc-7.0.3\\HSprimitive-0.4.0.1.o": failed

on Windows 7. Other packages install properly.

Attachments (1)

HSprimitive-0.4.0.1.o (140.6 KB) - added by guest 8 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 8 years ago by guest

Type of failure: Runtime crashCompile-time crash

comment:2 Changed 8 years ago by simonmar

difficulty: Unknown
Resolution: worksforme
Status: newclosed
Version: 7.2.17.0.3

Works for me with 7.0.4 on Windows. Could you try a later version and reopen the ticket if you can still reproduce it?

comment:3 Changed 8 years ago by guest

Resolution: worksforme
Status: closednew
Loading package primitive-0.4.0.1 ... ghc.exe: panic! (the 'impossible' happened
)
  (GHC version 7.0.4 for i386-unknown-mingw32):
        loadObj "C:\\Users\\\1053\1077 \1047\1086\1103\\AppData\\Roaming\\cabal\
\primitive-0.4.0.1\\ghc-7.0.4\\HSprimitive-0.4.0.1.o": failed

comment:4 Changed 8 years ago by guest

Just try

cabal install agda-executable

Changed 8 years ago by guest

Attachment: HSprimitive-0.4.0.1.o added

comment:5 Changed 8 years ago by simonmar

Milestone: 7.4.1
Priority: normalhigh

I successfully installed agda-executable, but looking at the second error message posted I think I see where the problem might be:

loadObj "C:\\Users\\\1053\1077 \1047\1086\1103\\AppData\\Roaming\\cabal\\primitive-0.4.0.1\\ghc-7.0.4\\HSprimitive-0.4.0.1.o": failed

It looks like your user name is made of Unicode, and we are probably not passing this filename correctly to loadObj.

comment:6 Changed 8 years ago by simonmar

Summary: primitive-0.4.0.1 panicloadObj() fails with a Unicode file path on Windows

comment:7 Changed 8 years ago by simonpj

Description: modified (diff)
Owner: set to simonmar

comment:8 Changed 8 years ago by marlowsd@…

commit 81c69f305c79c181a2e15cf88615baa441dae755

Author: Simon Marlow <marlowsd@gmail.com>
Date:   Fri Jan 6 14:51:40 2012 +0000

    Make the RTS linker API use wide-char pathnames on Windows (#5697)
    
    I haven't been able to test whether this works or not due to #5754,
    but at least it doesn't appear to break anything.

 compiler/ghci/ObjLink.lhs |   38 ++++---------
 includes/rts/Linker.h     |   18 ++++--
 rts/Linker.c              |  136 +++++++++++++++++++++++++++-----------------
 rts/LinkerInternals.h     |    2 +-
 4 files changed, 107 insertions(+), 87 deletions(-)

comment:9 Changed 8 years ago by guest

Operating System: WindowsUnknown/Multiple
Version: 7.0.37.0.4

just checked 7.0.4 with unicode path in linux - got same error like on windows, but not fatal: "кабал" in path was replaced by ":010;", so binaries got installed in another directory

please check your patch on linux too

comment:10 Changed 8 years ago by guest

Operating System: Unknown/MultipleWindows

sorry, of course bug in prev post is not the same as #5697.

wine reports #5697 error as expected.

another bug is that in wine, windows and linux with 7.0.4

cabal changes unicode characters in install path to some other, probably ASCII, like in prev post.

possibly this is related with #5754

comment:11 Changed 8 years ago by simonmar

Component: CompilerGHCi
Status: newmerge

The bug in this ticket is now fixed. I've tested it by hand, but testing it automatically is ridiculously hard due to code page problems (see #5754) so I'm giving up.

comment:12 Changed 8 years ago by igloo

Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.