Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can install manually, but not with recipe #2828

Open
lispstudent opened this issue Mar 20, 2021 · 3 comments
Open

Can install manually, but not with recipe #2828

lispstudent opened this issue Mar 20, 2021 · 3 comments

Comments

@lispstudent
Copy link
Contributor

lispstudent commented Mar 20, 2021

I am able to use complex recipes, like org-mode.

But with some, I am experiencing the following behavior (as an example, 'bbdb'):

Executing this:

(defconst el-get-sources
  '((:name bbdb)))
(el-get 'sync (mapcar #'el-get-source-name el-get-sources))

I get error:

'.' is not recognized as an internal or external command,
operable program or batch file.

And see this in the backtrace:

Debugger entered--Lisp error: (error "el-get: ./autogen.sh el-get could not build bbdb [./autogen.sh]")
  signal(error ("el-get: ./autogen.sh el-get could not build bbdb [./autogen.sh]"))
  error("el-get: %s %s" "./autogen.sh" "el-get could not build bbdb [./autogen.sh]")
[...]

But if I run this elisp snippet, autogen.sh and ./configure run just fine:

(let
    ((default-directory  "c:/home/.config/emacs/el-get/bbdb/"))
  (shell-command "./autogen.sh")
  (shell-command "./configure" ))

This is with latest el-get on Emacs 27.1 running from Windows 10 with MSYS2 as shell.

(setq explicit-shell-file-name "C:/msys64/usr/bin/sh.exe")
(setq shell-file-name "sh.exe")

Could somebody please give me some pointers on how to fix this?

@lispstudent
Copy link
Contributor Author

It seems Emacs can find the shell and all the commands, including make, etc, but not if executed directly.

I also tried @npostavs suggestion given here, to no avail.

In my case,

(add-to-list 'exec-path "c:/msys64/usr/bin")
(setenv "PATH" (mapconcat #'identity exec-path path-separator))

@lispstudent
Copy link
Contributor Author

I was able to have BBDB recipe work within Windows + MSYS2 by adding this line to it:

:build/windows-nt (("sh" "autogen.sh") ("sh" "configure") ("make"))

The whole recipe would be:

    (:name bbdb
	   :website "http://bbdb.sourceforge.net/"
	   :description "The Insidious Big Brother Database (BBDB) is a contact management utility."
	   :type git
	   :url "https://git.savannah.nongnu.org/git/bbdb.git"
	   :load-path ("./lisp")
	   ;; if using vm, add `--with-vm-dir=DIR' after ./configure
	   :build `(("./autogen.sh") ("./configure") ("make"))
	   :build/windows-nt (("sh" "autogen.sh") ("sh" "configure") ("make"))
	   :features bbdb-loaddefs
	   :autoloads nil
	   :info "doc")

Would this be the canonical way to fix such issues?

Would it be fine to submit PRs for such cases?

lispstudent added a commit to lispstudent/el-get that referenced this issue Mar 21, 2021
@lispstudent
Copy link
Contributor Author

Thanks for merging! 👍

tarao pushed a commit to tarao/el-get that referenced this issue Jun 5, 2021
alexg0 pushed a commit to alexg0/el-get that referenced this issue Aug 18, 2021
akopytov pushed a commit to akopytov/el-get that referenced this issue Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant