Re: Windows: cannot create here-doc

2018-04-04 Thread Phyx
Hi Simon,

This one is very strange, from the error and the fact that it continues it
looks like whatever TEMP and TMP
are pointing to are not always available or some locking issue is going on.

I would try running ProcMon
https://docs.microsoft.com/en-us/sysinternals/downloads/procmon and
filtering paths to
whatever TEMP and TMP are set to.

In the dialog that opens when you run it, select in the first box path,
select the "starts with" condition then enter the Windows version of the
path in the third one.
Make sure the final box is set to "Include" and press add. Then try again.
Once it fails, stop capturing (File -> click on "capture events" to
unselect).

This should contain the accesses to things in your TEMP and why it failed.

(If TEMP contains a unix path you can get a windows one with e.g  cygpath
-w $TEMP)

Once we know more can figure out what's going on.

Thanks,
Tamar

On Wed, Apr 4, 2018 at 10:17 PM, Simon Peyton Jones 
wrote:

> Tamar
>
> I think your suggestion of adding
>
> # Set user-defined locale
> export LANG=$(locale -uU)
>
> worked.  No more perl messages.
>
> Still having various troubles…
>
> Here’s the current one (log below).  I’m getting lots of
>
>./configure: line 2534: cannot create temp file for here-document:
> Device or resource busy
>
> And finally
>
> checking whether the C compiler works... no
>
> sed: can't read conftest.c: No such file or directory
>
> configure: error: in `/c/code/HEAD':
>
> configure: error: C compiler cannot create executables
>
> I have environment variables TEMP and TMP set.
>
> Oddly, re-running configure gets further – see second log below.
>
> All deeply strange.
>
> Thanks
>
> Simon
>
>
>
> *Log 1: first run of ‘sh validate –fast’*
>
> Creating libraries/array/ghc.mk
>
> Creating libraries/base/ghc.mk
>
> Creating libraries/binary/ghc.mk
>
> Creating libraries/bytestring/ghc.mk
>
> Creating libraries/Cabal/Cabal/ghc.mk
>
> Creating libraries/containers/ghc.mk
>
> Creating libraries/deepseq/ghc.mk
>
> Creating libraries/directory/ghc.mk
>
> Creating libraries/dph/dph-base/ghc.mk
>
> Creating libraries/dph/dph-prim-interface/ghc.mk
>
> Creating libraries/dph/dph-prim-seq/ghc.mk
>
> Creating libraries/dph/dph-prim-par/ghc.mk
>
> Creating libraries/dph/dph-lifted-base/ghc.mk
>
> Creating libraries/dph/dph-lifted-boxed/ghc.mk
>
> Creating libraries/dph/dph-lifted-copy/ghc.mk
>
> Creating libraries/dph/dph-lifted-vseg/ghc.mk
>
> Creating libraries/filepath/ghc.mk
>
> Creating libraries/ghc-boot/ghc.mk
>
> Creating libraries/ghc-boot-th/ghc.mk
>
> Creating libraries/ghc-compact/ghc.mk
>
> Creating libraries/ghc-prim/ghc.mk
>
> Creating libraries/ghci/ghc.mk
>
> Creating libraries/haskeline/ghc.mk
>
> Creating libraries/hpc/ghc.mk
>
> Creating libraries/integer-gmp/ghc.mk
>
> Creating libraries/integer-simple/ghc.mk
>
> Creating libraries/mtl/ghc.mk
>
> Creating libraries/parallel/ghc.mk
>
> Creating libraries/parsec/ghc.mk
>
> Creating libraries/pretty/ghc.mk
>
> Creating libraries/primitive/ghc.mk
>
> Creating libraries/process/ghc.mk
>
> Creating libraries/random/ghc.mk
>
> Creating libraries/stm/ghc.mk
>
> Creating libraries/template-haskell/ghc.mk
>
> Creating libraries/terminfo/ghc.mk
>
> Creating libraries/text/ghc.mk
>
> Creating libraries/time/ghc.mk
>
> Creating libraries/transformers/ghc.mk
>
> Creating libraries/unix/ghc.mk
>
> Creating libraries/vector/ghc.mk
>
> Creating libraries/Win32/ghc.mk
>
> Creating libraries/xhtml/ghc.mk
>
> Booting .
>
> Booting libraries/base/
>
> Booting libraries/directory/
>
> Booting libraries/ghc-prim/
>
> Booting libraries/integer-gmp/
>
> Booting libraries/process/
>
> Booting libraries/terminfo/
>
> Booting libraries/time/
>
> Booting libraries/unix/
>
> *./configure: line 2534: cannot create temp file for here-document: Device
> or resource busy*
>
> checking for gfind... no
>
> checking for find... /usr/bin/find
>
> checking for sort... /usr/bin/sort
>
> checking for GHC version date... inferred 8.5.20180402
>
> checking for GHC Git commit id... inferred 6ae53e4f4af1a156a875e05a2c12ef
> eaa2e7d902
>
> checking for ghc... /c/fp/HP-8.2.2/bin/ghc
>
> checking version of ghc... 8.2.2
>
> GHC path canonicalised to: c:/fp/HP-8.2.2/bin/ghc
>
> checking build system type... x86_64-pc-mingw64
>
> checking host system type... x86_64-pc-mingw64
>
> checking target system type... x86_64-pc-mingw64
>
> Build platform inferred as: x86_64-unknown-mingw32
>
> Host platform inferred as: x86_64-unknown-mingw32
>
> Target platform inferred as: x86_64-unknown-mingw32
>
> GHC build  : x86_64-unknown-mingw32
>
> GHC host   : x86_64-unknown-mingw32
>
> GHC target : x86_64-unknown-mingw32
>
> LLVM target: x86_64-unknown-windows
>
> checking for path to top of build tree... C:/code/HEAD
>
> configure: Checking for Windows toolchain tarballs...
>
> configure: Extracting Windows toolchain from archives (may take a while)...
>
> configure: In-tree MingW-w64 tree created
>
> checking for 

RE: More windows

2018-04-04 Thread Simon Peyton Jones via ghc-devs
The solution seems to be to cache the user info locally instead of it having to 
query the domain controller everytime.

Ah yes: here’s a better expressed post: http://bjg.io/guide/cygwin-ad/

I did the following

  *   commented out the “db” part for passwd and group in 
c:/msys64/etc/nsswitch.conf, to give this:

# Begin /etc/nsswitch.conf



passwd: files #db

group: files #db



db_enum: cache builtin



db_home: windows

db_shell: cygwin desc

db_gecos: cygwin desc



# End /etc/nsswitch.conf


  *   Note that I also set db_home to ‘windows’, so that it gets my windows 
home directory.  I think an explicit path would also be OK
  *   However I discovered that having just “files” for “passwd” in 
nsswitch.conf means that ssh looks in c:/msys64/etc/passwd to find the home 
directory for .ssh, totally ignoring the $HOME environment variable, and 
ignoring the db_home setting.
  *   But there IS no /etc/passwd file!   So I created one

mkpasswd -c > /etc/passwd

mkgroup -c > /etc/group

And then I manually edited /etc/passwd to put in the correct home directory.

What a saga!


Is it faster now?  Hard to tell.
Simon

From: Phyx 
Sent: 03 April 2018 07:00
To: Simon Peyton Jones 
Cc: ghc-devs@haskell.org
Subject: Re: More windows

Hi Simon,

Hmm I'm not sure about replacing sh with bash. I think bash has some Non-POSIX 
extensions that may affect the behavior of valid posix scripts.

Is bash --login slow as well? How about once sh or bash starts, are commands 
still slow then?

I assume your computer is domain joined and you may be hitting a very long 
standing issue with certain domain joined machines 
https://github.com/Alexpux/MSYS2-packages/issues/138#issuecomment-70813762

The solution seems to be to cache the user info locally instead of it having to 
query the domain controller everytime. See solution 2 here
https://gist.github.com/k-takata/9b8d143f0f3fef5abdab
 for instructions

Does that help the problem?

I believe you had a similar problem last time setting up a new machine. At that 
time magit was also slow.

Kind regards,
Tamar

On Mon, Apr 2, 2018, 23:23 Simon Peyton Jones 
> wrote:
Tamar
I’ve noticed that “sh” (which is invoked at lot by make etc) takes AGES to 
start up.  At least I think it’s ‘sh’ that is causing the delay.
I think it’s c:/msys64/usr/bin/sh.exe
From searching the web (eg 
https://www2.cs.duke.edu/csl/docs/unix_course/intro-60.html)
  it seems likely that it executes c:/msys64/etc/profile first.
And If I put an ‘echo’ at the start and end of that file, they do seem to take 
place with a significant gap between them.
I have not started sprinkling more echos, but does that ring any bells?
Can I replace ‘sh’ with c:/msys64/usr/bin/bash.exe, which seems to be faster?   
(My evnt variable SHELL already points to bash.exe. )  And if so, how would I 
do that? An environment variable.  Physically copy bash.exe to sh.exe?  Or what?
Thanks
Simon
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Windows: cannot create here-doc

2018-04-04 Thread Simon Peyton Jones via ghc-devs
Tamar
I think your suggestion of adding

# Set user-defined locale
export LANG=$(locale -uU)
worked.  No more perl messages.
Still having various troubles...
Here's the current one (log below).  I'm getting lots of

   ./configure: line 2534: cannot create temp file for here-document: 
Device or resource busy
And finally

checking whether the C compiler works... no

sed: can't read conftest.c: No such file or directory

configure: error: in `/c/code/HEAD':

configure: error: C compiler cannot create executables
I have environment variables TEMP and TMP set.
Oddly, re-running configure gets further - see second log below.
All deeply strange.
Thanks
Simon

Log 1: first run of 'sh validate -fast'

Creating libraries/array/ghc.mk

Creating libraries/base/ghc.mk

Creating libraries/binary/ghc.mk

Creating libraries/bytestring/ghc.mk

Creating libraries/Cabal/Cabal/ghc.mk

Creating libraries/containers/ghc.mk

Creating libraries/deepseq/ghc.mk

Creating libraries/directory/ghc.mk

Creating libraries/dph/dph-base/ghc.mk

Creating libraries/dph/dph-prim-interface/ghc.mk

Creating libraries/dph/dph-prim-seq/ghc.mk

Creating libraries/dph/dph-prim-par/ghc.mk

Creating libraries/dph/dph-lifted-base/ghc.mk

Creating libraries/dph/dph-lifted-boxed/ghc.mk

Creating libraries/dph/dph-lifted-copy/ghc.mk

Creating libraries/dph/dph-lifted-vseg/ghc.mk

Creating libraries/filepath/ghc.mk

Creating libraries/ghc-boot/ghc.mk

Creating libraries/ghc-boot-th/ghc.mk

Creating libraries/ghc-compact/ghc.mk

Creating libraries/ghc-prim/ghc.mk

Creating libraries/ghci/ghc.mk

Creating libraries/haskeline/ghc.mk

Creating libraries/hpc/ghc.mk

Creating libraries/integer-gmp/ghc.mk

Creating libraries/integer-simple/ghc.mk

Creating libraries/mtl/ghc.mk

Creating libraries/parallel/ghc.mk

Creating libraries/parsec/ghc.mk

Creating libraries/pretty/ghc.mk

Creating libraries/primitive/ghc.mk

Creating libraries/process/ghc.mk

Creating libraries/random/ghc.mk

Creating libraries/stm/ghc.mk

Creating libraries/template-haskell/ghc.mk

Creating libraries/terminfo/ghc.mk

Creating libraries/text/ghc.mk

Creating libraries/time/ghc.mk

Creating libraries/transformers/ghc.mk

Creating libraries/unix/ghc.mk

Creating libraries/vector/ghc.mk

Creating libraries/Win32/ghc.mk

Creating libraries/xhtml/ghc.mk

Booting .

Booting libraries/base/

Booting libraries/directory/

Booting libraries/ghc-prim/

Booting libraries/integer-gmp/

Booting libraries/process/

Booting libraries/terminfo/

Booting libraries/time/

Booting libraries/unix/

./configure: line 2534: cannot create temp file for here-document: Device or 
resource busy

checking for gfind... no

checking for find... /usr/bin/find

checking for sort... /usr/bin/sort

checking for GHC version date... inferred 8.5.20180402

checking for GHC Git commit id... inferred 
6ae53e4f4af1a156a875e05a2c12efeaa2e7d902

checking for ghc... /c/fp/HP-8.2.2/bin/ghc

checking version of ghc... 8.2.2

GHC path canonicalised to: c:/fp/HP-8.2.2/bin/ghc

checking build system type... x86_64-pc-mingw64

checking host system type... x86_64-pc-mingw64

checking target system type... x86_64-pc-mingw64

Build platform inferred as: x86_64-unknown-mingw32

Host platform inferred as: x86_64-unknown-mingw32

Target platform inferred as: x86_64-unknown-mingw32

GHC build  : x86_64-unknown-mingw32

GHC host   : x86_64-unknown-mingw32

GHC target : x86_64-unknown-mingw32

LLVM target: x86_64-unknown-windows

checking for path to top of build tree... C:/code/HEAD

configure: Checking for Windows toolchain tarballs...

configure: Extracting Windows toolchain from archives (may take a while)...

configure: In-tree MingW-w64 tree created

checking for genlib... no

configure: Making in-tree perl tree

configure: In-tree perl tree created

checking for -windres... no

checking for windres... windres

checking for -dllwrap... no

checking for dllwrap... dllwrap

checking for -objdump... C:/code/HEAD/inplace/mingw/bin/objdump.exe

./configure: line 5421: cannot create temp file for here-document: Device or 
resource busy

checking whether the C compiler works... no

sed: can't read conftest.c: No such file or directory

configure: error: in `/c/code/HEAD':

configure: error: C compiler cannot create executables

See `config.log' for more details
$
Log 2: run of "./configure"

$ ./configure

./configure: line 2542: cannot create temp file for here-document: Device or 
resource busy

configure: loading site script /usr/local/etc/config.site

checking for gfind... no

checking for find... /usr/bin/find

checking for sort... /usr/bin/sort

checking for GHC version date... inferred 8.5.20180402

checking for GHC Git commit id... inferred 
6ae53e4f4af1a156a875e05a2c12efeaa2e7d902

checking for ghc... /c/fp/HP-8.2.2/bin/ghc

checking version of ghc... 8.2.2

GHC path canonicalised to: c:/fp/HP-8.2.2/bin/ghc

checking build system type... x86_64-w64-mingw32

checking host system type... x86_64-w64-mingw32

checking target system 

Re: Perl locale

2018-04-04 Thread Phyx
Hi Simon,

That's weird, "ENG" isn't a valid locale as far as I know.

The locale should be getting set by your .profile by the line

# Set user-defined locale
export LANG=$(locale -uU)

In my case that returns

$ locale -uU
en_GB.UTF-8

I would check to see if that line is in your .profile (it should be by
default) or in case you're not login into bash (using --login), in your
.bashrc. That should fix the warning.

However it's weird that it's using c:/msys64/usr/bin/perl to build GHC. As
far as I know, the only usage of perl in GHC is for SplitObjs
in which case we use a very old perl distribution that should have been
downloaded by configure into inplace/perl/

and configure should have picked that one up. It's hardcoded somewhat to do
so. What does configure report that it found?

in any case, setting the locale as above should fix the warning.

Cheers,
Tamar

On Wed, Apr 4, 2018 at 2:57 PM, Simon Peyton Jones 
wrote:

> Hi Tamar
>
> One other thing happened to me when building GHC, very early.  See below.
> I think the perl concerned is c:/msys64/usr/bin/perl.
>
> Any ideas?  It seems non-fatal
>
> Thanks
>
> Simon
>
> perl: warning: Setting locale failed.
>
> perl: warning: Please check that your locale settings:
>
>LC_ALL = (unset),
>
>LANG = "ENG"
>
> are supported and installed on your system.
>
> perl: warning: Falling back to the standard locale ("C").
>
> perl: warning: Setting locale failed.
>
> perl: warning: Please check that your locale settings:
>
>LC_ALL = (unset),
>
>LANG = "ENG"
>
> are supported and installed on your system.
>
> perl: warning: Falling back to the standard locale ("C").
>
> perl: warning: Setting locale failed.
>
> perl: warning: Please check that your locale settings:
>
>LC_ALL = (unset),
>
>LANG = "ENG"
>
> are supported and installed on your system.
>
> perl: warning: Falling back to the standard locale ("C").
>
> perl: warning: Setting locale failed.
>
> perl: warning: Please check that your locale settings:
>
>LC_ALL = (unset),
>
>LANG = "ENG"
>
> are supported and installed on your system.
>
> perl: warning: Falling back to the standard locale ("C").
>
> perl: warning: Setting locale failed.
>
> perl: warning: Please check that your locale settings:
>
>LC_ALL = (unset),
>
>LANG = "ENG"
>
> are supported and installed on your system.
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Perl locale

2018-04-04 Thread Simon Peyton Jones via ghc-devs
Hi Tamar
One other thing happened to me when building GHC, very early.  See below.  I 
think the perl concerned is c:/msys64/usr/bin/perl.
Any ideas?  It seems non-fatal
Thanks
Simon

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

   LC_ALL = (unset),

   LANG = "ENG"

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

   LC_ALL = (unset),

   LANG = "ENG"

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

   LC_ALL = (unset),

   LANG = "ENG"

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

   LC_ALL = (unset),

   LANG = "ENG"

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

   LC_ALL = (unset),

   LANG = "ENG"

are supported and installed on your system.
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs