Caitlin | 18 Jan 07:28 2013
Picon

GHC compilation error (re-post).

Hi all.

I wrote the following test program:

bar x = x * x

on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1 (standalone) and I have noticed the same frustrating errors. Any suggestions would be most appreciated.

Thanks,

~Caitlin

C:\>ghci
GHCi, version 7.4.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude>
Prelude> :l bar
[1 of 1] Compiling Main             ( bar.hs, interpreted )
*** Exception: CreateDirectory ".": permission denied (Access is denied.)
>
> :l bar.hs
[1 of 1] Compiling Main             ( bar.hs, interpreted )
*** Exception: CreateDirectory ".": permission denied (Access is denied.)
>
> :l "C:\\bar.hs"
[1 of 1] Compiling Main             ( C:\bar.hs, interpreted )
*** Exception: CreateDirectory "C:\\": permission denied (Access is denied.)
>
>

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Ben Gamari | 18 Jan 19:05 2013
Picon

Re: GHC compilation error (re-post).

Caitlin <bioprogrammer <at> gmail.com> writes:

> Hi all.
>
> I wrote the following test program:
>
> bar x = x * x
>
> on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1
> (standalone) and I have noticed the same frustrating errors. Any
> suggestions would be most appreciated.
>
Are you certain you have write permission for C:\? I'm not terribly with
how Windows handles file permissions, but the error seems pretty
unambiguous as to its cause. It's a little strange to be placing files
like this in the root directory of a volume, anyways. Perhaps try
this in a directory which you certainly have adequate permissions in
(the Windows equivalent of $HOME perhaps. Wikipedia seems to think this
is %UserProfile%).

Cheers,

- Ben
Caitlin | 18 Jan 19:38 2013
Picon

Re: GHC compilation error (re-post).

Hi Ben and Garrett.

I am logged in as the administrator (full access rights). This problem is quite confusing since I recall using a older version of the GHC (standalone) without any incidents. I have no idea how to solve this particular problem.

Thanks,

~Caitlin




On Fri, Jan 18, 2013 at 11:05 AM, Ben Gamari <bgamari.foss <at> gmail.com> wrote:
Caitlin <bioprogrammer <at> gmail.com> writes:

> Hi all.
>
> I wrote the following test program:
>
> bar x = x * x
>
> on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1
> (standalone) and I have noticed the same frustrating errors. Any
> suggestions would be most appreciated.
>
Are you certain you have write permission for C:\? I'm not terribly with
how Windows handles file permissions, but the error seems pretty
unambiguous as to its cause. It's a little strange to be placing files
like this in the root directory of a volume, anyways. Perhaps try
this in a directory which you certainly have adequate permissions in
(the Windows equivalent of $HOME perhaps. Wikipedia seems to think this
is %UserProfile%).

Cheers,

- Ben


_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Brandon Allbery | 18 Jan 20:32 2013
Picon

Re: GHC compilation error (re-post).

On Fri, Jan 18, 2013 at 1:05 PM, Ben Gamari <bgamari.foss <at> gmail.com> wrote:
> on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1
> (standalone) and I have noticed the same frustrating errors. Any
> suggestions would be most appreciated.
>
Are you certain you have write permission for C:\? I'm not terribly with
how Windows handles file permissions, but the error seems pretty

I suspect it's more fundamental than that.

*** Exception: CreateDirectory ".": permission denied (Access is denied.)

Why is it trying to create "."?

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b <at> gmail.com                                  ballbery <at> sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
J. Garrett Morris | 18 Jan 20:53 2013
Picon

Re: GHC compilation error (re-post).

On Fri, Jan 18, 2013 at 11:32 AM, Brandon Allbery <allbery.b <at> gmail.com> wrote:
> On Fri, Jan 18, 2013 at 1:05 PM, Ben Gamari <bgamari.foss <at> gmail.com> wrote:
>>
>> > on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1
>> > (standalone) and I have noticed the same frustrating errors. Any
>> > suggestions would be most appreciated.
>> >
>> Are you certain you have write permission for C:\? I'm not terribly with
>> how Windows handles file permissions, but the error seems pretty
>
>
> I suspect it's more fundamental than that.
>
>> *** Exception: CreateDirectory ".": permission denied (Access is denied.)
>
>
> Why is it trying to create "."?

You can specify -o<dir> with a directory that doesn't exist; perhaps GHC
always tries to create the output directory?

In any case, I can confirm the observed behavior with GHC 7.6.1 on
Windows 8, running with elevated privilege.  It seems to only be a
problem in the root directory tho---while I can observe the problem in
both C:\ and D:\, I can't in any subdirectories thereof.

 /g

--

-- 
Sent from my mail client.
Brandon Allbery | 18 Jan 21:00 2013
Picon

Re: GHC compilation error (re-post).

On Fri, Jan 18, 2013 at 2:53 PM, J. Garrett Morris <jgmorris <at> cs.pdx.edu> wrote:
> Why is it trying to create "."?

You can specify -o<dir> with a directory that doesn't exist; perhaps GHC
always tries to create the output directory?

In any case, I can confirm the observed behavior with GHC 7.6.1 on
Windows 8, running with elevated privilege.  It seems to only be a
problem in the root directory tho---while I can observe the problem in
both C:\ and D:\, I can't in any subdirectories thereof.

That makes a certain amount of sense; the root directory of a drive is treated somewhat specially for backward compatibility reasons.  (In particular, "." is emulated --- on FAT, at least, neither "." nor ".." exists in a drive root, and this behavior may well be emulated to keep from confusing older programs.)

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b <at> gmail.com                                  ballbery <at> sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Caitlin | 18 Jan 21:06 2013
Picon

Re: GHC compilation error (re-post).

Ahh...I see. Thanks Brandon. I was unaware of that.

~Caitlin



On Fri, Jan 18, 2013 at 1:00 PM, Brandon Allbery <allbery.b <at> gmail.com> wrote:
On Fri, Jan 18, 2013 at 2:53 PM, J. Garrett Morris <jgmorris <at> cs.pdx.edu> wrote:
> Why is it trying to create "."?

You can specify -o<dir> with a directory that doesn't exist; perhaps GHC
always tries to create the output directory?

In any case, I can confirm the observed behavior with GHC 7.6.1 on
Windows 8, running with elevated privilege.  It seems to only be a
problem in the root directory tho---while I can observe the problem in
both C:\ and D:\, I can't in any subdirectories thereof.

That makes a certain amount of sense; the root directory of a drive is treated somewhat specially for backward compatibility reasons.  (In particular, "." is emulated --- on FAT, at least, neither "." nor ".." exists in a drive root, and this behavior may well be emulated to keep from confusing older programs.)

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b <at> gmail.com                                  ballbery <at> sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Caitlin | 18 Jan 21:05 2013
Picon

Re: GHC compilation error (re-post).

Thanks Garrett.

I deleted the Haskell Platform installation, manually removed all traces of GHC and the Hakell Platform from my registry and various folders, then re-installed the Haskell Platform. I created a folder under the 'C:\' drive, copied my .hs files there, changed to that subfolder started ghci. The file loaded without error. This seems like a problem the developers might address in the next release?

Thanks again for the help.

~Caitlin

On Fri, Jan 18, 2013 at 12:53 PM, J. Garrett Morris <jgmorris <at> cs.pdx.edu> wrote:
On Fri, Jan 18, 2013 at 11:32 AM, Brandon Allbery <allbery.b <at> gmail.com> wrote:
> On Fri, Jan 18, 2013 at 1:05 PM, Ben Gamari <bgamari.foss <at> gmail.com> wrote:
>>
>> > on a Win32 (SP3) machine using the Haskell Platform and GHC-7.6.1
>> > (standalone) and I have noticed the same frustrating errors. Any
>> > suggestions would be most appreciated.
>> >
>> Are you certain you have write permission for C:\? I'm not terribly with
>> how Windows handles file permissions, but the error seems pretty
>
>
> I suspect it's more fundamental than that.
>
>> *** Exception: CreateDirectory ".": permission denied (Access is denied.)
>
>
> Why is it trying to create "."?

You can specify -o<dir> with a directory that doesn't exist; perhaps GHC
always tries to create the output directory?

In any case, I can confirm the observed behavior with GHC 7.6.1 on
Windows 8, running with elevated privilege.  It seems to only be a
problem in the root directory tho---while I can observe the problem in
both C:\ and D:\, I can't in any subdirectories thereof.

 /g

--
Sent from my mail client.

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Ian Lynagh | 3 Feb 02:54 2013

Re: GHC compilation error (re-post).

On Fri, Jan 18, 2013 at 01:05:05PM -0700, Caitlin wrote:
> 
> I deleted the Haskell Platform installation, manually removed all traces of
> GHC and the Hakell Platform from my registry and various folders, then
> re-installed the Haskell Platform. I created a folder under the 'C:\'
> drive, copied my .hs files there, changed to that subfolder started ghci.
> The file loaded without error. This seems like a problem the developers
> might address in the next release?

Thanks for the report. I've fixed it in HEAD.

Thanks
Ian

Gmane