[CC’ing d-haskell, this might be a larger annoyance] Hi again,
Am Freitag, den 20.02.2009, 01:18 +0100 schrieb Joachim Breitner: > I was about to start packaging libraries for ghc6.10 (haskell-X11 to be > precise), using the just built haddock from incoming, when I this > this problem: > > For the full bug report, see: > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516241 I’m wondering: Are haddock’s interface files arch independent, in haddock 2? If not, then that could be a problem – and if I read the code in /usr/share/doc/ghc6-doc/libraries/base/base.haddock correctly, it seems to use Binary to put “Int”s (without any fixed bit number). And Binary does indeed serialize these Ints according to machine size... So these are the first bytes of /usr/share/doc/ghc6-doc/libraries/base/base.haddock: 0000000: 0d0c face 0004 0000 45cf 0000 4486 1100 ........E...D... ^-------^ magic number ^--^ version number ^-------^ 32 bit pointer ^-------^ another 32 bit pointer and here is what haddock reads in these lines (prints added by me) with the this code in src/Haddock/InterfaceFile.hs: where get_dictionary bin_handle = liftIO $ do dict_p <- get bin_handle liftIO $ print ("dict_p",dict_p) data_p <- tellBin bin_handle liftIO $ print ("data_p",data_p) seekBin bin_handle dict_p liftIO $ print () dict <- getDictionary bin_handle seekBin bin_handle data_p return dict which results in this output on my amd64 machine: ("dict_p",BinPtr 76755360564358) ("data_p",BinPtr 14) haddock: out of memory (requested 8310762766336 bytes) Now 76755360564358 is 0x000045CF00004486, which, by looking at the relevant parts of the file, is the concatenation of the two pointers. So yes, I’m very confident that haddock’s interface files are not arch independent. Which is quite bad, I guess. I see two solutions: * We patch haddock to not store any arch dependent data. (Probably quite some work) * We mach all -doc packages arch any instead of all. (Easiler but less elegant) * We put the haddock interface files in the -dev packages. (Not sure about the implications) Greetings, Joachim -- Joachim "nomeata" Breitner Debian Developer nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil