
On Mon, Sep 22, 2008 at 03:32:40PM +0200, Christian Maeder wrote:
I've tried to build a binary dist on x86 under Solaris and did not succeed.
"make binary-dist" failed with
1. for FILE in ; do if [ -e $FILE ]; then echo ghc-6.10.0.20080921/gmp/$FILE >> /export/local1/home/maeder/haskell/ghc-6.10.0.20080921/bindist-list ; fi; done /bin/sh: syntax error at line 1: `;' unexpected gmake[1]: *** [binary-dist] Error 2
I added "strip" to bindist.mk: ifneq "$(strip $(BINDIST_EXTRAS))" ""
This part could be done a little bit different (without the conditional): ... # And enything else echo $(BINDIST_EXTRAS) | \ xargs -n1 | \ sed '/^$/d;s/.*/test -e & \&\& echo $(WHERE_AM_I)\/&/' | \ sh >> $(BIND_DIST_LIST) (untested!)
2. /bin/sh: test: argument expected gmake[1]: *** [binary-dist] Error 1
-e does not work for test under "sh", so I changed it to "-r": ... if [ -r $$FILE ]; then ...
I doubt `-e' doesn't work on Solaris, because `-e' is POSIX. Does this "argument expected" still appear with your fix to 1.?
3. tar hcf /export/local1/home/maeder/haskell/ghc-6.10.0.20080921/ghc-6.10.0. 20080921-i386-unknown-solaris2.tar -T /export/local1/home/maeder/haskell/ghc-6.10.0.20080921/bindist-list tar: -T: No such file or directory gmake: *** [binary-dist] Error 1
I changed tar to gtar
Or use pax(1), which in contrast to tar(1) and gtar(1) is POSIX: pax -hwf $(BIN_DIST_TAR) < $(BIN_DIST_LIST) (also untested, but should work)
4. gtar: ghc-6.10.0.20080921/gmp/{}: Cannot stat: No such file or directory
The file bindist-list contained "{}" instead of filenames, so I changed find to gfind.
Or just omit all the -exec echo ${WHERE_AM_I}/{} goo and use find(1) and sed(1), e.g.: find $(WHATEVER) -print | sed 's/^/$(WHERE_AM_I}\//'
5. When trying to install the binary distribution I got:
Installing executable(s) in /local/home/maeder/bin installPackage: dist-install/build/installPackage/installPackage: copyFile: does not exist (No such file or directory)
Maybe fallout from some of the above problems? Ciao, Kili