Some scripts and Makefiles used during the bootstrap process use options provided by GNU tools (bash, test, diff) which are not supported by stock Solaris 2.8 tools. The errors I have encountered so far (I'm still fighting with installation) are: missing -a flag between two tests use of test -e, which should be replaced by test -f (or test -d for directories) use of set -C in shell (which has no equivalent) use of diff -U 0, which should be replaced by diff -C 0 with the additional trick to add a space between the initial '-' or '+' character and the line The concerned files are libjava/classpath/lib/gen-classlist.sh.in, libjava/classpath/lib/Makefile.am and libjava/classpath/scripts/check_jni_methods.sh. I will post a patch for this in a few minutes.
Created attachment 13213 [details] patch changing commands flags to ones hopefully more widely supported This patch is neither fully tested nor complete. It is merely provided as a reference and to clarify the problem. I am not sure the chosen flags are the good ones (for example I didn't understand what the inial test with the missing -a and the compound -ef flags intended to do).
In the provided patch, I replaced a sequence of mkdir commands with a single mkdir -p. I know the -p flag is not supported everywhere (or at least was not supported years ago), but since this option is used elsewhere in the Makefile.am, I considered it was not a problem.
/bin/sh is not a POSIX shell in Solaris and GCC depends a POSIX shell. test -ef is actually POSIX, read the man page on solaris, it will say it is not avaible with /bin/sh. Anyways you did not read: http://gcc.gnu.org/install/specific.html#x-x-solaris2 Which says: The Solaris 2 /bin/sh will often fail to configure libstdc++-v3, boehm-gc or libjava. We therefore recommend using the following initial sequence of commands % CONFIG_SHELL=/bin/ksh % export CONFIG_SHELL
Sorry, I missed this. One question remains, though: does this also stand for the -U flag in the diff command from script libjava/classpath/scripts/check_jni_methods.sh ? I did not find anything about it (but once again may have missed something).