[omniORB] Patches to compile OO4 on AIX
Carl Thompson
cet@carlthompson.net
Mon, 26 Nov 2001 13:30:27 -0800
Duncan Grisby wrote:
> On Wednesday 14 November, Carl Thompson wrote:
>
>> Note that I had to hack up src/tool/omniidl/cxx/idlpython.cc a bit
>>because the Python method that was used to find the libraries did not seem
>>to work in all cases. I don't know Python so I fixed it using C++ code.
>
> Can you explain what the problem was? I'm sure it's possible to do
> whatever has to be done from Python rather than uglifying the C++.
There were actually a couple of different problems. First, the Python
"sys.executable" seems to want get the path of the Python interpreter rather
than the name of the program being executed (omniidl). I forget on which
platform I noticed this (Windows or AIX) but on that platform the Python
code simply did not come up with the right name in all circumstances. I was
able to fix this by using argv[0] in C++. Second, the Python code assumed
that the omniidl binary would be installed in path_to_omniorb/bindir/archdir
when figuring out where to look for Python library files but I needed to
install it in path_to_omniorb/bindir so that the paths are the same on
different platforms. Since I suspect others may need to install this way
too, I added a check for this (in Python) which notices if the archdir looks
like a bindir and fixes bindir in this case.
> With the AIX stuff, is it possible to build a Python extension with
> gcc, rather than making omniidl an executable? That would be a
> cleaner solution.
I couldn't get this to work. AIX dynamic libraries are _very_ strange and
different from other platforms and I was not able to get this working at
all. Also, I had to compile omniORB with GCC but Python was compiled with
IBM's compiler and apparently that introduces some imcompatibilities.
> Also, it looks like you have set paths up for using
> a Python build tree, rather than installing Python somewhere. I think
> that's why you need the PYTHONLIBDIR path. Is that right?
The Python I used was from an installation not a build tree. I install it
into my omniORB build tree when I build omniORB. Depending on the
installation package used i suppose the paths could be different depending
on the package. The package I use came from the (popular?) Bull's AIX
software site at http://freeware.bull.net/ .
> Cheers,
>
> Duncan.
Thanks,
Carl Thompson