I've downloaded the command-line program "Whitaker's Words" which was available for Linux as well as Windows etc.
There is a main program named words. I tried to execute it on my Ubuntu (11.10) machine on command line and it worked:
./words
When I tested it on my Linux webserver (Linux 2.6.37-he-xeon-64gb+1 i686), it worked as well.
Then I decided to apply some changes to the source code and to recompile it. For that, I used the following commands (the latter four are supporting programs):
gnatmake -O3 words -bargs -static
gnatmake makedict -bargs -static
gnatmake makestem -bargs -static
gnatmake makeefil -bargs -static
gnatmake makeinfl -bargs -static
The resulting program worked properly on my Ubuntu machine again, as I could see the correct output in the terminal.
But when I tried to execute it on my webserver using PHP's shell_exec() or passthru(), there was simply no output! According to ldd, the program is statically linked so it should really work, shouldn't it?
I've been testing and debugging for weeks now and I can't find any reason why this is so. Can you help me?
You can get the program here: download link at filedropper.com
(I guess this is no programming question, as my problem is just: How to get that program running on my webserver?)
System I want to compile the program on:
Linux ubuntu 3.0.0-12-generic #20-Ubuntu x86 GNU/Linux
This is the newest Wubi (32-bit) release of Ubuntu.
ldd --version outputs ldd (Ubuntu EGLIBC 2.13-20ubuntu5) 2.13
System I want to run the compiled program on (webserver):
Linux 2.6.37-he-xeon-64gb+1 i686 GNU/Linux
ldd --version outputs ldd (GNU libc) 2.7
Note:
Errors on the server side can be excluded as everything works fine if I just replace my own Linux program by the pre-compiled one.
Errors on the server side can be excluded as everything works fine if I just replace my own Linux program by the pre-compiled one.Update #1:
I've tried running the program (that works fine under Ubuntu 11.10) in my VirtualBox under Ubuntu 5.10 - and it didn't work, either. Good news, so it's definitely not the server's fault. Ubuntu 5.10 just said: floating point exception. Does this help? Why is there an exception but not under Ubuntu 11.10?