* How to build nongnu packages locally?
@ 2023-06-23 3:25 Ruijie Yu via Emacs development discussions.
2023-06-30 22:38 ` Stefan Monnier via Emacs development discussions.
0 siblings, 1 reply; 2+ messages in thread
From: Ruijie Yu via Emacs development discussions. @ 2023-06-23 3:25 UTC (permalink / raw)
To: emacs-devel
Hello,
I'm having trouble building nongnu packages locally. In particular, the
packages which depend on GNU Elpa packages. This is what I did:
$ git clone savannah/nongnu.git --depth=1 --single-branch
$ cd nongnu
$ make
$ make fetch/magit # magit depends on compat in GNU Elpa
$ make packages/magit # this sets up the worktree
$ make packages/magit # building magit fails
The error message:
--8<---------------cut here---------------start------------->8---
Byte compiling packages/magit/lisp/git-commit.el
Unable to activate package ‘magit’.
Required package ‘compat-29.1.3.4’ is unavailable
In toplevel form:
packages/magit/lisp/git-commit.el:120:2: Error: Cannot open load file: No such file or directory, compat
make: *** [GNUmakefile:119: packages/magit/lisp/git-commit.elc] Error 1
--8<---------------cut here---------------end--------------->8---
Note that both git-commit.el (the current file) and magit.el (the main
file) contain dependency headers like such:
--8<---------------cut here---------------start------------->8---
;; Package-Requires: (
;; (emacs "25.1")
;; (compat "29.1.3.4")
;; (transient "0.3.6")
;; (with-editor "3.0.5"))
--8<---------------cut here---------------end--------------->8---
What am I missing? Any hints appreciated.
The reason I want to build nongnu packages locally is because I am
trying to set up a local Elpa repository (which may depend on packages
on GNU or nongnu Elpa), and realized that it was unable to take
dependencies from either, so I wanted to take inspiration from nongnu
and see how it takes depencency from GNU Elpa.
PS: While testing it before sending the mail, I noticed that make does
not error out if the fetch operation fails due to network issues.
Please let me know if I should send this separately, and where I should
send it (here or bug list?).
PS 2: I noticed that the initial "make" (pulling the elpa-admin branch
of elpa.git) took some time to finish in my network environment. Is
there interest in implementing a shallow fetch, using something like
--shallow-since, etc., when make receives a "shallow-since=..." param?
Again, if this belongs to a new thread, let me know.
Thanks.
--
Best,
RY
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to build nongnu packages locally?
2023-06-23 3:25 How to build nongnu packages locally? Ruijie Yu via Emacs development discussions.
@ 2023-06-30 22:38 ` Stefan Monnier via Emacs development discussions.
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier via Emacs development discussions. @ 2023-06-30 22:38 UTC (permalink / raw)
To: emacs-devel
> I'm having trouble building nongnu packages locally. In particular, the
> packages which depend on GNU Elpa packages. This is what I did:
>
> $ git clone savannah/nongnu.git --depth=1 --single-branch
> $ cd nongnu
> $ make
> $ make fetch/magit # magit depends on compat in GNU Elpa
> $ make packages/magit # this sets up the worktree
> $ make packages/magit # building magit fails
>
> The error message:
>
> --8<---------------cut here---------------start------------->8---
> Byte compiling packages/magit/lisp/git-commit.el
> Unable to activate package ‘magit’.
> Required package ‘compat-29.1.3.4’ is unavailable
>
> In toplevel form:
> packages/magit/lisp/git-commit.el:120:2: Error: Cannot open load file: No
> such file or directory, compat
> make: *** [GNUmakefile:119: packages/magit/lisp/git-commit.elc] Error 1
> --8<---------------cut here---------------end--------------->8---
Here's how I do it:
I have clone of both `elpa.git` and `nongnu.git` (in respectively
`elpa` and `nongnu` directories). Then inside the `nongnu` directory,
next to the `packages` subdirectory, you need to add a symlink called
`other-packages` to the `.../elpa/packages` directory.
And the reverse is true as well to build some GNU ELPA packages since
GNU ELPA packages can also depend on NonGNU ELPA packages.
> The reason I want to build nongnu packages locally is because I am
> trying to set up a local Elpa repository (which may depend on packages
> on GNU or nongnu Elpa), and realized that it was unable to take
> dependencies from either, so I wanted to take inspiration from nongnu
> and see how it takes depencency from GNU Elpa.
The `other-packages` symlink is a hack which sadly doesn't extend
trivially to the case where you have more than 2 "repositories".
Patches to `elpa-admin` welcome to replace this hack with something
cleaner that can accommodate more use cases.
> PS: While testing it before sending the mail, I noticed that make does
> not error out if the fetch operation fails due to network issues.
> Please let me know if I should send this separately, and where I should
> send it (here or bug list?).
You can make a bug report, but make sure you keep me in the X-Debbugs-Cc.
> PS 2: I noticed that the initial "make" (pulling the elpa-admin branch
> of elpa.git) took some time to finish in my network environment. Is
> there interest in implementing a shallow fetch, using something like
> --shallow-since, etc., when make receives a "shallow-since=..." param?
That's weird. It should be quite quick, normally.
What URL did you use?
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-30 22:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-23 3:25 How to build nongnu packages locally? Ruijie Yu via Emacs development discussions.
2023-06-30 22:38 ` Stefan Monnier via Emacs development discussions.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.