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

emacs compile error #295

Closed
opoplawski opened this Issue Apr 22, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@opoplawski

opoplawski commented Apr 22, 2015

Building protobuf 2.4.1 with emacs 24.4 and 24.5:

+ emacs -batch -f batch-byte-compile editors/protobuf-mode.el
Eval error in the `c-lang-defconst' for `c-regular-keywords-regexp' in protobuf-mode:
Eval error in the `c-lang-defconst' for `c-basic-matchers-before' in protobuf-mode:
Eval error in the `c-lang-defconst' for `c-matchers-2' in protobuf-mode:
In toplevel form:
editors/protobuf-mode.el:165:1:Error: Symbol's function definition is void: set-difference

You can see some discussion of the issue here: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18845
That discussion assumed that the issue would be fixed in 24.5, but that does not appear to be the case. I'm currently using:

--- protobuf-2.5.0/editors/protobuf-mode.el
+++ protobuf-2.5.0/editors/protobuf-mode.el
@@ -66,6 +66,10 @@
 (require 'cc-mode)

 (eval-when-compile
+  (and (= emacs-major-version 24)
+       (>= emacs-minor-version 4)
+       (null emacs-repository-version)
+       (require 'cl))
   (require 'cc-langs)
   (require 'cc-fonts))

@xfxyjwf xfxyjwf added the tooling label Jan 20, 2016

@hotpxl

This comment has been minimized.

Show comment
Hide comment
@hotpxl

hotpxl Aug 4, 2016

Contributor

I'm having the same issue. Please add (require 'cl) to the top of protobuf-mode.el.

Thanks.

Contributor

hotpxl commented Aug 4, 2016

I'm having the same issue. Please add (require 'cl) to the top of protobuf-mode.el.

Thanks.

@xfxyjwf

This comment has been minimized.

Show comment
Hide comment
@xfxyjwf

xfxyjwf Aug 4, 2016

Contributor

Can you help send a pull request to update the file?

Contributor

xfxyjwf commented Aug 4, 2016

Can you help send a pull request to update the file?

hotpxl added a commit to hotpxl/protobuf that referenced this issue Aug 5, 2016

@hotpxl

This comment has been minimized.

Show comment
Hide comment
@hotpxl

hotpxl Aug 5, 2016

Contributor

PR #1926 submitted. Thanks!

Contributor

hotpxl commented Aug 5, 2016

PR #1926 submitted. Thanks!

@xfxyjwf xfxyjwf closed this in ddf6d1e Aug 5, 2016

xfxyjwf added a commit that referenced this issue Aug 5, 2016

Merge pull request #1926 from hotpxl/master
[master] Add dependency cl. Fixes #295.

tarsius pushed a commit to emacsmirror/protobuf-mode that referenced this issue Aug 12, 2016

phst added a commit to phst/protobuf that referenced this issue May 18, 2017

Improve fix for protocolbuffers#295
Requiring the legacy ‘cl’ library unconditionally pollutes the namespace.
Instead, require it only when compiling and in known-broken versions.

This is the same patch that opoplawski suggested.

phst added a commit to phst/dart-mode that referenced this issue May 18, 2017

Add workaround for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18845
I’ve unfortunately removed a similar workaround in
bradyt@bd08208.
This is the same workaround as suggested for
protocolbuffers/protobuf#295 by @opoplawski.

nex3 added a commit to bradyt/dart-mode that referenced this issue May 18, 2017

Add workaround for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=18845 (
#40)

I’ve unfortunately removed a similar workaround in
bd08208.
This is the same workaround as suggested for
protocolbuffers/protobuf#295 by @opoplawski.

phst added a commit to phst/protobuf that referenced this issue May 23, 2017

Improve fix for protocolbuffers#295
Requiring the legacy ‘cl’ library unconditionally pollutes the namespace.
Instead, require it only when compiling and in known-broken versions.

This is almost the same patch that opoplawski suggested, except that I removed
the test for ‘emacs-repository-version’, which isn’t defined in Emacs 24.3.

acozzette added a commit that referenced this issue May 26, 2017

tarsius pushed a commit to emacsmirror/protobuf-mode that referenced this issue Jun 13, 2017

Improve fix for protocolbuffers/protobuf#295
Requiring the legacy ‘cl’ library unconditionally pollutes the namespace.
Instead, require it only when compiling and in known-broken versions.

This is almost the same patch that opoplawski suggested, except that I removed
the test for ‘emacs-repository-version’, which isn’t defined in Emacs 24.3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment