Program not running in Cygwin64 - cygwin

I'm trying to run a program (Exonerate : http://www.ebi.ac.uk/~guy/exonerate/) using Cygwin64.
But for some reason the program doesn't run when I try to execute it using the Cygwin shell and produces no error message either. I've added the C:\Cygwin64\bin to the DOS PATH
The program runs fine in some other comp. which runs Cygwin32.
Can anybody please help to sort it out.
Thanks in advance

I met the same situation in Cygwin64 on Windows 10. The solution is add ./ before the file name.
So that is when I want to run test.exe after I made it by running gcc test.c -o test, I need to run ./test.exe instead of text.exe.

Related

execute to exe. successful by pyinstaller, but the exe. is not work. How can I debug it

It's work on Spyder (Anaconda3) and execute script to exe by pyinstaller without any errors, but nothing happens when I double click exe (also try cx_freeze, but still not work either).
How can I debug it? Appreciate for your help.
import os,shutil
cur_path=os.path.dirname(__file__)
sample_tree=os.walk(cur_path)
for dirname,subdir,files in sample_tree:
allfiles=[]
basename=os.path.basename(dirname)
for file in files:
ext=file.split('.')[-1]
if ext=="csv":#讀取.csv to allfiles
allfiles.append(file)
elif ext=='log':#讀取.log to allfiles
allfiles.append(file)
for file in allfiles:#Copy csv and log of sample_tree to destfolder
destfile = cur_path
srcfile=dirname + "/" + file
shutil.move(srcfile,destfile)
p.s. python 3.6/pyinstaller 3.3/Win 10
Debugging is s simple enough process.
In cx_Freeze you can find any errors by doing the following:
Before building ensure your script works correctly.
When building from a setup script see If any errors or warnings appear while it turns into an application. Do not worry if you get warnings you get these even when the application works correctly just ensure you know about them since they may give you a clue why it is not working.
When you application has been built it run it from command line. This final step will show up any errors.
Next you need to configure you setup script accordingly and recompile it and finally run through the process again to see if you have fixed the problem.
For Pyinstaller follow the same process.
In both modules the best debugging method is to run it from command line.
You can check your application by opening a new terminal window where the application is located and running it
For Linux and CMD (Windows):
yourappname
and for PowerShell:
./yourappname

Compiling mex files fails using shell script

I have some mex files, which until recently were working perfectly. They require some compiler flags which matlab won't pass using the ordinary mex command, so I've been using a shell script to compile them, accomplished from within matlab using !sh mexfile_compile.sh. This has worked fine for about a year.
I've recently found (with no change to the version of GCC or g++ I have installed), that my files won't compile any more; I get the error sh: 0: Can't open mexfile_compile.sh, even if I run matlab as root.
Interestingly, if I run !ls | grep mexfile_compile.sh on the active directory from the matlab prompt, I get a single result: mexfile_compile.sh.save, though if I run the same command (without the !) in a normal terminal window, I don't get the .save at the end. It's worth pointing out that the script runs perfectly well from the terminal using sh mexfile_compile.sh.
Does anyone know what's going on here or how I can fix it?

timeout --> command not found in linux server

I am using linux server from cPanel. Now I need to use one of the linux command to run. And the command is 'timeout'. My command is something as below
$timeout 2s ./myexecutable < input > output
This is just running ok in my linux machine. But I want to run it in server(linux). But it is not running out there. I saw error log using 2>$1 . and it says command not found.
So how do I specify the path. That means how can I know the exact path to run it.
I am very new to this type of server stuff, so please don't be rude :D.. whatever you know please help me to get out of it.
thank you
On Mac, you can use gtimeout from the coreutils package. To install it, run
brew install coreutils
If you need the command to be called "timeout" then you can alias it.
alias timeout="gtimeout"

Can run program from Qt but can't run it from konsole

I have a a problem sounds pretty wierd. I compiled a program in Qt and it ran successfully.
But when I navigated to the release folder in the konsole and ran the program (even with super user), it reported :
If 'HelloWorld' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf HelloWorld
I checked the permissions, all users can read it.The path is right. I'm out of way.
Please help me!
Note: I use Qt 4.74 on OpenSuse 12.1. Just switched from windows few days ago
I think this ain't relate to the source code, since even a simple HelloWorld program can't run either
If the program is in the current directory, make sure you run it with a prefix indicating so:
./HelloWorld

Having trouble with post-commit hook

I am following this tutorial that is like the hello world for post-commit
I am using Ubuntu 10.04. I installed svnnotify and ran $ which svnnotify which output:
/usr/bin/svnnotify
so I changed the path in the turorial from /usr/local/bin/svnnotify to /usr/bin/svnnotify
I also tried changing the line: #!/bin/sh to #!/bin/bash since bash is the login shell in ubuntu 10.04.
I tried to run it the way the tutorial originally had it, with my changes, and combinations of the two.
Every time the commit is successful but I get
Warning: post-commit hook failed (exit code 1) with no output.
The original way had output not found
I am very new to linux and shell scripting and have exhausted everything I can think of. What am I doing wrong?
Get the script working and tested before trying to run as a commit hook. I expect that your problem is something to do with the script, maybe not being marked as executable, environment wrong, etc.. i.e. if you can't get it to run successfully from the command line, this is more of a unix/shell question and doesn't really have anything to do with SVN (yet).
I'm not sure whether this applies in the Linux world, but in the Windows versions of SVN I've used, the code which runs the hook scripts only captures STDERR. If your hook script is only writing messages to STDOUT, that would likely explain the "No Output" warning.

Resources