[Pkg-ace-devel] Re: Bug#289158: mpc-ace: MPC needs ACE_ROOT and TAO_ROOT environment variables

Marek Brudka mbrudka@aster.pl
Sat, 15 Jan 2005 21:41:11 +0100


Hi Thomas,

User  Thomas Girard wrote:

> Marek Brudka a =E9crit :
>
>> MPC generated makefiles needs these variables to run correctly. AFAIK
>> debian ace distribution should not depend on these variables, hence I
>> think mpc-ace violates this and should be corrected.
>
>
> Hi Marek,
>
> I have a quite simple fix, but I would like to discuss it with you. My
> fix is attached ; it simply define ACE_ROOT to be /usr/share/ace and
> export this in the GNUmakefile if there were no ACE_ROOT defined.
>
> This should fix the bug you reported, but there is another problem. I
> have added `export' keyword so that ACE_ROOT variable is seen when
> invoking for instance tao_idl. Because tao_idl *also* needs ACE_ROOT (a=
t
> last it complains about it when it's missing).
>
> I believe there should be no `export' keyword, but all TAO and ACE
> programs should be altered to use /usr/share/ace instead of relying on
> ACE_ROOT.
>
> Comments and suggestions ?

I examined ACE/TAO sources once again and it seems the problem is not so=20
hard as I thought.
Your patch probably works, I'm going to check it in my office at Monday.=20
There are
ACE/TAO applications which need ACE_ROOT variable, but most of them are=20
tests or
examples. I suppose we can ignore them and require a user to setup=20
ACE_ROOT when
needed.

The only important application (if I did not missed anything) is=20
tao_idl. I propose to
create in distribution a simple shell wrapper tao_idl which exports
ACE_ROOT/TAO_ROOT to tell tao_idl.bin where it should look for necessary=20
files.
Certainly, tao_idl.bin is tao_idl renamed after compilation. The script=20
may also
use command line options -g and -I, but tao_idl still would complain on=20
ACE_ROOT/TAO_ROOT.
I think I can modify driver_/drv_preproc.cpp to stop this when some=20
macro is defined eg.
TAO_IDL_SILENT.

There is also another solution for TAO_IDL. During compilation=20
TAO_IDL_INCLUDE_DIR should
be defined (see TAO/TAO_IDL/driver/drv_preproc.cpp) to tell the=20
preprocessor where include files
are located. TAO_IDL still would warn about undefined ACE_ROOT, hence=20
TAO_IDL_SILENT is
necessary. This solution is rather worse than a script wrapper.

The patch you proposed manages also environment setting for gendep.pl and
similiar scripts from $ACE_ROOT/bin, though export is necessary. However=20
I think that these scripts
should not depend on ACE_ROOT, hence a little patching would be nice.=20
Nevertheless, the quick
bugfix you sent is sufficient for me, because (probably) it enables to=20
work with mpc.

I hope I helped you somehow :-)

Thanks
Marek