LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Executable won't run in /usr/bin (https://www.linuxquestions.org/questions/linux-newbie-8/executable-wont-run-in-usr-bin-918427/)

m_yates 12-12-2011 09:48 PM

Executable won't run in /usr/bin
 
I have a small channel changing script for mythtv that someone else wrote in C. I compiled the executable in /opt. I then copied the executable to /usr/bin. The executable will run correctly with the following command:

Code:

/opt/./channelchange
but fails to run with this command:

Code:

channelchange
When I use the command "channelchange" without the full path, it fails with the following errors:

Code:

rom1394_0 warning: read failed: 0x0000fffff0000414
ERROR reading config rom directory for node 0

Any explanation as to why this would happen?

John VV 12-13-2011 01:13 AM

it looks like you hardcoded something into it
the paths to something in that build folder

posting the build line you used would help .

i am guessing that that "config rom directory" is in that /opt/?/? build folder

m_yates 12-13-2011 08:20 AM

The source code can be found here: http://ubuntuforums.org/showthread.php?t=712789

The code was modified for the model sa4250hdc cable box as described in the link. This is a firewire channel changer for the set top box. I am using an expansion card that has two firewire ports on it. When I run "/opt/./channelchanger -v" I get output similar to this:
Code:

node 0: vendor_id = 0x00001106 model_id = 0x00000000
node 1: vendor_id = 0x00001ac3 model_id = 0x000010cc
Device acquired on node 1
Changing channel 708

I am assuming that the two nodes are the two firewire ports. The device is on node 1 and I used that vendor_id and model_id in the code. The error message refers to node 0, which I am assuming is the other port that has nothing connected to it. I don't understand why the executable throws out that error message when running without the full path. I don't think that there is anything in the code referring to the path, but I don't speak C language.

m_yates 12-14-2011 09:18 AM

Well, I ended up just configuring mythtv to use the full command "/opt/./channelchange". It works. Still not sure why the executable in /usr/bin fails to work, but I can live with that mystery.


All times are GMT -5. The time now is 01:08 PM.