Running a source command before launching main command

René J.V. Bertin rjvbertin at gmail.com
Thu Jul 29 09:59:13 BST 2021


On Thursday July 29 2021 10:11:13 Mahmood Naderan wrote:
>/home/mnaderan/accel-sim-framework/> '/usr/bin/sh /home/mnaderan/accel-sim-framework/run.sh /home/mnaderan/accel-sim-framework/gpusimulator/bin/release/accel-sim.out'
>*** Failure: /usr/bin/sh /home/mnaderan/accel-sim-framework/run.sh
>/home/mnaderan/accel-sim-framework/gpu-simulator/bin/release/accel-sim.out
>has failed to start ***

That figures: look at the single quotes. I think you specified '/usr/bin/sh /home/mnaderan/accel-sim-framework/run.sh /home/mnaderan/accel-sim-framework/gpusimulator/bin/release/accel-sim.out' as the executable, and a file with that name doesn't exist (or doesn't have the executable bit set).

I think you tried to follow my suggestion to use `/bin/sh /path/to/wrapper /path/to/executable`. Given that KDevelop clear expects only an executable file in the command entry field, you'd have to enter `sh` as the command, and prepend `/path/to/wrapper /path/to/executable` in front of your argument list.

FWIW, if this is for debugging, you have another option. Start your application from a shell, and then attach the debugger to the running application. This can even have an advantage if you want to debug some feature that is not part of the startup procedure of your application: all the steps that you are NOT interested in are taken at maximum speed, without the overhead from a debugger (which can be considerable).

R.


More information about the KDevelop mailing list