Apart from the missing SPARC parts, two files had to be changed on Solaris:
uname -a
SunOS neptun 5.7 Generic_106541-18 sun4u sparc SUNW,Ultra-Enterprise
gcc -v
[...] Thread model: posix gcc version 3.0.2 In configure.in, change if (test "`basename ${YACC}`x" == "byaccx"); then to if test "`basename ${YACC}`x" = "byaccx" ; then After this, configure works well.
grep DLL ../config.h
#define MKDLL_CMD "gcc -r"
grep UNDERSCORE ../config.h
/* #undef LEADING_UNDERSCORE */
cd .. ; make install_ffi
OK. But why are some files compiled with -O2 and others not? In testScript, change source config to . ./config
cd ../tests ; sh testScript ffi
---------------------------------------------------------------- -- Testing foreign function interface. ---------------------------------------------------------------- -- !!! Testing marshalling of all the basic types -- !!! Testing all the different forms of foreign import -- !!! Testing static, dynamic and wrapped import of trig function -- !!! Testing static, dynamic and wrapped import of trig function /home/spanne/tmp/test/bin/hugs +q +w -pHugs: ffi/Sin.hs < ffi/Sin.input expected stdout not matched by reality *** ffi/Sin.output Tue Jun 18 22:02:08 2002 --- /tmp/runtest17728.3 Tue Jul 9 10:17:01 2002 *************** *** 7,13 **** Testing sin==IO wrapped_sin (should return lots of Trues) - [True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True] - - Testing sin==Id wrapped_sin (should return lots of Trues) - [True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True] Hugs:[Leaving Hugs] --- 7,10 ---- Testing sin==IO wrapped_sin (should return lots of Trues) + ERROR - Foreign export dynamic is not supported on this architecture Hugs:[Leaving Hugs] -- !!! Testing marshalling of strings -- !!! Testing marshalling of strings -- !!! Testing system calls -- !!! Testing system calls /home/spanne/tmp/test/bin/hugs +q +w -pHugs: ffi/FileIO.hs < ffi/FileIO.input expected stdout not matched by reality *** ffi/FileIO.output Sat Jun 22 01:22:01 2002 --- /tmp/runtest17813.3 Tue Jul 9 10:17:10 2002 *************** *** 16,17 **** --- 16,20 ---- + IO Error: User error + Reason: open2: (-1,2) + Hugs:[Leaving Hugs] ---------------------------------------------------------------- Cheers, S.
Sven Panne
Apart from the missing SPARC parts, two files had to be changed on Solaris:
Thanks again Sven. I've added your fixes to Hugs. I've added your report to this summary page http://www.reid-consulting-uk.ltd.uk/projects/ffi/index.html Could I ask you to check this CVS snapshot to see I got it right? http://www.reid-consulting-uk.ltd.uk/downloads/hugs98-ffi-09072002-src.tar.g... It will still fail on foreign import wrapper tests (though the error message is slightly better) but the configure and test should go cleanly. -- Alastair Reid alastair@reid-consulting-uk.ltd.uk Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
Alastair Reid wrote:
[...] Could I ask you to check this CVS snapshot to see I got it right?
Alas, no. There are still some bugs in configure.in: * The test for byacc still contains == instead of =. * HUGS_TRY_DYNLINK("-r") was commented out. With these changes, only Sin.hs fails. Cheers, S.
* The test for byacc still contains == instead of =.
Fixed in the repository
* HUGS_TRY_DYNLINK("-r") was commented out.
Ooops. My CVS snapshots have one changce from the CVS contents: I enable some untested flag options which are not enabled in the repository. I forgot to uncomment it in this release. I added -r to the repository copy and in http://www.reid-consulting-uk.ltd.uk/downloads/hugs98-ffi-09072002b-src.tar.... and quietly changed the link on the reports page to point here. Hopefully it works now.
With these changes, only Sin.hs fails.
Cool. Thanks again. -- Alastair Reid alastair@reid-consulting-uk.ltd.uk Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
Sven:
Yep. And I'm sure one can easily grab the missing SPARC part from GHC's fptools/ghc/rts/Adjustor.c.
Sadly, I'm going to be away from home and mostly away from email for the next 2.5 weeks so I'm not going to get to this before the US universities start up again (i.e., when we'd hoped to have the next Hugs release out). Urgh. -- Alastair Reid alastair@reid-consulting-uk.ltd.uk Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
participants (2)
-
Alastair Reid -
Sven Panne