[omniORB] autoconfig test, comments and using distutils

Duncan Grisby dgrisby@uk.research.att.com
Mon, 25 Feb 2002 17:06:14 +0000


On Monday 25 February, William Noon wrote:

> It looks like there is some confusion as to where to put the binaries
> and python scripts.  Some of the makefiles use relative paths and others
> use the INSTALL(BIN|LIB)DIR.  This is tricky since the build is self
> hosted (i.e. it uses its own omniidl to make the stubs needed for the
> core).  I don't know if you can get to the point where you will have
> distinct build and install steps.

You have possibly missed a subtle part of the way it works. When you
do "make", it does the equivalent of "make export" in the old-style
build -- it installs the things it builds inside the build tree (which
can be separate from the source tree). Then if you do "make install",
it installs everything again, this time in the directories derived
from configure's prefix, etc.

It's done that way so that omniidl can be available to later stages of
the build. It's also important to separate the build and install steps
so that people can run "make" as a normal user, and "make install" as
root to put things in /usr/local, or wherever.

[...]
> I saw that you are using a lot of system specific makefile code to
> handle the various different ways to create python extensions.  I
> decided to let python handle that by using distutils (included in
> python since 1.6 (I think) and available for 1.5.2).  Here is the
> setup.py file I put in src/tools/omniidl/cxx:

Most of the platform-specific stuff isn't used with the autoconf based
build. It's left in there to avoid breaking the non-autoconf version.
The build now uses the platform-specific stuff in mklib.mk used to
build other shared libraries, with a minor tweak for Python on some
platforms.

When I read the distutils manual, I got scared off because it looked
like it didn't understand enough about building C++ extensions, for
example the need to explicitly link with the C++ runtime library when
using Sun's compiler. Perhaps I was wrong. It would certainly be good
to use distutils if it is up to the job on all platforms.


> Note that the current make files are putting omnicpp in
> ${prefix}/lib, not bin.

No they aren't -- they put omnicpp in the lib directory of the _build_
tree, but when you do "make install" omnicpp goes in the bin
directory. This is to help omniidl find it when run out of the build
tree.

> They are also building both static and shared in omnithread.

That was a mistake that's already been fixed in CVS.

[... omniORBpy... ]
> The code in beforeauto.mk.in is looking for various included idl files in 
> $(OMNIORB_ROOT)idl/omniORB, not in $(OMNIORB_ROOT)/idl.

That's also because you haven't done "make install" of the omniORB
build.

Thanks for your comments. I'll look into the distutils stuff.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --