|
Froppa wrote:
And problem continues. I have developed RTAI application controlled by JAUS messages. Problem is that you can not create realtime tasks if you are not superuser, and executing e.g. myExpMessageCreate() as superuser gives error described above.
Using OpenJAUS including myExpMessage is OK. I tried it with ojVehicleSim and it worked fine, when I added one myExpMessageCreate() in pd.c file
But when I do sudo su and try to execute ojVehicleSim, including my own experimental message, as superuser, I get error "./main: symbol lookup error: ./main: undefined symbol: myExpMessageCreate". I would be appreciate if someone could help me with this. OjVehicleSim? works fine as superuser without my own experimental message.
I believe the fundamental problem is that you are trying to include experimental messages in libjaus. This is not the recommended procedure. The make and make install scripts are not going to have knowledge of your experimental message and therefore will not properly link them into the libraries which are exported to the /usr/lib directory. You overcame this by using .bashrc to add your local library file to the LD path. However when you execute a binary using sudo you are executing it using the root environment (which doesn't have the extra path info). This is why you have the issue you describe.
The better approach is to take your experimental files (.h/.c) and add them to the local src and include directories of your application. This way they will be compiled directly into your application and not trying to pull them from the jaus library (libjaus). This will require that you distribute these files between the various components which will be using them, but in the long run it will be much more reliable and portable for you.
|