Ubuntu Compile problems
The first /bin/sh and/or /bin/bash is the result of /bin/dash -
Say: "Thank You, Canonical"
Under 10.4 you may have to explicitly install bash (apt-get install bash).
It is certainly the /bin/sh problem (linked to /bin/dash) and from your report, I would say that your 10.4 also has /bin/bash linked to /bin/dash.
- - - -
The "warning implicate defination..." errors come from one or more missing header files.
"gcc -E " might give you some help in spotting the missing header(s).