[Unison-hackers] bundling with OCaml (was: Compiling Unison with OCaml 4.08)

frederik at ofb.net frederik at ofb.net
Wed Dec 4 02:42:54 EST 2019


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 <mail at jakobrath.eu> 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 <bcpierce at cis.upenn.edu> 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


More information about the Unison-hackers mailing list