I am using Redhawk 2.10 to try and generate a component that uses ports defined in JTRS idl.
When I try to generate the component, I receive "No such file or directory" errors.
For example:
JtrsCorbaTypes.idl: No such file or directory
When the JTRS IDL gets built, it gets installed into various package directories of the form ${OSSIEHOME}/core/share/idl/redhawk/package/file.idl
The IDL files do not appear in the Target SDR IDL Repository in the REDHAWK Explorer.
The JTRS IDL files do not contain qualified paths when including other IDL files.
For example:
#include "JtrsCorbaTypes.idl"
All IDL file projects successfully compile and install into ${OSSIEHOME}.
Despite this, generation of a component that uses ports defined in the IDL fails.
Attempts at updating IDL search paths have failed.
I've gone to Window->Preferences->Target Platform
tab and added the paths I need to the IDL Locations
.
I have added paths in the project properties (right-click on project, left-click on properties
then IDL Compilation->Include Path
).
I have defined environment variables IDL_PATH, IDL_INCLUDE_PATH, OMNIIDL_INCLUDE_PATH.
I have even renamed /usr/bin/omniidl to /usr/bin/omniidl.bin and created a bash script called /usr/bin/omniidl that calls the binary and explicitly adds include paths.
#replace ':' with a ' -I' and account for some stray ':' at the beginning or end.
inc=$(echo $IDL_PATH | sed 's/::*/:/g; s/^://; s/:$//; s/:/ -I\//g; s|^|/|; s|//|/|g')
# need to add the first -I
echo -I$inc
omniidl.bin -I$inc "$@"
I then discovered that, at my current point, redhawk-codegen doesn't even use omniidl in the code generation process as i renamed both the binary and script so omniidl could not be found.
There is nothing in the redhawk-codegen usage that allows me to specify include paths.
I am trying to avoid the creation of soft links to the files that link them where they are expected by the files that include them.
Any suggestions?
Thank you to @user21414785 for providing some of the modules involved in the generation process. I tried to upvote your answer; but I am apparently too new....
The solution I took was to update $(OSSIEHOME)/share/core/lib/python/ossie/utils/idllib.py
. Below is the diff:
bash# diff idllib.py idllib.py.bak
75,80d74
< idl_path = os.environ.get('IDL_PATH')
<
< if idl_path:
< for path in idl_path.split(os.pathsep):
< self.addSearchPath(path)
<
Then I compiled the .py into a .pyc and .pyo:
bash# python -m compileall idllib.py
bash# python -O -m compileall idllib.py
Submitted this change as a feature request.