From: Andrew Schulman <schulman.andrew@epa.gov>
To: cygwin-apps@cygwin.com
Subject: how to use opam for package builds?
Date: Wed, 29 Aug 2018 15:47:00 -0000 [thread overview]
Message-ID: <u0fdod12ro28bnc29e5590gun6c4n0od0v@4ax.com> (raw)
orpie recently changed to an opam-based build system. So I want to use opam
to update it for Cygwin, but I've never used opam before and I have some
questions about how to use it.
The orpie build instructions say just to run "opam install orpie". When I
do that, opam complains that I haven't set it up yet:
$ opam install orpie
[ERROR] No OPAM root found at /home/andrew/.opam.
Please run 'opam init' to initialize the state of OPAM, or
specify '--root'.
See 'opam init --help' for details.
Now for packaging, what's the right thing to do here? For example I could
create the following install function for Cygport:
src_install()
{
opam init
opam install orpie
}
But this has two problems:
(1) I can't get "opam init" to complete. It hangs after "synchronized from
https://opam.ocaml.org", until I interrupt it:
$ opam init
Checking for available remotes: rsync and local, git, mercurial.
- you won't be able to use darcs repositories unless you install the
darcs command on your system.
[WARNING] Recommended external solver aspcud not found.
=-=- Fetching repository information
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default] synchronized from https://opam.ocaml.org
### hangs here until I hit ctrl-C: ###
[ERROR] Initialisation failed
User interruption
# opam-version 1.2.2
# os cygwin
Cannot remove /home/andrew/.opam (error 255).
(2) Even if I get this to work, I don't think it's the right thing to do
because it's setting up persistent opam configuration in my home directory,
which I don't think is the right place for packaging. Should there be some
global opam configuration, that all packaging scripts that rely on opam
would use? If so, where should that go?
Tnanks,
Andrew
next reply other threads:[~2018-08-29 15:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 15:47 Andrew Schulman [this message]
2018-08-29 17:19 ` Andy Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u0fdod12ro28bnc29e5590gun6c4n0od0v@4ax.com \
--to=schulman.andrew@epa.gov \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).