
Hi, After hearing numerous complaints from lots of people about our build system (esp Malcolm and Donald ;) ) - I took a look at the details. We now have 1300 lines of Python in our build system, that seems like quite a lot! The build system has evolved over time to keep up with the users, but I was wondering if we'd have more success with something written purely in Haskell. It's not done yet, but I've pushed the first patch which has the basic stuff done. I've made a couple of completely different decisions from the scons method: * All object files go under obj, clean is equal to deleting obj * Use ghc --make, yhc make mode etc, where possible * Everything should be able to be overiden, i.e. os=mac works just fine on a windows box (great for cross compiling!) * Everything is based on profiles, more on that once its done * Compile C files with GHC everywhere (will this go wrong?) * Install Haskell packages using Cabal * No explicit library dependancies It is not currently useable! The "Main configure" works and does the C configure tests and searches for GHC etc. "Main push" works fine. "Main yhc" will work if you have all the required packages pre-installed by Cabal - likely to only be me - but it does work. There are only 3 things left to do which might go wrong/take some time: 1) Download dependancies automatically and install them with Cabal. Haskell's lack of a good wget/tar combo here may hurt us, but I'll see what code I can find lying around. 2) Compile Yhi, which requires make-style knowledge about C. Scons had this built in much more, I'll need to roll my own. 3) Compile the libraries. If this isn't trivially easy I'll extend Yhc until it is. So far I'm quite happy with it - it seems very flexible and very modular. The disadvantage of moving to this (if it works) is that we'd likely throw away some of the fixes we've made. The advantage is fewer dependancies, and more people who know Haskell - provided the Haskell stays simple and clean. Anyone have any thoughts? Thanks Neil

By far the biggest problem with building Yhc is in getting libffi set up correctly for the current platform. Malcolm's problem is that he is using a 64-bit Mac, and appears to have given up on getting Yhc to install. I'm not sure how much support Python has for Mac64, which is probably causing us a problem. No idea what problems Donald is having since I don't think I've seen them on the list or in the bug tracker. I have a partially complete rewrite of the scons build system which takes advantage of the features in the upcoming Scons 0.97 release. I realise that Scons build system is a bit of a mess, but I'm really not sure that throwing it away is the best plan. * Everything should be able to be overiden, i.e. os=mac works just
fine on a windows box (great for cross compiling!)
This is much more to do with the compiler used than the build system. It would be very easy to add to Scons, but I had no idea there was a desire for it. * Compile C files with GHC everywhere (will this go wrong?) There is partial support for this already in Scons, but it was very difficult to make GHC compile and link things correctly without adding in lots of Haskell related gubbins. * No explicit library dependancies
I have started work on a scanner that would remove the need for this, so the list of library dependencies was never supposed to be a permanent thing. Andrew
participants (2)
-
Andrew Wilkinson
-
Neil Mitchell