Re: please help with ghc package-db flags

2021-09-28 Thread Sylvain Henry

Hi,

Could you try with `-package-env -` to disable package environment 
misfeature. Especially with Asterius as it may mix packages for the host 
with target packages that use WebAssembly... (I have been bitten by this 
2 years ago IIRC).


Sylvain


On 27/09/2021 22:50, Norman Ramsey wrote:

I've traced some troubles to a problem with GHC's response
to the -clear-package-db and -package-db flags.  I would very much
like to know if others can duplicate this issue.

All that is needed is for you to try the following commands, or
whatever variations may be appropriate for whatever ghc versions you
have installed on your system:

   ghc-pkg init /tmp/empty-package-db
   ghc-clear-package-db -package-db /tmp/empty-package-db/ -v
   ghc-9.0.1  -clear-package-db -package-db /tmp/empty-package-db/ -v
   ghc-8.10.7 -clear-package-db -package-db /tmp/empty-package-db/ -v

On my system at this present moment, ghc-8.10.7 respects the commands,
but ghc-9.0.1 does not.  The output from the `-v` options show what's
happening: if GHC finds any packages that are *not* "wired-in," then
something is broken.  As examples, I attach the sample outputs from my
own system.

I think the issue is being caused by something mysterious in my filesystem.
Last Friday, ghc 9.0.1 was respecting those flags.  But today it is not.
Before I try to figure out what is going on, I would *very* much
appreciate learning if anyone else can duplicate the issue.

Please try running GHC with an empty package database and let me know
what happens.


Norman

___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: please help with ghc package-db flags

2021-09-27 Thread Brandon Allbery
Not necessarily filesystem; also check GHC_PACKAGE_PATH in the environment.

On Mon, Sep 27, 2021 at 4:51 PM Norman Ramsey  wrote:

> I've traced some troubles to a problem with GHC's response
> to the -clear-package-db and -package-db flags.  I would very much
> like to know if others can duplicate this issue.
>
> All that is needed is for you to try the following commands, or
> whatever variations may be appropriate for whatever ghc versions you
> have installed on your system:
>
>   ghc-pkg init /tmp/empty-package-db
>   ghc-clear-package-db -package-db /tmp/empty-package-db/ -v
>   ghc-9.0.1  -clear-package-db -package-db /tmp/empty-package-db/ -v
>   ghc-8.10.7 -clear-package-db -package-db /tmp/empty-package-db/ -v
>
> On my system at this present moment, ghc-8.10.7 respects the commands,
> but ghc-9.0.1 does not.  The output from the `-v` options show what's
> happening: if GHC finds any packages that are *not* "wired-in," then
> something is broken.  As examples, I attach the sample outputs from my
> own system.
>
> I think the issue is being caused by something mysterious in my filesystem.
> Last Friday, ghc 9.0.1 was respecting those flags.  But today it is not.
> Before I try to figure out what is going on, I would *very* much
> appreciate learning if anyone else can duplicate the issue.
>
> Please try running GHC with an empty package database and let me know
> what happens.
>
>
> Norman
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>


-- 
brandon s allbery kf8nh
allber...@gmail.com
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


please help with ghc package-db flags

2021-09-27 Thread Norman Ramsey
I've traced some troubles to a problem with GHC's response
to the -clear-package-db and -package-db flags.  I would very much
like to know if others can duplicate this issue.

All that is needed is for you to try the following commands, or
whatever variations may be appropriate for whatever ghc versions you
have installed on your system:

  ghc-pkg init /tmp/empty-package-db
  ghc-clear-package-db -package-db /tmp/empty-package-db/ -v
  ghc-9.0.1  -clear-package-db -package-db /tmp/empty-package-db/ -v
  ghc-8.10.7 -clear-package-db -package-db /tmp/empty-package-db/ -v

On my system at this present moment, ghc-8.10.7 respects the commands,
but ghc-9.0.1 does not.  The output from the `-v` options show what's
happening: if GHC finds any packages that are *not* "wired-in," then
something is broken.  As examples, I attach the sample outputs from my
own system.

I think the issue is being caused by something mysterious in my filesystem.
Last Friday, ghc 9.0.1 was respecting those flags.  But today it is not.
Before I try to figure out what is going on, I would *very* much
appreciate learning if anyone else can duplicate the issue.

Please try running GHC with an empty package database and let me know
what happens.


Norman
nr@homedog ~> ghc-8.10.7 -v -clear-package-db -package-db 
$STAGE1/lib/package.conf.d -v
Glasgow Haskell Compiler, Version 8.10.7, stage 2 booted by GHC version 8.10.4
*** initializing package database:
Using binary package database: 
/home/nr/asterius/ghc/_build/stage1/lib/package.conf.d/package.cache
package flags []
loading package database /home/nr/asterius/ghc/_build/stage1/lib/package.conf.d
wired-in package ghc-prim mapped to ghc-prim-0.8.0
wired-in package integer-wired-in mapped to integer-gmp-1.1
wired-in package base mapped to base-4.16.0.0
wired-in package rts mapped to rts-1.0.2
wired-in package template-haskell mapped to template-haskell-2.18.0.0
wired-in package ghc mapped to ghc-9.3
!!! initializing package database: finished in 7.82 milliseconds, allocated 
8.501 megabytes
*** Deleting temp files:
Deleting: 
*** Deleting temp dirs:
Deleting: 
ghc: no input files
Usage: For basic information, try the `--help' option.
nr@homedog ~ [1]> ghc-9.0.1 -v -clear-package-db -package-db 
$STAGE1/lib/package.conf.d -v
Loaded package environment from 
/home/nr/.ghc/x86_64-linux-9.0.1/environments/default
Glasgow Haskell Compiler, Version 9.0.1, stage 2 booted by GHC version 8.8.3
*** initializing unit database:
Using binary package database: 
/home/nr/.ghcup/ghc/9.0.1/lib/ghc-9.0.1/package.conf.d/package.cache
Using binary package database: 
/home/nr/.cabal/store/ghc-9.0.1/package.db/package.cache
package flags [-package-id ghc-9.0.1{unit ghc-9.0.1 True ([])},
   -package-id bytestring-0.10.12.1{unit bytestring-0.10.12.1 True 
([])},
   -package-id unix-2.7.2.2{unit unix-2.7.2.2 True ([])},
   -package-id base-4.15.0.0{unit base-4.15.0.0 True ([])},
   -package-id time-1.9.3{unit time-1.9.3 True ([])},
   -package-id hpc-0.6.1.0{unit hpc-0.6.1.0 True ([])},
   -package-id filepath-1.4.2.1{unit filepath-1.4.2.1 True ([])},
   -package-id process-1.6.11.0{unit process-1.6.11.0 True ([])},
   -package-id array-0.5.4.0{unit array-0.5.4.0 True ([])},
   -package-id integer-gmp-1.1{unit integer-gmp-1.1 True ([])},
   -package-id containers-0.6.4.1{unit containers-0.6.4.1 True 
([])},
   -package-id ghc-boot-9.0.1{unit ghc-boot-9.0.1 True ([])},
   -package-id binary-0.8.8.0{unit binary-0.8.8.0 True ([])},
   -package-id ghc-prim-0.7.0{unit ghc-prim-0.7.0 True ([])},
   -package-id ghci-9.0.1{unit ghci-9.0.1 True ([])},
   -package-id rts{unit rts True ([])},
   -package-id terminfo-0.4.1.4{unit terminfo-0.4.1.4 True ([])},
   -package-id transformers-0.5.6.2{unit transformers-0.5.6.2 True 
([])},
   -package-id deepseq-1.4.5.0{unit deepseq-1.4.5.0 True ([])},
   -package-id ghc-boot-th-9.0.1{unit ghc-boot-th-9.0.1 True ([])},
   -package-id pretty-1.1.3.6{unit pretty-1.1.3.6 True ([])},
   -package-id template-haskell-2.17.0.0{unit 
template-haskell-2.17.0.0 True ([])},
   -package-id directory-1.3.6.1{unit directory-1.3.6.1 True ([])},
   -package-id text-1.2.4.1{unit text-1.2.4.1 True ([])},
   -package-id 
ghc-paths-0.1.0.12-3f4623015bdeee15e2d2cf4307a5331bbd2d0c0ee8ac137a5857a6db6f44b0cc{unit
 
ghc-paths-0.1.0.12-3f4623015bdeee15e2d2cf4307a5331bbd2d0c0ee8ac137a5857a6db6f44b0cc
 True ([])}]
loading package database /home/nr/.ghcup/ghc/9.0.1/lib/ghc-9.0.1/package.conf.d
loading package database /home/nr/.cabal/store/ghc-9.0.1/package.db
wired-in package ghc-prim mapped to ghc-prim-0.7.0
wired-in package ghc-bignum mapped to ghc-bignum-1.0
wired-in package base mapped to base-4.15.0.0
wired-in