RE: ghc-6.2.2: unknown package name: Main (again)
NB: the way GHC handles packages is changing significantly (for the better) in the HEAD. | -Original Message- | From: [EMAIL PROTECTED] [mailto:glasgow-haskell-bugs- | [EMAIL PROTECTED] On Behalf Of Gregory Wright | Sent: 01 December 2004 19:07 | To: Axel Simon | Cc: Donald Bruce Stewart; [EMAIL PROTECTED] | Subject: Re: ghc-6.2.2: unknown package name: Main (again) | | | Hi Axel, | | No, I patched the hsshellscript library distribution to build using | | -package-name hsshellscript | | as you mentioned. I still got the error. (The documentation | asserts that -package-name is a no-op on unices anyway. | I wonder if that is really still true?) | | That's why I said that the error message was confusing: I had | already rebuilt using -package-name and still got an error. | I think there was some module in my test application that | was built by 6.2.1 and deleting its object and interface files | fixed the problem. A slight API breakage from 6.2.1 to 6.2.2 | isn't all that surprising. | | Best Wishes, | greg | | | On Dec 1, 2004, at 12:52 PM, Axel Simon wrote: | | Hi, | | On Wed, 2004-12-01 at 17:36, Gregory Wright wrote: | I cleaned out all of the *.o and *.hi files and rebuilt. Everything | was OK. No doubt there was something stale in one of the *.hi | files, although the error message is perplexing to those of us | who don't channel Simonness ;--) | | I came across the same problem today. | | crossroads-able ghc --make -package hsshellscript -o asgraph | asgraph.hs | Chasing modules from: asgraph.hs | Skipping Reformat ( ./Reformat.hs, ./Reformat.o ) | Skipping Main ( asgraph.hs, asgraph.o ) | Linking ... | ghc-6.2.2: unknown package name: Main | | | However, building the package (hsshellscript) with the additional | option | | -package-name hsshellscript | | Files that *use* the package foo keep track of this dependency in the | .hi files. However they track the name that you give with the | -package-name option when compiling the package, not the name given | with | -package when you compile the program. I guess in your case you forgot | to compile the package with -package-name=foo such that the package was | implicitly named Main. Solution: Rebuild the library with the proper | -package-name flag and rebuild everything that uses that package. | | Axel. | | | | ___ | Glasgow-haskell-bugs mailing list | [EMAIL PROTECTED] | http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: ghc-6.2.2: unknown package name: Main (again)
Hi Axel, We are in violent agreement :-) Greg On Dec 2, 2004, at 4:05 AM, Axel Simon wrote: Gregory, On Wed, 2004-12-01 at 19:07, Gregory Wright wrote: No, I patched the hsshellscript library distribution to build using -package-name hsshellscript as you mentioned. I still got the error. (The documentation asserts that -package-name is a no-op on unices anyway. I wonder if that is really still true?) The name you provide with -package-name must wind up in the .hi files of the *application* and the library you are compiling. I inadvertently passed the file name of the package file as package name and it gave me back the whole file name. That's why I said that the error message was confusing: I had already rebuilt using -package-name and still got an error. I think there was some module in my test application that was built by 6.2.1 and deleting its object and interface files fixed the problem. A slight API breakage from 6.2.1 to 6.2.2 isn't all that surprising. I doubt that it is versionitis. I'm only using the same 6.2.1 compiler on Solaris. Axel. ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
RE: ghc-6.2.2: unknown package name: Main (again)
On 02 December 2004 09:06, Axel Simon wrote: On Wed, 2004-12-01 at 19:07, Gregory Wright wrote: No, I patched the hsshellscript library distribution to build using -package-name hsshellscript as you mentioned. I still got the error. (The documentation asserts that -package-name is a no-op on unices anyway. I wonder if that is really still true?) The name you provide with -package-name must wind up in the .hi files of the *application* and the library you are compiling. I inadvertently passed the file name of the package file as package name and it gave me back the whole file name. Right. .hi files track package dependencies. -package-name isn't a no-op on any platform with respect to dependencies, but it is a no-op with respect to dynamic linking on Unix. You should still use -package-name. As Simon said, the package handling is changing quite a bit for 6.4. In particular, .hi files no longer contain the contents of the -package-name flag when they were built. However, you still need to pass a flag when building a package, but now you say '-ignore-package P' to cause GHC to ignore any installed version of P when building modules that are contained in P. To ease migration, we made -package-name be a synonym for -ignore-package. So this particular error message should be a thing of the past. Furthermore, you can build a collection of modules once and then put them in two or more separate packages, or a package and a binary, without having to build them multiple times with different -package-name flags. Cheers, Simon ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: ghc-6.2.2: unknown package name: Main (again)
Hi Don, I cleaned out all of the *.o and *.hi files and rebuilt. Everything was OK. No doubt there was something stale in one of the *.hi files, although the error message is perplexing to those of us who don't channel Simonness ;--) Best Wishes, Greg On Nov 30, 2004, at 11:26 PM, Donald Bruce Stewart wrote: gwright: Hi, Using ghc-6.2.2 on Mac OS X 10.3.6, I've found another instance of the unknown package name: Main problem mentioned last April. When I build my program I see: crossroads-able ghc --make -package hsshellscript -o asgraph asgraph.hs Chasing modules from: asgraph.hs Skipping Reformat ( ./Reformat.hs, ./Reformat.o ) Skipping Main ( asgraph.hs, asgraph.o ) Linking ... ghc-6.2.2: unknown package name: Main However, building the package (hsshellscript) with the additional option -package-name hsshellscript doesn't fix the problem; the error message persists. Has anyone else noticed this probelm? Is it specific to OS X? I had this problem in yi at one point, when trying to link against a package, in the same directory as the package .o files. Check the resulting .hi files (--show-iface) to see if you linked against the -package hsshellscript, or the individual .o files. The .o files were getting picked up by -I., overriding the -package flag. The solution was to use either -I to explicitly rule out certain dirs from the search path. Another soln (that is backwards compatible with ghc-6.2.1) is to cd to another dir, so that the -I. doesn't mean anything. -- Don ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: ghc-6.2.2: unknown package name: Main (again)
Hi, On Wed, 2004-12-01 at 17:36, Gregory Wright wrote: I cleaned out all of the *.o and *.hi files and rebuilt. Everything was OK. No doubt there was something stale in one of the *.hi files, although the error message is perplexing to those of us who don't channel Simonness ;--) I came across the same problem today. crossroads-able ghc --make -package hsshellscript -o asgraph asgraph.hs Chasing modules from: asgraph.hs Skipping Reformat ( ./Reformat.hs, ./Reformat.o ) Skipping Main ( asgraph.hs, asgraph.o ) Linking ... ghc-6.2.2: unknown package name: Main However, building the package (hsshellscript) with the additional option -package-name hsshellscript Files that *use* the package foo keep track of this dependency in the .hi files. However they track the name that you give with the -package-name option when compiling the package, not the name given with -package when you compile the program. I guess in your case you forgot to compile the package with -package-name=foo such that the package was implicitly named Main. Solution: Rebuild the library with the proper -package-name flag and rebuild everything that uses that package. Axel. ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: ghc-6.2.2: unknown package name: Main (again)
Hi Axel, No, I patched the hsshellscript library distribution to build using -package-name hsshellscript as you mentioned. I still got the error. (The documentation asserts that -package-name is a no-op on unices anyway. I wonder if that is really still true?) That's why I said that the error message was confusing: I had already rebuilt using -package-name and still got an error. I think there was some module in my test application that was built by 6.2.1 and deleting its object and interface files fixed the problem. A slight API breakage from 6.2.1 to 6.2.2 isn't all that surprising. Best Wishes, greg On Dec 1, 2004, at 12:52 PM, Axel Simon wrote: Hi, On Wed, 2004-12-01 at 17:36, Gregory Wright wrote: I cleaned out all of the *.o and *.hi files and rebuilt. Everything was OK. No doubt there was something stale in one of the *.hi files, although the error message is perplexing to those of us who don't channel Simonness ;--) I came across the same problem today. crossroads-able ghc --make -package hsshellscript -o asgraph asgraph.hs Chasing modules from: asgraph.hs Skipping Reformat ( ./Reformat.hs, ./Reformat.o ) Skipping Main ( asgraph.hs, asgraph.o ) Linking ... ghc-6.2.2: unknown package name: Main However, building the package (hsshellscript) with the additional option -package-name hsshellscript Files that *use* the package foo keep track of this dependency in the .hi files. However they track the name that you give with the -package-name option when compiling the package, not the name given with -package when you compile the program. I guess in your case you forgot to compile the package with -package-name=foo such that the package was implicitly named Main. Solution: Rebuild the library with the proper -package-name flag and rebuild everything that uses that package. Axel. ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
ghc-6.2.2: unknown package name: Main (again)
Hi, Using ghc-6.2.2 on Mac OS X 10.3.6, I've found another instance of the unknown package name: Main problem mentioned last April. When I build my program I see: crossroads-able ghc --make -package hsshellscript -o asgraph asgraph.hs Chasing modules from: asgraph.hs Skipping Reformat ( ./Reformat.hs, ./Reformat.o ) Skipping Main ( asgraph.hs, asgraph.o ) Linking ... ghc-6.2.2: unknown package name: Main However, building the package (hsshellscript) with the additional option -package-name hsshellscript doesn't fix the problem; the error message persists. Has anyone else noticed this probelm? Is it specific to OS X? Best Wishes, Greg ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: ghc-6.2.2: unknown package name: Main (again)
gwright: Hi, Using ghc-6.2.2 on Mac OS X 10.3.6, I've found another instance of the unknown package name: Main problem mentioned last April. When I build my program I see: crossroads-able ghc --make -package hsshellscript -o asgraph asgraph.hs Chasing modules from: asgraph.hs Skipping Reformat ( ./Reformat.hs, ./Reformat.o ) Skipping Main ( asgraph.hs, asgraph.o ) Linking ... ghc-6.2.2: unknown package name: Main However, building the package (hsshellscript) with the additional option -package-name hsshellscript doesn't fix the problem; the error message persists. Has anyone else noticed this probelm? Is it specific to OS X? I had this problem in yi at one point, when trying to link against a package, in the same directory as the package .o files. Check the resulting .hi files (--show-iface) to see if you linked against the -package hsshellscript, or the individual .o files. The .o files were getting picked up by -I., overriding the -package flag. The solution was to use either -I to explicitly rule out certain dirs from the search path. Another soln (that is backwards compatible with ghc-6.2.1) is to cd to another dir, so that the -I. doesn't mean anything. -- Don ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs