Hi Duncan, Not sure I agree the behavior is ok. E.g. here is a build of mmap:
[EMAIL PROTECTED]:~/FTP/Haskell/bytestring-mmap-0.2.0$ runhaskell Setup.lhs clean cleaning... [EMAIL PROTECTED]:~/FTP/Haskell/bytestring-mmap-0.2.0$ runhaskell Setup.lhs configure Configuring bytestring-mmap-0.2.0... [EMAIL PROTECTED]:~/FTP/Haskell/bytestring-mmap-0.2.0$ runhaskell Setup.lhs build Preprocessing library bytestring-mmap-0.2.0... Building bytestring-mmap-0.2.0... [1 of 3] Compiling System.IO.Posix.MMap.Internal ( System/IO/Posix/MMap/Internal.hs, dist/build/System/IO/Posix/MMap/Internal.o ) [2 of 3] Compiling System.IO.Posix.MMap.Lazy ( System/IO/Posix/MMap/Lazy.hs, dist/build/System/IO/Posix/MMap/Lazy.o ) [3 of 3] Compiling System.IO.Posix.MMap ( System/IO/Posix/MMap.hs, dist/build/System/IO/Posix/MMap.o ) /usr/bin/ar: creating dist/build/libHSbytestring-mmap-0.2.0.a at this point rebuild and install the "unix" package ... [EMAIL PROTECTED]:~/FTP/Haskell/bytestring-mmap-0.2.0$ runhaskell Setup.lhs clean cleaning... [EMAIL PROTECTED]:~/FTP/Haskell/bytestring-mmap-0.2.0$ runhaskell Setup.lhs configure Configuring bytestring-mmap-0.2.0... [EMAIL PROTECTED]:~/FTP/Haskell/bytestring-mmap-0.2.0$ runhaskell Setup.lhs build Setup.lhs: error reading dist/setup-config; run "setup configure" command? "dist/setup-config" is not being populated at the end. In your response below, are you saying that teh segfaults occur because ghc itself relies on the "unix" package? Thanks, Vasili On Mon, Jun 2, 2008 at 5:38 AM, Duncan Coutts <[EMAIL PROTECTED]> wrote: > > On Mon, 2008-06-02 at 00:07 -0500, Galchin, Vasili wrote: > > Hello, > > > > I have been developing new code for the "unix" package. I have > > run into what I think are ghc 6.8.2 anomalies but couldn't see a > > pattern. Possibly now I do. I have been using the 32-bit x86 ghc > > binary that I downloaded from http://www.haskell.org and running on > > Ubuntu Linux. I am pretty I can repeat now. Everything is ok until I > > do "sudo runhaskell Setup.hs install" which installs a new "unix" > > package that I just built. Of course the "intall" installs > > into /usr/local/lib/unix-2.3.0.0/ghc-6.8.2. The "install" seems to > > destroy some ghc compiler state under /usr/local ... > > That sounds right. You're replacing the unix-2.3.0.0 library that comes > with ghc-6.8.2 with your own version. It is highly unlikely to be ABI > compatible with the one you are replacing and so all the other packages > that already depends on the existing unix-2.3.0.0 library end up broken. > You'd expect this kind of breakage to be exposed as link errors and > segfaults. > > I suggest you do not replace any of the libraries that come with ghc. To > be more precise, it is perfectly ok to *add new versions* but it is not > ok to *replace existing versions* without rebuilding all the other libs > that depend on it. > > Make sense? > > So if you really want to make changes to the unix lib, make sure you > change the version number too. I also suggest not installing the > packages as root, just install them locally. That way you can guarantee > you never mess up your ghc install. You would be able to revert to a > clean ghc install just by removing your > ~/.ghc/$arch/ghc-6.8.2/package.conf file which will unregister *all* > locally registered packages. To unregister individual packages use > ghc-pkg --user unregister $pkgname > > Duncan > >
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe