From bcpierce at cis.upenn.edu Tue Dec 3 09:31:53 2019 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Tue, 3 Dec 2019 09:31:53 -0500 Subject: [Unison-hackers] Compiling Unison with OCaml 4.08 Message-ID: <28D45F64-42C3-4DAC-970B-4D5C1BB9E971@cis.upenn.edu> Has anyone been able to compile the GUI version of unison with OCaml 4.08? I get this (on both Catalina and Mohave): ? Ld /Users/bcpierce/home1/unison/src/uimac/build/Default/Unison.app/Contents/MacOS/Unison normal x86_64 (in target 'uimac' from project 'uimacnew') cd /Users/bcpierce/home1/unison/src/uimac /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -L/Users/bcpierce/home1/unison/src/uimac/build/Default -F/Users/bcpierce/home1/unison/src/uimac/build/Default -filelist /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison.LinkFileList -Xlinker -object_path_lto -Xlinker /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison_lto.o -fobjc-link-runtime -L/Users/bcpierce/.opam/default/lib/ocaml -lunix -lthreadsnat -lcamlstr -lbigarray -lasmrun -framework Cocoa -framework Security -framework ExceptionHandling -Xlinker -dependency_info -Xlinker /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison_dependency_info.dat -o /Users/bcpierce/home1/unison/src/uimac/build/Default/Unison.app/Contents/MacOS/Unison ld: library not found for -lbigarray clang: error: linker command failed with exit code 1 (use -v to see invocation) ** BUILD FAILED ** Any idea what?s wrong here? (The text UI builds fine.) Thanks! - Benjamin -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at jakobrath.eu Tue Dec 3 10:50:54 2019 From: mail at jakobrath.eu (Jakob Rath) Date: Tue, 3 Dec 2019 16:50:54 +0100 Subject: [Unison-hackers] Compiling Unison with OCaml 4.08 In-Reply-To: <28D45F64-42C3-4DAC-970B-4D5C1BB9E971@cis.upenn.edu> References: <28D45F64-42C3-4DAC-970B-4D5C1BB9E971@cis.upenn.edu> Message-ID: <4DE95E73-56D9-4419-9DD3-8AF2A1DAA74B@jakobrath.eu> Hi, I successfully built unison with OCaml 4.08.1 on Mojave a few weeks ago. At first, I hit the same error as you though (linker can?t find the bigarray library). I assumed it was a problem with my OCaml installation and worked around it by creating a symlink: $ cd /usr/local/lib/ocaml $ ln -s bigarray.a libbigarray.a Best, Jakob > On 03.12.2019, at 15:31, Benjamin C. Pierce wrote: > > Has anyone been able to compile the GUI version of unison with OCaml 4.08? I get this (on both Catalina and Mohave): > > ? > Ld /Users/bcpierce/home1/unison/src/uimac/build/Default/Unison.app/Contents/MacOS/Unison normal x86_64 (in target 'uimac' from project 'uimacnew') > cd /Users/bcpierce/home1/unison/src/uimac > /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -L/Users/bcpierce/home1/unison/src/uimac/build/Default -F/Users/bcpierce/home1/unison/src/uimac/build/Default -filelist /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison.LinkFileList -Xlinker -object_path_lto -Xlinker /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison_lto.o -fobjc-link-runtime -L/Users/bcpierce/.opam/default/lib/ocaml -lunix -lthreadsnat -lcamlstr -lbigarray -lasmrun -framework Cocoa -framework Security -framework ExceptionHandling -Xlinker -dependency_info -Xlinker /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison_dependency_info.dat -o /Users/bcpierce/home1/unison/src/uimac/build/Default/Unison.app/Contents/MacOS/Unison > ld: library not found for -lbigarray > clang: error: linker command failed with exit code 1 (use -v to see invocation) > > ** BUILD FAILED ** > > Any idea what?s wrong here? (The text UI builds fine.) > > Thanks! > > - Benjamin > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at LISTS.SEAS.UPENN.EDU > https://LISTS.SEAS.UPENN.EDU/mailman/listinfo/unison-hackers From bcpierce at cis.upenn.edu Tue Dec 3 11:20:40 2019 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Tue, 3 Dec 2019 11:20:40 -0500 Subject: [Unison-hackers] Compiling Unison with OCaml 4.08 In-Reply-To: <4DE95E73-56D9-4419-9DD3-8AF2A1DAA74B@jakobrath.eu> References: <28D45F64-42C3-4DAC-970B-4D5C1BB9E971@cis.upenn.edu> <4DE95E73-56D9-4419-9DD3-8AF2A1DAA74B@jakobrath.eu> Message-ID: <6640ED80-465A-4EAA-9DAA-70B0815CB5A4@cis.upenn.edu> That worked for me too ? thank you very much for the quick help! - Benjamin > On Dec 3, 2019, at 10:50 AM, Jakob Rath wrote: > > Hi, > > I successfully built unison with OCaml 4.08.1 on Mojave a few weeks ago. > > At first, I hit the same error as you though (linker can?t find the bigarray library). I assumed it was a problem with my OCaml installation and worked around it by creating a symlink: > > $ cd /usr/local/lib/ocaml > $ ln -s bigarray.a libbigarray.a > > Best, > Jakob > > >> On 03.12.2019, at 15:31, Benjamin C. Pierce wrote: >> >> Has anyone been able to compile the GUI version of unison with OCaml 4.08? I get this (on both Catalina and Mohave): >> >> ? >> Ld /Users/bcpierce/home1/unison/src/uimac/build/Default/Unison.app/Contents/MacOS/Unison normal x86_64 (in target 'uimac' from project 'uimacnew') >> cd /Users/bcpierce/home1/unison/src/uimac >> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -L/Users/bcpierce/home1/unison/src/uimac/build/Default -F/Users/bcpierce/home1/unison/src/uimac/build/Default -filelist /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison.LinkFileList -Xlinker -object_path_lto -Xlinker /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison_lto.o -fobjc-link-runtime -L/Users/bcpierce/.opam/default/lib/ocaml -lunix -lthreadsnat -lcamlstr -lbigarray -lasmrun -framework Cocoa -framework Security -framework ExceptionHandling -Xlinker -dependency_info -Xlinker /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison_dependency_info.dat -o /Users/bcpierce/home1/unison/src/uimac/build/Default/Unison.app/Contents/MacOS/Unison >> ld: library not found for -lbigarray >> clang: error: linker command failed with exit code 1 (use -v to see invocation) >> >> ** BUILD FAILED ** >> >> Any idea what?s wrong here? (The text UI builds fine.) >> >> Thanks! >> >> - Benjamin >> >> _______________________________________________ >> Unison-hackers mailing list >> Unison-hackers at LISTS.SEAS.UPENN.EDU >> https://LISTS.SEAS.UPENN.EDU/mailman/listinfo/unison-hackers > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at LISTS.SEAS.UPENN.EDU > https://LISTS.SEAS.UPENN.EDU/mailman/listinfo/unison-hackers > From frederik at ofb.net Wed Dec 4 02:42:54 2019 From: frederik at ofb.net (frederik at ofb.net) Date: Tue, 3 Dec 2019 23:42:54 -0800 Subject: [Unison-hackers] bundling with OCaml (was: Compiling Unison with OCaml 4.08) In-Reply-To: <6640ED80-465A-4EAA-9DAA-70B0815CB5A4@cis.upenn.edu> References: <28D45F64-42C3-4DAC-970B-4D5C1BB9E971@cis.upenn.edu> <4DE95E73-56D9-4419-9DD3-8AF2A1DAA74B@jakobrath.eu> <6640ED80-465A-4EAA-9DAA-70B0815CB5A4@cis.upenn.edu> Message-ID: <20191204074254.hmhrasq3ieplvyxf@localhost> I have been trying to use Unison recently but I realized that I need to not only build Unison from the same source on all my machines, but OCaml as well, since the Unison protocol requires the same version of OCaml on both ends. Given this constraint, I wonder if anyone has considered bundling a working version of OCaml with Unison, so that they can be built together and installed locally. It looks like OCaml is about 33MB, vs 4MB for Unison. This is somewhat awkward, but bundling them could perhaps be done efficiently using Git modules? On Tue, Dec 03, 2019 at 11:20:40AM -0500, Benjamin C. Pierce wrote: >That worked for me too ? thank you very much for the quick help! > > - Benjamin > >> On Dec 3, 2019, at 10:50 AM, Jakob Rath wrote: >> >> Hi, >> >> I successfully built unison with OCaml 4.08.1 on Mojave a few weeks ago. >> >> At first, I hit the same error as you though (linker can?t find the bigarray library). I assumed it was a problem with my OCaml installation and worked around it by creating a symlink: >> >> $ cd /usr/local/lib/ocaml >> $ ln -s bigarray.a libbigarray.a >> >> Best, >> Jakob >> >> >>> On 03.12.2019, at 15:31, Benjamin C. Pierce wrote: >>> >>> Has anyone been able to compile the GUI version of unison with OCaml 4.08? I get this (on both Catalina and Mohave): >>> >>> ? >>> Ld /Users/bcpierce/home1/unison/src/uimac/build/Default/Unison.app/Contents/MacOS/Unison normal x86_64 (in target 'uimac' from project 'uimacnew') >>> cd /Users/bcpierce/home1/unison/src/uimac >>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -L/Users/bcpierce/home1/unison/src/uimac/build/Default -F/Users/bcpierce/home1/unison/src/uimac/build/Default -filelist /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison.LinkFileList -Xlinker -object_path_lto -Xlinker /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison_lto.o -fobjc-link-runtime -L/Users/bcpierce/.opam/default/lib/ocaml -lunix -lthreadsnat -lcamlstr -lbigarray -lasmrun -framework Cocoa -framework Security -framework ExceptionHandling -Xlinker -dependency_info -Xlinker /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison_dependency_info.dat -o /Users/bcpierce/home1/unison/src/uimac/build/Default/Unison.app/Contents/MacOS/Unison >>> ld: library not found for -lbigarray >>> clang: error: linker command failed with exit code 1 (use -v to see invocation) >>> >>> ** BUILD FAILED ** >>> >>> Any idea what?s wrong here? (The text UI builds fine.) >>> >>> Thanks! >>> >>> - Benjamin >>> >>> _______________________________________________ >>> Unison-hackers mailing list >>> Unison-hackers at LISTS.SEAS.UPENN.EDU >>> https://LISTS.SEAS.UPENN.EDU/mailman/listinfo/unison-hackers >> >> _______________________________________________ >> Unison-hackers mailing list >> Unison-hackers at LISTS.SEAS.UPENN.EDU >> https://LISTS.SEAS.UPENN.EDU/mailman/listinfo/unison-hackers >> > >_______________________________________________ >Unison-hackers mailing list >Unison-hackers at LISTS.SEAS.UPENN.EDU >https://LISTS.SEAS.UPENN.EDU/mailman/listinfo/unison-hackers From frederik at ofb.net Wed Dec 4 06:03:04 2019 From: frederik at ofb.net (frederik at ofb.net) Date: Wed, 4 Dec 2019 03:03:04 -0800 Subject: [Unison-hackers] bundling with OCaml (was: Compiling Unison with OCaml 4.08) In-Reply-To: <20191204074254.hmhrasq3ieplvyxf@localhost> References: <28D45F64-42C3-4DAC-970B-4D5C1BB9E971@cis.upenn.edu> <4DE95E73-56D9-4419-9DD3-8AF2A1DAA74B@jakobrath.eu> <6640ED80-465A-4EAA-9DAA-70B0815CB5A4@cis.upenn.edu> <20191204074254.hmhrasq3ieplvyxf@localhost> Message-ID: <20191204110304.rhdpicg2nj2capgt@localhost> Just as an addendum to my previous message, for example, when I build OCaml 4.05.0 (or 4.02, or 4.07, etc.) on Arch, I get an error about "Error: Could not find the .cmi file for interface /home/frederik/packages/ocaml/bytecomp/opcodes.mli". If I use the patched OCaml source from a distro such as Arch or Raspbian Buster, then it builds properly but building Unison 2.48.15v2 (or 2.48.4, or the latest master from https://github.com/bcpierce00/unison.git) fails with various errors such as: ocamlopt -g -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I fsmonitor/windows -I system/generic -I lwt/generic -c /home/frederik/packages/unison/src/fsmonitor/linux/inotify.ml File "/home/frederik/packages/unison/src/fsmonitor/linux/inotify.ml", line 98, characters 27-30: 98 | let toread = Unix.read fd buf 0 toread in ^^^ Error: This expression has type string but an expression was expected of type bytes make[1]: *** [Makefile.OCaml:435: fsmonitor/linux/inotify.cmx] Error 2 This error happens with both OCaml 4.05.0 from Raspbian Buster, or 4.02.3 from the Arch git repo history. Hence it would be useful to know which versions of Unison and OCaml are known to work together. The log entry for 2.48.15v2 just says "fix to compile with newer caml", although the source diff mentions 4.02. By the way, "fsmonitor" looks like code for a (possibly very useful) feature that I never make use of, so if an older version of Unison/OCaml was more stable then I would be happy to go back to it. Older versions of Unison all seem to fail with the following error: ocamlc -o src/mkProjectInfo src/mkProjectInfo.ml src/mkProjectInfo > src/Makefile.ProjectInfo Fatal error: exception Scanf.Scan_failure("scanf: bad input at char number 4: "looking for ':', found '$'"") I would like to have both Unison and OCaml installed in my home directory rather than /usr or /usr/local, so that I don't have to worry about things breaking when I do a distribution upgrade. I've been assuming that I can put OCaml in e.g. "-prefix ~/ocamlbuild" and then point the Unison build system there by setting "export PATH=$HOME/ocamlbuild/bin/:$PATH" - please let me know if that is not sufficient. Thanks in advance, Frederick On Tue, Dec 03, 2019 at 11:42:54PM -0800, frederik at ofb.net wrote: >I have been trying to use Unison recently but I realized that I need to not only build Unison from the same source on all my machines, but OCaml as well, since the Unison protocol requires the same version of OCaml on both ends. Given this constraint, I wonder if anyone has considered bundling a working version of OCaml with Unison, so that they can be built together and installed locally. > >It looks like OCaml is about 33MB, vs 4MB for Unison. This is somewhat awkward, but bundling them could perhaps be done efficiently using Git modules? > >On Tue, Dec 03, 2019 at 11:20:40AM -0500, Benjamin C. Pierce wrote: >>That worked for me too ? thank you very much for the quick help! >> >> - Benjamin >> >>>On Dec 3, 2019, at 10:50 AM, Jakob Rath wrote: >>> >>>Hi, >>> >>>I successfully built unison with OCaml 4.08.1 on Mojave a few weeks ago. >>> >>>At first, I hit the same error as you though (linker can?t find the bigarray library). I assumed it was a problem with my OCaml installation and worked around it by creating a symlink: >>> >>>$ cd /usr/local/lib/ocaml >>>$ ln -s bigarray.a libbigarray.a >>> >>>Best, >>>Jakob >>> >>> >>>>On 03.12.2019, at 15:31, Benjamin C. Pierce wrote: >>>> >>>>Has anyone been able to compile the GUI version of unison with OCaml 4.08? I get this (on both Catalina and Mohave): >>>> >>>>? >>>>Ld /Users/bcpierce/home1/unison/src/uimac/build/Default/Unison.app/Contents/MacOS/Unison normal x86_64 (in target 'uimac' from project 'uimacnew') >>>> cd /Users/bcpierce/home1/unison/src/uimac >>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target x86_64-apple-macos10.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -L/Users/bcpierce/home1/unison/src/uimac/build/Default -F/Users/bcpierce/home1/unison/src/uimac/build/Default -filelist /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison.LinkFileList -Xlinker -object_path_lto -Xlinker /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison_lto.o -fobjc-link-runtime -L/Users/bcpierce/.opam/default/lib/ocaml -lunix -lthreadsnat -lcamlstr -lbigarray -lasmrun -framework Cocoa -framework Security -framework ExceptionHandling -Xlinker -dependency_info -Xlinker /Users/bcpierce/home1/unison/src/uimac/build/uimacnew.build/Default/uimac.build/Objects-normal/x86_64/Unison_dependency_info.dat -o /Users/bcpierce/home1/unison/src/uimac/build/Default/Unison.app/Contents/MacOS/Unison >>>>ld: library not found for -lbigarray >>>>clang: error: linker command failed with exit code 1 (use -v to see invocation) >>>> >>>>** BUILD FAILED ** >>>> >>>>Any idea what?s wrong here? (The text UI builds fine.) >>>> >>>>Thanks! >>>> >>>> - Benjamin >>>> >>>>_______________________________________________ >>>>Unison-hackers mailing list >>>>Unison-hackers at LISTS.SEAS.UPENN.EDU >>>>https://LISTS.SEAS.UPENN.EDU/mailman/listinfo/unison-hackers >>> >>>_______________________________________________ >>>Unison-hackers mailing list >>>Unison-hackers at LISTS.SEAS.UPENN.EDU >>>https://LISTS.SEAS.UPENN.EDU/mailman/listinfo/unison-hackers >>> >> >>_______________________________________________ >>Unison-hackers mailing list >>Unison-hackers at LISTS.SEAS.UPENN.EDU >>https://LISTS.SEAS.UPENN.EDU/mailman/listinfo/unison-hackers >_______________________________________________ >Unison-hackers mailing list >Unison-hackers at LISTS.SEAS.UPENN.EDU >https://LISTS.SEAS.UPENN.EDU/mailman/listinfo/unison-hackers From frederik at ofb.net Mon Dec 16 17:15:34 2019 From: frederik at ofb.net (frederik at ofb.net) Date: Mon, 16 Dec 2019 14:15:34 -0800 Subject: [Unison-hackers] confusing UI results in unintended data loss Message-ID: <20191216221534.wu3poydzumk2j2nn@localhost> Dear Unison hackers, I think I've mentioned this before, but often when using Unison I want to take a break from answering questions and just reconcile the changes that I've selected. For example in the following interaction new file <==== new file R/Makeconf [f] < new file <-?-> new file asound.conf [] s Proceed with propagating updates? [] y I selected that R/Makeconf should be propagated in one direction. Then I perused the increasingly longer list of commands and found one that looks appropriate: s stop reconciling and go to the proceed menu I'm not sure what the "proceed menu" is, but since I selected only one update I'm pretty sure that only one thing is going to happen when I "stop reconciling" and allow Unison to "proceed". However, when I hit "s" and "y" then Unison proceeds to copy a whole bunch of stuff that I didn't ask for, and I have to Ctrl-C, which doesn't even do anything, so then I have to Ctrl-Z Ctrl-C, but meanwhile a lot of files have been copied, generally making a mess that I have to spend time cleaning up. Here's a fuller summary: http://ix.io/24Dn By contrast, if I hit "/" at every prompt, to skip to the next item, then nothing is propagated. My questions: Is my use case somehow unusual? Where did I go wrong? Or is it OK for all users to have an experience like this when learning how to use your program? And what exactly does 's' do, and why doesn't it have a more accurate description in the UI? Thanks, Frederick