Resending as Monty was on vacation when this was originally sent. henrik
On Wed, Aug 31, 2011 at 1:24 PM, Henrik Ingo <[email protected]> wrote: > Hi Monty > > So I hade to understand pandora-build last week, here are some > comments. I suppose this is as good a list as any to share this. I > leave it to you to break this into meaningful launchpad blueprints. > > Relative to the autoconf mess that is your starting point, I see some > good and modular design going on in pandora. I can kind of understand > what you're trying to do. You ask for a very simple plugin.ini from > me. This makes me happy. > > I didn't find a single line of documentation and no really useful code > comments either. This made me unhappy, especially as you were not > online last week. You can choose: Either you write documentation or > you don't go to Burning man. > > > Then for some specific usability comments: > > > build_conditional: > > With the exception of memcached_* plugins, everyone that links to an > external lib does this: > > build_conditional="$ac_cv_libv8" = "yes" > > But $ac_cv_libv8 is an autoconf-internal (lower case) variable. So you > need to have secret knowledge of ./configure internals at this point. > Considering how clean and simple pandora-build is otherwise, this is a > real shame. > > Why don't introduce: > > # Needs libv8.so to build > external_dependency=libv8 > # In case of missing dependencies, this module is excluded, > # but rest of build is allowed to continue > required=no > > ...which would then be transformed by pandora-build into > "$ac_cv_libv8" = "yes". You could then still leave build_conditional > as an advanced option for those that want to build their own condition > statement using any autoconf code they want. > > I also have ldflags=${LTLIBV8} in plugin.ini. With the above change, > this could be automatically added by pandora-build too. > > > configure.ac magic: > > Ok, so I proceeded to build my module that links against libv8.so. A > few more problems: > > At first, .configure is not checking for libv8.so at all, so the above > build_dependency means my module is never built. With my proposed > changed above, you should make "required=" default to "yes", so that > in all such situations the build will stop and user will see what the > error is. required=no would then be a conscious action by the dev to > allow the build to proceed. > > Even though there is no documentation, I'm a smart guy so after an > hour of random ls and grep, I realize I need to create a file > m4/pandora_have_libv8.m4 So I pick a simple one and make a copy and > replace libsomethingelse with libv8. > > Nothing happens. Since I've never understood what all the layers in > autotools work, it takes me quite long to understand I need to add a > line in configure.ac to actually include the check for libv8. If > you're trying to create a build system for those of us who are unable > to understand autotools, I'd suggest: > > Simple: pandora-build makes sure all tests in m4/ are run in > configure.ac. (Either by including them or erroring out with clear > message when you need to add something to configure.ac or somewhere > else.) > > More advanced: a repository of tests (as copied from bzr branch > lp:pandora-build) exist in m4/test-repository/ and those you want to > run are symlinked from m4/enabled-tests/. Pandora-build makes sure all > tests in m4/enabled-tests/ are run in configure.ac. > > > gcc vs g++: > > Drizzle is compiled as C++, and v8 is C++. But the pandora_have* tests > default to gcc (C) so my test fails and again build_conditional is > false. I eventually learn from google I must add AC_LANG_CPLUSPLUS to > my m4 file. I have no idea if/how this is possible, but it could be a > nice feature that if the project being built is C++, then either this > should have just worked or I would have gotten an error. Of course, > this is quite a rare problem to be honest, but I mention it for > completeness. > > That was all. After 12 hours wasted by this kind of routine autotools > mess (helped by pandora-build, but made worse by no documentation) I > got my new drizzle plugin to build. Things are quite slow at work so I > don't mind, just wanted to give feedback. > > henrik > -- > [email protected] > +358-40-8211286 skype: henrik.ingo irc: hingo > www.openlife.cc > > My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559 > -- [email protected] +358-40-8211286 skype: henrik.ingo irc: hingo www.openlife.cc My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559 _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

