Funny, I've been meaning to write in on this.
I hit this problem hard too. I was linking the GHC compiler to a C library. I compiled the whole compiler with -prof, but whenever it called into the C library it would core dump. For a long time (years!) I assumed it was something strange my C library was doing. Last week I finally tracked it down. I was linking in the HDirect library to interface to C and of course that hadn't been compiled with -prof. Mercury adds an extra symbol to the rts and any modules not compiled with -prof cause a link error. Fergus tells me that it gives a very nice error, but a quick look at the Mercury documentation didn't find it. If you want more info just mail me. But PLEASE DO IT!!! thanks k Mike Gunter writes: > > I would think this sort of problem, as well as GHC-version > incompatibilities, could be avoided by putting the relevant > information (-prof, GHC version, etc.?) in the .hi file. You could > also add a version-and-way symbol to the ".o"s to catch link time > problems (i.e, ".o"s created with version n-1 linking with version n's > runtime library.) With these, I would think you'd get warnings > (somewhat obscure in the link-time error case -- something like > "symbol __ghc_05_02_01 not found") in all incompatible-ABI cases. > > Or no? > > mike > > > > Certainly. > > > > > > We've just spent lots of time trying to get this stuff to be utterly > > > painless to compile, so please let us know if the instructions below > > > give you any trouble. > > > > The problem is that you didn't compile the whole program with -prof: the > > BareBonesArrows library was compiled the normal way, and the rest of the > > files were compiled with -prof. When using -prof, you have to make sure > > the whole program, including libraries, are compiled with -prof, > > otherwise disaster will ensue because different parts of the program are > > using different representations for fundamental data structures. > > > _______________________________________________ > 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
