pack.deps in 6-2-branch
Serge D. Mechveliani
mechvel at botik.ru
Fri May 28 04:08:02 EDT 2004
Dear GHC team,
To my report on cvs ghc-6-2-branch
>> Loading package foo ... linking ...
>> /home/mechvel/t/u/lib/HSfoo.o: unknown symbol `__stginit_Prelude_'
>> ghc-6.2.1: panic! (the `impossible' happened, GHC version 6.2.1):
>> can't load package `foo'
>> Please report it as a compiler bug to
>> glasgow-haskell-bugs at haskell.org, or
>> http://sourceforge.net/projects/ghc/.
>>
>> [..]
Simon Marlow writes
> I guess that was because the package might be 'base', in which case it
> really is a GHC bug. Anyway I've changed that message so it doesn't
> claim to be a GHC bug any more.
All right.
>> 2. Indeed, the package foo should depend on the package docon.
>>
>> So, Makefile has to set "foo" with the dependency on "docon".
>> And then the user invokes
>> ghci $pcpfoo
>> ,
>> and docon will be loaded automatically. Right?
>> But such Makefile does not work.
>>
>> If I set package_deps = ["\"docon\""]
>>
>> to the Makefile part which creates the package description
>>
>> pack = Package {name = "\"foo\"",
>> ...
>> }
>> ,
>> then make foo
>> reports
>> ...
>> Reading package info from stdin... done.
>> Expanding embedded variables... done.
>> dependency `docon' doesn't exist
> I don't know why that is; perhaps because you didn't include the
> package.conf containing the docon package (i.e. ghc-pkg -f
> my-package.conf).
> Anyway, you can override that test using the --force
> flag to ghc-pkg.
>
Thank you.
I changed now the corresponding lines in Makefile to
pack = ..{
package_deps = ["\"docon\""], \
}
echo $(pack) | $(ghcpkg) -f $(doconc) -f $(s)/foo.conf -u -g
where doconc = /home/mechvel/docon/2.08/docon/source/docon.conf
Now `make' finds the dependencies.
But
(1) it is written in User Guide Section 4.8.4 that the later `-f'
override the previous ones in the ghc-pkg command line.
(2) After the above `make'
cd .../foo
ghci -package-conf /home/mechvel/t/u/foo.conf -package foo
yields ghc-6.2.1: unknown package name: docon .
And
ghci -package-conf $doconc -package docon
works correct.
Packages always was a pain.
Please, can you correct the above example with Makefile, with
package foo ?
You have docon-2.08-pre.
Install it according to install.txt choosing "Non-optimized"
`make'.
And the project foo is attached to this letter as foo.zip.
It has the two small Haskell modules and Makefile.
And it refers to the docon package.
Command
mv foo.zip .../t
cd t
unzip foo.zip
cd u
make foo
cd ..
ghci -package-conf u/foo.conf -package foo
" ghc-6.2.1: unknown package name: docon
"
ghci -package-conf $doconc -package docon
...
it works.
Is this a GHC bug?
Please, can you correct this?
GHC packages feature changes from version to version.
The general question is how work with DoCon by creating user packages.
So far, I do not know this and hence cannot explain this in DoCon
manual. Need help with this.
With kind regards,
-----------------
Serge Mechveliani
mechvel at botik.ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.zip
Type: application/zip
Size: 3534 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20040528/38b67568/foo.zip
More information about the Glasgow-haskell-bugs
mailing list