Re: [polyml] Poly/ML 5.5.1
A follow-up on this. On 20/09/2013 16:33, David Matthews wrote: On 20/09/2013 08:59, Anthony Fox wrote: 1. I’ve noticed a change in evaluation behaviour between PolyML 5.5.0 and 5.5.1. Given the functions: fun foo () = let val () = print x\n in SOME end fun bar f = List.mapPartial (Option.compose (Int.~, f ())) [1, 2, 3] then under 5.5.0 “bar foo” gives us x val it = [~1, ~2, ~3]: int list whereas under 5.5.1 we get x x x val it = [~1, ~2, ~3]: int list What’s happening here? This doesn't look good. I need to investigate further but it looks as though a bug has crept in during the work on the intermediate code optimiser. I've fixed this and another bug that appeared when I disabled the optimisation that was causing the problem. I've ported the fixes to the fixes branch. I'm a bit concerned about this because it's clearly generating incorrect code. Should there perhaps be another release fairly soon? 2. I’ve installed Poly/ML 5.5.1 using MacPorts (Mac OS 10.8.5). When using polyc I get a couple of warning messages, i.e. $ polyc -o foo foo.o gives me ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in area1 from vimpoly.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie Is there any way to suppress this? When using cc for linking, one can get rid of these messages by adding -Wl,-no_compact_unwind,-no_pie Is this advisable or is there a better solution? I've done a search on this. It looks as though it has something to do with libffi (_ffi_call_unix64 is certainly part of libffi). I don't know if there's a newer version of libffi around that fixes this. It's a bit difficult to get any further with this at the moment. The only Mac OS X machine I have access to is running 10.8.0 and that doesn't seem to have the problem. David ___ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
Re: [polyml] Poly/ML 5.5.1
On 11 Oct 2013, at 13:51, David Matthews david.matth...@prolingua.co.uk wrote: A follow-up on this. On 20/09/2013 16:33, David Matthews wrote: On 20/09/2013 08:59, Anthony Fox wrote: 1. I’ve noticed a change in evaluation behaviour between PolyML 5.5.0 and 5.5.1. Given the functions: fun foo () = let val () = print x\n in SOME end fun bar f = List.mapPartial (Option.compose (Int.~, f ())) [1, 2, 3] then under 5.5.0 “bar foo” gives us x val it = [~1, ~2, ~3]: int list whereas under 5.5.1 we get x x x val it = [~1, ~2, ~3]: int list What’s happening here? This doesn't look good. I need to investigate further but it looks as though a bug has crept in during the work on the intermediate code optimiser. I've fixed this and another bug that appeared when I disabled the optimisation that was causing the problem. I've ported the fixes to the fixes branch. I'm a bit concerned about this because it's clearly generating incorrect code. Should there perhaps be another release fairly soon? Thanks. Yes, it is concerning. I have kept my main working version on 5.5 for now, so I'd certainly appreciate a quick 5.5.2 release. 2. I’ve installed Poly/ML 5.5.1 using MacPorts (Mac OS 10.8.5). When using polyc I get a couple of warning messages, i.e. $ polyc -o foo foo.o gives me ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in area1 from vimpoly.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie Is there any way to suppress this? When using cc for linking, one can get rid of these messages by adding -Wl,-no_compact_unwind,-no_pie Is this advisable or is there a better solution? I've done a search on this. It looks as though it has something to do with libffi (_ffi_call_unix64 is certainly part of libffi). I don't know if there's a newer version of libffi around that fixes this. It's a bit difficult to get any further with this at the moment. The only Mac OS X machine I have access to is running 10.8.0 and that doesn't seem to have the problem. I see. I don't think this a big problem. Things seems to be working fine with HOL4 under 5.5.1 on Mac OS. Those extra flags (above) are added to avoid these messages. It won't be long before 10.9.0 is released, so there's a chance that the warning messages will go/change. Some minor changes were made to HOL4 to recover our prompt, so that worked out fine. Thanks, Anthony ___ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
Re: [polyml] Poly/ML 5.5.1
On 17 Sep 2013, at 17:57, David Matthews david.matth...@prolingua.co.uk wrote: I have uploaded the source for Poly/ML 5.5.1 to the SourceForge site so it is now officially released. I still need to create installers for Windows. The release notes at http://www.polyml.org/docs/ReleaseNotes.html give a general overview of the changes over the last year. There have been no big changes which is the reason it's 5.5.1 rather than 5.6. David ___ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml Thanks for the new release. I have a few issues/questions. 1. I’ve noticed a change in evaluation behaviour between PolyML 5.5.0 and 5.5.1. Given the functions: fun foo () = let val () = print x\n in SOME end fun bar f = List.mapPartial (Option.compose (Int.~, f ())) [1, 2, 3] then under 5.5.0 “bar foo” gives us x val it = [~1, ~2, ~3]: int list whereas under 5.5.1 we get x x x val it = [~1, ~2, ~3]: int list What’s happening here? 2. I’ve installed Poly/ML 5.5.1 using MacPorts (Mac OS 10.8.5). When using polyc I get a couple of warning messages, i.e. $ polyc -o foo foo.o gives me ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in area1 from vimpoly.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie Is there any way to suppress this? When using cc for linking, one can get rid of these messages by adding -Wl,-no_compact_unwind,-no_pie Is this advisable or is there a better solution? 3. I’ve managed to build HOL4 using 5.5.1 but we have lost our prompt. My understanding is as follows: $ foo | poly suppresses the prompt $ foo | poly -i brings the prompt back. However, if program “bar” is based on using PolyML.rootFunction (as HOL4 is) then we get $ bar prompt $ foo | bar no prompt. Since piping (a quotation filter) is used with HOL4, we get the latter. How do we implement the “-i” option to get our prompt back? Thanks, Anthony ___ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
Re: [polyml] Poly/ML 5.5.1
On 20/09/2013 08:59, Anthony Fox wrote: 1. I’ve noticed a change in evaluation behaviour between PolyML 5.5.0 and 5.5.1. Given the functions: fun foo () = let val () = print x\n in SOME end fun bar f = List.mapPartial (Option.compose (Int.~, f ())) [1, 2, 3] then under 5.5.0 “bar foo” gives us x val it = [~1, ~2, ~3]: int list whereas under 5.5.1 we get x x x val it = [~1, ~2, ~3]: int list What’s happening here? This doesn't look good. I need to investigate further but it looks as though a bug has crept in during the work on the intermediate code optimiser. 2. I’ve installed Poly/ML 5.5.1 using MacPorts (Mac OS 10.8.5). When using polyc I get a couple of warning messages, i.e. $ polyc -o foo foo.o gives me ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in area1 from vimpoly.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie Is there any way to suppress this? When using cc for linking, one can get rid of these messages by adding -Wl,-no_compact_unwind,-no_pie Is this advisable or is there a better solution? I've done a search on this. It looks as though it has something to do with libffi (_ffi_call_unix64 is certainly part of libffi). I don't know if there's a newer version of libffi around that fixes this. 3. I’ve managed to build HOL4 using 5.5.1 but we have lost our prompt. My understanding is as follows: $ foo | poly suppresses the prompt $ foo | poly -i brings the prompt back. However, if program “bar” is based on using PolyML.rootFunction (as HOL4 is) then we get $ bar prompt $ foo | bar no prompt. Since piping (a quotation filter) is used with HOL4, we get the latter. How do we implement the “-i” option to get our prompt back? You should just be able to run bar -i. PolyML.rootFunction decodes the arguments which it gets with CommandLine.arguments. You can, of course, implement your own top-level loop. It's actually very simple: all the real work is done with PolyML.compiler. David ___ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
Re: [polyml] Poly/ML 5.5.1
On 17/09/2013 19:43, Ramana Kumar wrote: I would like to report that the new default to not build a shared library means Poly/ML 5.5.1 does not build HOL4 unless you use the --enable-shared option at configure time. Is this as expected, or is there some other possible solution? This issue with HOL4 did come up during testing. It seems that when libpolyml is built with --disable-shared it is necessary to give more libraries on the linking line than when it is built with --enable-shared. If the libraries are missing then you get the errors with missing symbols. The complication is that exactly which libraries have to be included depend on how libpolyml was built. The configure script detects the libraries that are needed to build poly and builds a linker command line from that. In particular, -lgmp is included only if GMP is present. This all makes it difficult for a build script such as that used by HOL4 to have a standard linker command line. The idea of polyc is to capture the linker command line that was used to build poly on the particular platform and make it available for other applications. So, I would recommend that HOL4 and other applications check for the presence of polyc and use that to do the linking if it is available. By changing to --disable-shared as the default, I felt that this would simplify the process of running applications, particularly poly, at the expense of making linking a bit more difficult. Those packaging Poly/ML for particular distributions may want to use --enable-shared but they will be installing libpolyml to a standard location where the loader can find it. Interestingly, even when --enable-shared is given at configure time, the polyc script prints some errors where it probably shouldn't: % polyc Usage: file [-bchikLlNnprsvz0] [--apple] [--mime-encoding] [--mime-type] [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ... file -C [-m magicfiles] file [--help] /usr/lib/libpolymain.a(polystub.o): In function `main': (.text.startup+0x1): undefined reference to `poly_exports' collect2: error: ld returned 1 exit status OK, I hadn't tested polyc without any arguments. That's a bug. It ought to behave the same as polyc --help It is always supposed to be provided with a source or object file name. David ___ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
Re: [polyml] Poly/ML 5.5.1
On 18/09/2013 18:21, Ramana Kumar wrote: Do you happen to know whether and how polyc could be used to build HOL4 when poly was built with --disabled-shared? I think I tried using polyc tools/smart-configure.sml to start the HOL4 build process (i.e. using polyc instead of poly), but it didn't work. (I should try it again to be sure.) But would you expect to have to change the contents of smart-configure.sml to make this work? You can't use polyc tools/smart-configure.sml. You will need to use poly here. You need to look more carefully at what smart-configure actually does. Somewhere in there it will either write out a script to link the object file or it will create a script which uses one of a number of pre-built scripts. All this is very specific to the HOL4 build process. David ___ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
Re: [polyml] Poly/ML 5.5.1
That's great :) Has the -fixes branch also been updated - or will it be? On Tue, Sep 17, 2013 at 5:57 PM, David Matthews david.matth...@prolingua.co.uk wrote: I have uploaded the source for Poly/ML 5.5.1 to the SourceForge site so it is now officially released. I still need to create installers for Windows. The release notes at http://www.polyml.org/docs/**ReleaseNotes.htmlhttp://www.polyml.org/docs/ReleaseNotes.htmlgive a general overview of the changes over the last year. There have been no big changes which is the reason it's 5.5.1 rather than 5.6. David __**_ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/**mailman/listinfo/polymlhttp://lists.inf.ed.ac.uk/mailman/listinfo/polyml ___ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml