all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Wrapping an Emacs dynamic module in a package
Date: Mon, 17 Oct 2016 12:02:05 +0300	[thread overview]
Message-ID: <831szfz6uq.fsf@gnu.org> (raw)
In-Reply-To: <CAFytq+nFwaeYHaEG6OxDiUFrPCK5oJgxNm-kLZZtpNvb-d38Hg@mail.gmail.com> (message from Joris Vankerschaver on Mon, 17 Oct 2016 09:34:25 +0100)

> From: Joris Vankerschaver <joris.vankerschaver@gmail.com>
> Date: Mon, 17 Oct 2016 09:34:25 +0100
> Cc: help-gnu-emacs@gnu.org
> 
> 1) I wrote an emacs module _mymod.so, as well as wrappers mymod.el (with
> some local setup) and mymod-pkg.el (which only has a call to
> define-package).
> 
> 2) I tarred these together to form mymod-0.1.tar
> 
> 3) I installed the resulting package using M-x package-install-file
> 
> In my messages buffer, I see that Emacs tries to generate autoloads for the
> .so, and fails with the error indicated in the original email ("_mymod.so:0:0:
> error: scan-error: (Containing expression ends prematurely 238020
> 238021))").
> 
> I'm pretty confident that the emacs module is correctly built (I can load
> it, and run the functions in it). Also, if I rename _mymod.so to something
> else, e.g. _mymod.blablabla, the rest of the package installs correctly and
> can be loaded. So it really seems as if Emacs is choking on trying to
> generate autoloads for _mymod.so.
> 
> Maybe backtracking a little bit:
> 
> 1) Should Emacs be able to generate autoloads for an .so?

No, I don't think so.  I think you should have these autoloads in the
Lisp part of your package.

So I suggest to review your definition of the package that package.el
uses to decide which files to scan for autoloads, and perhaps change
it to not imply that _mymod.so should be scanned.

Caveat: I have never prepared any package using the package.el
infrastructure, so I could be wrong in what I write above.  Or it
could be a bug in package.el, in which case I suggest to report it,
including all the details, using "M-x report-emacs-bug RET".

Thanks.



  reply	other threads:[~2016-10-17  9:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-16 17:37 Wrapping an Emacs dynamic module in a package Joris Vankerschaver
2016-10-17  5:51 ` Eli Zaretskii
2016-10-17  8:34   ` Joris Vankerschaver
2016-10-17  9:02     ` Eli Zaretskii [this message]
2016-10-17 13:27     ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2016-10-18  7:31 Joris Vankerschaver
2016-10-18 13:08 ` Stefan Monnier

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=831szfz6uq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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.