From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 9677380053 for ; Fri, 4 Nov 2016 12:23:57 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=matthieu.dubuget@gmail.com; spf=Pass smtp.mailfrom=matthieu.dubuget@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f50.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of matthieu.dubuget@gmail.com) identity=pra; client-ip=74.125.82.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="matthieu.dubuget@gmail.com"; x-sender="matthieu.dubuget@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of matthieu.dubuget@gmail.com designates 74.125.82.50 as permitted sender) identity=mailfrom; client-ip=74.125.82.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="matthieu.dubuget@gmail.com"; x-sender="matthieu.dubuget@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wm0-f50.google.com) identity=helo; client-ip=74.125.82.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="matthieu.dubuget@gmail.com"; x-sender="postmaster@mail-wm0-f50.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AGcnmFxO0S9gjBgvtMogl6mtUPXoX/o7sNwtQ0KIM?= =?us-ascii?q?zox0KPv4rarrMEGX3/hxlliBBdydsKMezbqH+Pq+EUU7or+5+EgYd5JNUxJXwe?= =?us-ascii?q?43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkIt?= =?us-ascii?q?f6KuS9SU35X8jb760qaQSj0AvCC6b7J2IUf+hiTqne5Sv7FfLL0swADCuHpCdr?= =?us-ascii?q?ce72ppIVWOg0S0vZ/or9ZVyDlLo/8q6+JHVKz7eex4Ee0ZX3waNDUe7cjv8B3C?= =?us-ascii?q?VhfHsnAVV2FTlhtTHyDE6gv7V9H/qH2pmPB63Xy/NNHqTbE5RHyO8q12RxL0wH?= =?us-ascii?q?MCPiIl8GDal4p8kahGrx+9jxN6yo/QJoqSMawtLevmYdoGSD8ZDY5qXCtbD9bg?= =?us-ascii?q?PoY=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BsAAC8bhxYhjJSfUpdHAEBBAEBCgEBg?= =?us-ascii?q?y4BAQEBAXcqUo04n06LeIIIKIgPPxQBAQEBAQEBAQEBARIBAQEICwsJHTCCMwQ?= =?us-ascii?q?DAxWCKBEdARseAxIQDwImAiURAQUBDgETDQgBAR6IGwEDFwQKn2yCCIEyPzKKJ?= =?us-ascii?q?w2BG4Frgl8Fg2YKGScNVIMnAQsBHAIGEHmFNoF9CIljCy2CXAWIRIYPgT2ENIV?= =?us-ascii?q?fgWuESYoMgjyHKw6GFYhGVoZHMYERHoEQgwoiIIFpcQGGOYE6AQEB?= X-IPAS-Result: =?us-ascii?q?A0BsAAC8bhxYhjJSfUpdHAEBBAEBCgEBgy4BAQEBAXcqUo0?= =?us-ascii?q?4n06LeIIIKIgPPxQBAQEBAQEBAQEBARIBAQEICwsJHTCCMwQDAxWCKBEdARseA?= =?us-ascii?q?xIQDwImAiURAQUBDgETDQgBAR6IGwEDFwQKn2yCCIEyPzKKJw2BG4Frgl8Fg2Y?= =?us-ascii?q?KGScNVIMnAQsBHAIGEHmFNoF9CIljCy2CXAWIRIYPgT2ENIVfgWuESYoMgjyHK?= =?us-ascii?q?w6GFYhGVoZHMYERHoEQgwoiIIFpcQGGOYE6AQEB?= X-IronPort-AV: E=Sophos;i="5.31,443,1473112800"; d="scan'208";a="199220094" Received: from mail-wm0-f50.google.com ([74.125.82.50]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 04 Nov 2016 12:23:56 +0100 Received: by mail-wm0-f50.google.com with SMTP id a197so44235388wmd.0 for ; Fri, 04 Nov 2016 04:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:subject:from:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=hXcIjR1nEWn8LbjMc7/8iLl29/3FUdrEl8S8TeFPypo=; b=n0xGkdnE4S+sb5YataPfNjoDR6sPJfcbWlHPQDkPM3xlhtd70UuS90Mlge+9tCDkrn mz3PDUpotQOR/gGzxvORk8i+j6z4eCBZzl+MUuWJwpbe0rNM2hWR04fdA4VU18WWZJj0 eoocHqd9NinEdgzmPSjeIFYXekQf95bf2fjoA9koxi28QnRAtNr3Ntt/RKX4iYERxcFG NsjuD8FwzXEsY7L90y/x17fM88DDN+PH3fdSaMUTjIVhL88BDATg4t1hrRGxImqG9rbr +9UComVj6Exidk0N4Lqr1moM6hhtANsOj25PjOmPGm5jkBA6yxvytBtSgayUEg4tn5yI K+MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:from:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=hXcIjR1nEWn8LbjMc7/8iLl29/3FUdrEl8S8TeFPypo=; b=Aw6PvkNuwSL0j8sjAjZg+niN05FZtsUd4Ww0djvc5Xp2e/dv/S4HbZ0jzM5UJlhm/T O7xADuVi4dO8kh0N4DbhLBSToihwbBkuwvZD63+0gKr7XRAvYVRTDBZizURyYDRujRiJ QfjvgiWcqVQZV7M1IeK3ExEDwBLcL5WM7yQ12ByxFQZnSNPIEHDLcfRjXLmPGFjRUOKl XKE/7Z7kV85WTEgMatoUJQppx5r984KSFFEIMA+NEB0HSgixm5iVp0/AnvnO49NwEPFt SBMXgcbdoCBdVgtwsTRZJBzzuzOp+2ujwaUsr4KxCQ85ZYW9/dFbir7kbWgWhAlMiKPw yABQ== X-Gm-Message-State: ABUngve+qsFRfhZnOT3hkO21y4ZPVS4J9LC5SDQUXH4/70KCgeKQeo4a1Hp/dQ9sYcMhdA== X-Received: by 10.28.209.67 with SMTP id i64mr3248757wmg.48.1478258635975; Fri, 04 Nov 2016 04:23:55 -0700 (PDT) Received: from [172.17.1.60] (papillon.metalscan.fr. [178.22.148.54]) by smtp.gmail.com with ESMTPSA id 1sm4050210wmk.22.2016.11.04.04.23.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Nov 2016 04:23:55 -0700 (PDT) To: Caml-list From: Matthieu Dubuget Message-ID: Date: Fri, 4 Nov 2016 12:23:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: [Caml-list] Mingw OCaml + emacs + tuareg on windows Hello, I'm trying to install a "OCaml" windows workstation, but have some trouble to get everything working together. By "everything", I mean emacs, tuareg, merlin, and utop. I'd be glad for some advice. Here is what I tried. I used a "Windows 7 Enterprise" computer. I first installed cygwin with the following powershell script: ```powershell function Download-File { param ([string]$url, [string]$file) Write-Output "Downloading `'$url`' to `'$file`'" $downloader = new-object System.Net.WebClient $downloader.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials; $downloader.DownloadFile($url, $file) } function Ensure-Tempdir { if ($env:TEMP -eq $null) { $env:TEMP = Join-Path $env:SystemDrive 'temp' } if (![System.IO.Directory]::Exists($env:TEMP)) { [System.IO.Directory]::CreateDirectory($env:TEMP) } } Ensure-Tempdir $cygwinSetupFile = Join-Path $env:TEMP "setup-x86.exe" Download-File "http://cygwin.com/setup-x86.exe" $cygwinSetupFile $PACKAGES="-P mingw64-i686-binutils,mingw64-i686-gcc-core,mingw64-i686-gcc-g++,mingw64-i686-runtime -P autoconf,make,diffutils,patch,dos2unix,m4 -P p7zip,unzip,zip -P git,emacs-w32,wget,cpio -P libncurses-devel,ncurses -P mingw64-i686-pkg-config,mingw64-i686-libffi -P curl" Start-Process -Wait $cygwinSetupFile -ArgumentList "-qnNdO -R `"c:/cygwin`" -s `"http://cygwin.uib.no`" $PACKAGES" ``` I then installed opam, ocaml and some tools from the cygwin shell: ```bash OPAM32="opam32.tar.xz" [ -e ${OPAM32} ] || curl -Lo ${OPAM32} https://dl.dropboxusercontent.com/s/eo4igttab8ipyle/${OPAM32} tar xaf ${OPAM32} bash opam32/install.sh opam init --comp 4.03.0+mingw32c --switch 4.03.0+mingw32c -a mingw "https://github.com/fdopen/opam-repository-mingw.git" opam install tuareg utop merlin ``` Until this point, I would say that things seems to work as expected. Including `utop` which works fine when started from a real terminal. My main goal is to have a full emacs-based IDE: ideally, `utop`, `merlin` and `tuareg` would work in emacs. Since I'm using emacs-w32 package from cygwin, I downloaded https://www.emacswiki.org/emacs/download/cygwin-mount.el and https://www.emacswiki.org/emacs/download/windows-path.el. I put them in `~/.emacs.d/` and added ```lisp (require 'cygwin-mount "~/.emacs.d/cygwin-mount.el") (require 'windows-path "~/.emacs.d/windows-path.el") (windows-path-activate) ``` in `~/.emacs`. To enable tuareg in emacs, I appended in `~/.emacs`: ```lisp ( let ((opam-share (ignore-errors (car (process-lines "opam" "config" "var" "share"))))) (when (and opam-share (file-directory-p opam-share)) (add-to-list 'load-path (expand-file-name "emacs/site-lisp" opam-share)) (load "tuareg-site-file") ) ) ``` So far. So good. Trying to add utop is a failure. I modified the above code-fragment in `~/.emacs` like this: ```lisp ( let ((opam-share (ignore-errors (car (process-lines "opam" "config" "var" "share"))))) (when (and opam-share (file-directory-p opam-share)) (add-to-list 'load-path (expand-file-name "emacs/site-lisp" opam-share)) (load "tuareg-site-file") (load "utop") ) ) ``` First problem. I can start `utop` with `M-x utop`. But it fails on the first input: ``` Welcome to utop version 1.19.3 (using OCaml version 4.03.0)! utop.exe: lambda-term(history): failed to lock file 'C:\cygwin\home\vagrant\.utop-history': A requested file lock operation cannot be processed due to an invalid byte range. utop[0]> let x = 1;; Process utop exited with code 2 ``` Any idea how I could solve this before jumping to merlin configuration? -- Matthieu Dubuget