[Ns-developers] build system proposal
Gustavo Carneiro
gjcarneiro at gmail.com
Tue Oct 7 06:43:04 PDT 2008
2008/10/7 Mathieu Lacage <mathieu.lacage at sophia.inria.fr>
> On Tue, 2008-10-07 at 12:37 +0100, Gustavo Carneiro wrote:
>
> >
> > The current proposal should deal with this problem by
> > delegating the
> > version checking to the 'install' script. i.e., the waf script
> > in
> > ns-3-dev should check that the current environment has the
> > correct
> > version of all programs by running ../install check. (use a
> > different
> > name for the script if you wish).
> >
> > Why are you planning to remove the nice user friendly configuration
> > tests in waf and instead make waf invoke an external command to check
> > those things? Besides reinventing the wheel, then we need to create a
>
> Because the 'install' script will need the version checking logic
> somewhere
That basic premise may be flawed. I would not expect the 'build.py' (I hate
the name 'install') to check the dependencies itself. I thought download.py
would take care of that? It could happen like this:
1. clone ns-3-allinone
2. run download.py: clones ns-3-dev and friends
3. run build.py: builds ns-3-dev and friends
[... time passes ...]
4. Developer does "hg update" on ns-3-dev
5. ./waf triggers a reconfiguration, detects missing or too old dependency
6. Developer realizes what happened and re-runs ../download.py and then
../build.py
This way the download.py script does not need to check anything, it just
needs to know which branch/revision to pull for each external module, and
then let the VCS take care of the rest. And we retain component detection
in ns-3-dev.
and I see little point in implementing that logic twice, once
> in waf and once in the 'install' script.
>
>
> Please, don't be so confrontational by painting me as being the evil
> person who is suggesting to remove 'nice user-friendly' configuration
> tests because I am not suggesting to remove them. I am merely suggesting
> to _move_ them.
Sorry, I don't mean to be confrontational.
But what you (plural you, not you in particular) suggest essentially makes
the main repository ns-3-dev crippled in case it is not inside a
ns-3-allinone repository. I think it's a hack to require two nested
repositories to build one system. If all these things were inside ns-3-dev
itself, well, I think it would be less bad, especially since ns-3-allinone
has a couple of Python scripts and is therefore silly to create a repository
just for that. As it is proposed I think makes the build system more
complex. But I am proposing alternatives to this system that keep the basic
requirements.
>
>
> > protocol between ../install.py and the waf script, so that the waf
> > build system disables components with missing dependencies.
>
> yes.
>
> > I thought this 'allinone' directory was an extra layer on top of
> > ns-3-dev? If you start crippling the waf configuration detection then
> > ns-3-dev will essentially become interlocked with ns-3-allinone, which
> > is something I think is a very bad idea.
>
> Yes, but, it's called a 'compromise' to get something simple working for
> a vast majority of people given the set of requirements tom set forth
> (no network access during ./waf, etc.).
OK, Tom has his requirements, but can I propose an additional requirement?
I would like ns-3-dev to keep detecting optional components and be fully
functional as before, aside from the downloading from the network part. My
proposal is that:
1. ns-3-dev is able to build itself without outside scripts and detect all
the components that it needs, also without outside help;
2. ns-3-dev no longer downloads anything from the network, ns-3-allinon
will take care of it;
3. ns-3-allinon can download components from the network, and also can
coordinate build of optional components plus ns-3-dev itself.
I don't remember exactly Tom's requirements, but I suspect they will be
preserved in this strategy?
> > IMHO all external dependencies detection should still be present
> > inside ns-3-dev, for those that do not want to use 'allinone'.
>
> It should be trivial to ignore the version checking in ns-3-dev if
> ns-3-dev cannot find the file ../install.py.
Ignoring version checking makes ns-3-dev less functional. It becomes
equivalent to some makefile based projects out there without a configure
script, and how irritating is it when such projects fail to build because of
a missing dependency which you don't know what is? I'm sure I am not the
only one to have been through this?...
Regards,
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
More information about the Ns-developers
mailing list