
Is there any documentation/dev notes/anything helpful having to do with the Yhc interface file format? I couldn't find anything on the wiki and trying to read the code for the parser and printer made my head hurt. They're both written in a style that's a little, uh... less than transparent. Rob Dockins Speak softly and drive a Sherman tank. Laugh hard; it's a long way to the bank. -- TMBG

Is there any documentation/dev notes/anything helpful having to do with the Yhc interface file format? They are identical to the nhc98 ones, so if you can find any docs for
Hi Robert, the nhc98 stuff its reuseable
I couldn't find anything on the wiki and trying to read the code for the parser and printer made my head hurt. They're both written in a style that's a little, uh... less than transparent. The code is also directly from nhc98, with no modifications.
Me and Tom have discussed this - moving to binary .hi files makes a lot of sense and will give quite large compile time speedups. Also, shoving the .hi information in the .hbc file is not a bad idea, since we already have a binary file sitting around and its useful type information that could be used to do a static type check on the .hbc file, similar to Java's verifier. The only thing to remember is that .hi files are written manually for a couple of things to bootstrap stuff. Thanks Neil

On Jun 29, 2006, at 6:20 AM, Neil Mitchell wrote:
Hi Robert,
Is there any documentation/dev notes/anything helpful having to do with the Yhc interface file format? They are identical to the nhc98 ones, so if you can find any docs for the nhc98 stuff its reuseable
Ok. Thanks.
I couldn't find anything on the wiki and trying to read the code for the parser and printer made my head hurt. They're both written in a style that's a little, uh... less than transparent. The code is also directly from nhc98, with no modifications.
Me and Tom have discussed this - moving to binary .hi files makes a lot of sense and will give quite large compile time speedups. Also, shoving the .hi information in the .hbc file is not a bad idea, since we already have a binary file sitting around and its useful type information that could be used to do a static type check on the .hbc file, similar to Java's verifier.
Ah... I see we're thinking along similar lines. I'm currently looking pretty closely at verification. The hbc would be an awfully convenient place to shove type info and verification certificates...
The only thing to remember is that .hi files are written manually for a couple of things to bootstrap stuff.
Is that to resolve cyclic module dependencies al la GHC, or for some other reason?
Thanks
Neil
Rob Dockins Speak softly and drive a Sherman tank. Laugh hard; it's a long way to the bank. -- TMBG

The only thing to remember is that .hi files are written manually for a couple of things to bootstrap stuff.
Is that to resolve cyclic module dependencies al la GHC, or for some other reason?
Partially, yes, to resolve cyclic dependancies, but thats not required for the Prelude etc - only in user code. The other reason is that some files, PreludeBuiltin, exist only as .hi files - defining things like (->). I tried to break this dependance at some point, but failed miserably - I never could figure out how name resolution worked, and therefore bootstrap it with the required names. Thanks Neil

Attempting to build with gcc 4.0 on OS X fails with the following errors. Has anyone else successfully built on OS X? Thanks, -Brent make[5]: Nothing to be done for `all'. true "AR_FLAGS=" "CC_FOR_BUILD=" "CFLAGS=-I/opt/local/include" "CXXFLAGS=" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=" "INSTALL=/usr/ bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/ install -c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=make" "MAKEINFO=/bin/sh /Users/brent/ Projects/Yhc/yhc-devel/src/runtime/libffi/missing --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTFLAGS=" "SHELL=/bin/sh" "exec_prefix=/usr/local" "infodir=/usr/local/info" "libdir=/usr/local/ lib" "prefix=/usr/local" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=ld" "NM=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make make -C BCKernel gcc -g -o ../../../inst/bin/yhi obj/hashtable.o obj/module.o obj/ iofuncs.o obj/main.o obj/primitive.o obj/pretty.o obj/heap.o obj/ mutator.o obj/integer.o obj/mark.o obj/jonkers.o obj/sanity.o obj/ external.o obj/info.o obj/make.o obj/foreign.o obj/process.o obj/ thread.o obj/ffi.o obj/stable.o obj/Prelude.o obj/IO.o obj/FFI.o obj/ System.o obj/PackedString.o obj/Concurrent.o obj/Array.o -lm - lpthread -ldl -lgmp ../libffi/.libs/libffi.a /usr/bin/ld: multiple definitions of symbol _hsffi_call obj/ffi.o definition of _hsffi_call in section (__TEXT,__text) obj/FFI.o definition of _hsffi_call in section (__TEXT,__text) /usr/bin/ld: multiple definitions of symbol _hsffi_finalizeAllWaiting obj/ffi.o definition of _hsffi_finalizeAllWaiting in section (__TEXT,__text) obj/FFI.o definition of _hsffi_finalizeAllWaiting in section (__TEXT,__text) /usr/bin/ld: multiple definitions of symbol _hsffi_init obj/ffi.o definition of _hsffi_init in section (__TEXT,__text) obj/FFI.o definition of _hsffi_init in section (__TEXT,__text) /usr/bin/ld: multiple definitions of symbol _hsffi_loadExternal obj/ffi.o definition of _hsffi_loadExternal in section (__TEXT,__text) obj/FFI.o definition of _hsffi_loadExternal in section (__TEXT,__text) /usr/bin/ld: multiple definitions of symbol _hsffi_waitForFFI obj/ffi.o definition of _hsffi_waitForFFI in section (__TEXT,__text) obj/FFI.o definition of _hsffi_waitForFFI in section (__TEXT,__text) /usr/bin/ld: can't locate file for: -lgmp collect2: ld returned 1 exit status make[2]: *** [../../../inst/bin/yhi] Error 1 make[1]: *** [kernel] Error 2 make: *** [runtime] Error 2 Chaz:~/Projects/Yhc/yhc-devel brent$

On 6/30/06, Brent Fulgham
Attempting to build with gcc 4.0 on OS X fails with the following errors. Has anyone else successfully built on OS X?
Hi, Yhc is currently in the process of moving towards using scons for the build process rather than make. Can you try building using scons? You might need to install scons first (www.scons.org) then simply type 'scons'. I suspect it will still fail as the errors look to be coming from the fact that you're missing libgmp, but it would be useful to check. Cheers, Andrew

On Jun 30, 2006, at 6:33 AM, Andrew Wilkinson wrote:
On 6/30/06, Brent Fulgham
wrote: Attempting to build with gcc 4.0 on OS X fails with the following errors. Has anyone else successfully built on OS X? Hi,
Yhc is currently in the process of moving towards using scons for the build process rather than make. Can you try building using scons? You might need to install scons first ( www.scons.org) then simply type 'scons'.
I suspect it will still fail as the errors look to be coming from the fact that you're missing libgmp, but it would be useful to check.
Erg! That's even worse. Must I have certain environment variables defined? All I did was install the DarwinPorts package of 'scons' and ran it. Thanks, -Brent scons: Reading SConscript files ... AttributeError: 'module' object has no attribute 'ArAction': File "SConstruct", line 7: hsenv = Environment(tools = ["default", "haskell"], toolpath=["./ build/tools/"], ENV = {'PATH' : os.environ['PATH']}) File "/opt/local/lib/scons-0.96.91/SCons/Memoize.py", line 819: klassdict['__init__'] = lambda self, *args, **kw: newinit(self, args, kw) File ".../SCons/Memoizer-init-lambda", line 1: None File "/opt/local/lib/scons-0.96.91/SCons/Memoize.py", line 778: apply(actual_init, (self,)+args, kw) File "/opt/local/lib/scons-0.96.91/SCons/Memoize.py", line 1: """Memoizer File "/opt/local/lib/scons-0.96.91/SCons/Memoize.py", line 781: apply(super(cls, self).__init__, args, kw) File "/opt/local/lib/scons-0.96.91/SCons/Memoize.py", line 819: klassdict['__init__'] = lambda self, *args, **kw: newinit(self, args, kw) File ".../SCons/Memoizer-init-lambda", line 471: None File "/opt/local/lib/scons-0.96.91/SCons/Memoize.py", line 778: apply(actual_init, (self,)+args, kw) File "/opt/local/lib/scons-0.96.91/SCons/Environment.py", line 517: apply_tools(self, tools, toolpath) File "/opt/local/lib/scons-0.96.91/SCons/Environment.py", line 133: env.Tool(tool) File "/opt/local/lib/scons-0.96.91/SCons/Environment.py", line 1091: tool(self) File "/opt/local/lib/scons-0.96.91/SCons/Tool/__init__.py", line 128: apply(self.generate, ( env, ) + args, kw) File "./build/tools/haskell.py", line 163: haskellLibrary = SCons.Builder.Builder(action = SCons.Defaults.ArAction, Chaz:~/Projects/Yhc/yhc-devel brent$

Brent Fulgham
Attempting to build with gcc 4.0 on OS X fails with the following errors. Has anyone else successfully built on OS X?
Not yet. The problem you encountered seems to be the case-insensitivity of the MacOS file system. obj/FFI.o is overwriting obj/ffi.o. But my build does not even get that far. I have a couple of different errors, earlier in the build, when first trying to compile the libffi component: make -C libffi -f ConfigAndMake.makefile ln -s libffi/config-ml.in ../config-ml.in # HACK for broken configure sh ./configure checking build system type... powerpc-apple-darwin8.6.0 [...output of configure...] make make "AR_FLAGS=" "CC_FOR_BUILD=" "CFLAGS=-g -O2" "CXXFLAGS=" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=make" "MAKEINFO=/bin/sh /Users/malcolm/Haskell/yhc-devel/src/runtime/libffi/missing --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTFLAGS=" "SHELL=/bin/sh" "exec_prefix=/usr/local" "infodir=/usr/local/info" "libdir=/usr/local/lib" "prefix=/usr/local" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=ld" "NM=" "RANLIB=ranlib" "DESTDIR=" all-recursive Making all in include cat: ../../gcc/BASE-VER: No such file or directory make[5]: Nothing to be done for `all'. Making all in testsuite make[5]: Nothing to be done for `all'. make[5]: execvp: /Users/malcolm/Haskell/yhc-devel/src/runtime/libffi/install-sh: Permission denied make[5]: *** [src/.dirstamp] Error 127 make[4]: *** [all-recursive] Error 1 make[3]: *** [all] Error 2 make[2]: *** [make] Error 2 make[1]: *** [libffi] Error 2 make: *** [runtime] Error 2 Regards, Malcolm

According to the libffi docs this relates is a known bug in Mac OS X shell. I believe Andrew has been playing with using the ctypes libffi or something, perhaps that doesn't have the same problems? Tom Malcolm Wallace wrote:
Brent Fulgham
wrote: Attempting to build with gcc 4.0 on OS X fails with the following errors. Has anyone else successfully built on OS X?
Not yet. The problem you encountered seems to be the case-insensitivity of the MacOS file system. obj/FFI.o is overwriting obj/ffi.o.
But my build does not even get that far. I have a couple of different errors, earlier in the build, when first trying to compile the libffi component:
make -C libffi -f ConfigAndMake.makefile ln -s libffi/config-ml.in ../config-ml.in # HACK for broken configure sh ./configure checking build system type... powerpc-apple-darwin8.6.0 [...output of configure...] make make "AR_FLAGS=" "CC_FOR_BUILD=" "CFLAGS=-g -O2" "CXXFLAGS=" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=make" "MAKEINFO=/bin/sh /Users/malcolm/Haskell/yhc-devel/src/runtime/libffi/missing --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTFLAGS=" "SHELL=/bin/sh" "exec_prefix=/usr/local" "infodir=/usr/local/info" "libdir=/usr/local/lib" "prefix=/usr/local" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=ld" "NM=" "RANLIB=ranlib" "DESTDIR=" all-recursive Making all in include cat: ../../gcc/BASE-VER: No such file or directory make[5]: Nothing to be done for `all'. Making all in testsuite make[5]: Nothing to be done for `all'. make[5]: execvp: /Users/malcolm/Haskell/yhc-devel/src/runtime/libffi/install-sh: Permission denied make[5]: *** [src/.dirstamp] Error 127 make[4]: *** [all-recursive] Error 1 make[3]: *** [all] Error 2 make[2]: *** [make] Error 2 make[1]: *** [libffi] Error 2 make: *** [runtime] Error 2
Regards, Malcolm _______________________________________________ Yhc mailing list Yhc@haskell.org http://www.haskell.org//mailman/listinfo/yhc

On 6/30/06, Thomas Shackell
According to the libffi docs this relates is a known bug in Mac OS X shell. I believe Andrew has been playing with using the ctypes libffi or something, perhaps that doesn't have the same problems?
Currently scons builds the ctypes libffi for Windows. On every other platform it doesn't do anything special and just links against the globally installed libffi (assuming there is one). The possiblity of compiling libffi for every platform had crossed my mind, but I haven't done anything about it yet. Andrew

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Jun 30, 2006, at 6:41 AM, Malcolm Wallace wrote:
Brent Fulgham
wrote: Attempting to build with gcc 4.0 on OS X fails with the following errors. Has anyone else successfully built on OS X?
Not yet. The problem you encountered seems to be the case- insensitivity of the MacOS file system. obj/FFI.o is overwriting obj/ffi.o.
But my build does not even get that far. I have a couple of different errors, earlier in the build, when first trying to compile the libffi component:
make -C libffi -f ConfigAndMake.makefile ln -s libffi/config-ml.in ../config-ml.in # HACK for broken configure sh ./configure checking build system type... powerpc-apple-darwin8.6.0 [...output of configure...] make make "AR_FLAGS=" "CC_FOR_BUILD=" "CFLAGS=-g -O2" "CXXFLAGS=" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=" "INSTALL=/usr/bin/install - c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/ bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=make" "MAKEINFO=/bin/sh /Users/malcolm/Haskell/yhc-devel/src/runtime/ libffi/missing --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTFLAGS=" "SHELL=/bin/sh" "exec_prefix=/usr/local" "infodir=/ usr/local/info" "libdir=/usr/local/lib" "prefix=/usr/local" "AR=ar" "AS=as" "CC=gcc" "CXX=g++" "LD=ld" "NM=" "RANLIB=ranlib" "DESTDIR=" all-recursive Making all in include cat: ../../gcc/BASE-VER: No such file or directory make[5]: Nothing to be done for `all'. Making all in testsuite make[5]: Nothing to be done for `all'. make[5]: execvp: /Users/malcolm/Haskell/yhc-devel/src/runtime/ libffi/install-sh: Permission denied
I ran into that, too. The problems here are threefold: 1. The install-sh and other libtool stuff does not have the execute permissions set. 2. The "gcc/BASE-VER" does not get created for some reason. 3. The libtool stuff may not be correct for Mac OS. I did the following: (a) I chmod'd the various "install-sh" scripts. (b) I created a "src/runtime/gcc" directory, and created a file called "BASE-VER" containing the text '4'. (c) I updated the libtool scripts with the current stuff from the Mac OS developer tools, then when that didn't work I erased the directory and re-got everything from darcs. Don't know if that will help, but it might get you a few steps farther... Thanks, - -Brent -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (Darwin) iD8DBQFEpeXbzGDdrzfvUpURAnUgAKCuxIH7F/BNM6HNcy7lgOPG+QlzyACfazR3 Ih8S7jG7A3bkZ1XLK59uitk= =WEaR -----END PGP SIGNATURE-----
participants (7)
-
Andrew Wilkinson
-
Brent Fulgham
-
Brent Fulgham
-
Malcolm Wallace
-
Neil Mitchell
-
Robert Dockins
-
Thomas Shackell