Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 461370

Summary: app-editors/emacs-24.3_rc3 USE=kerberos - .../work/emacs-24.3/lib-src/pop.c:1201:43: error: ‘ERRMAX’ undeclared (first use in this function)
Product: Gentoo Linux Reporter: Martin von Gagern <Martin.vGagern>
Component: Current packagesAssignee: Emacs project <emacs>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH, REGRESSION
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13925
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Change ERRMAX to ERROR_MAX

Description Martin von Gagern 2013-03-11 11:00:32 UTC
Emacs fails to build on my system, since it attempts to use an identifier "ERRMAX" which hasn't been declared.

http://bzr.savannah.gnu.org/lh/emacs/emacs-24/revision/109003/lib-src/pop.c#lib-src/pop.c suggests that this should have been "ERROR_MAX" instead.

I reported this issue to the bug-gnu-emacs@… mailing list as well.

x86_64-pc-linux-gnu-gcc -std=gnu99 -c     -I. -I../src -I../lib -I/var/tmp/portage/app-editors/emacs-24.3_rc3/work/emacs-24.3/lib-src -I/var/tmp/portage/app-editors/emacs-24.3_rc3/work/emacs-24.3/lib-src/../src -I/var/tmp/portage/app-editors/emacs-24.3_rc3/work/emacs-24.3/lib-src/../lib   -march=amdfam10 -O2 -ggdb -pipe  /var/tmp/portage/app-editors/emacs-24.3_rc3/work/emacs-24.3/lib-src/pop.c
/var/tmp/portage/app-editors/emacs-24.3_rc3/work/emacs-24.3/lib-src/pop.c: In function ‘socket_connection’:
/var/tmp/portage/app-editors/emacs-24.3_rc3/work/emacs-24.3/lib-src/pop.c:1168:4: warning: implicit declaration of function ‘isupper’ [-Wimplicit-function-declaration]
/var/tmp/portage/app-editors/emacs-24.3_rc3/work/emacs-24.3/lib-src/pop.c:1170:8: warning: implicit declaration of function ‘tolower’ [-Wimplicit-function-declaration]
/var/tmp/portage/app-editors/emacs-24.3_rc3/work/emacs-24.3/lib-src/pop.c:1201:43: error: ‘ERRMAX’ undeclared (first use in this function)
/var/tmp/portage/app-editors/emacs-24.3_rc3/work/emacs-24.3/lib-src/pop.c:1201:43: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [pop.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/app-editors/emacs-24.3_rc3/work/emacs-24.3/lib-src'
make: *** [lib-src] Error 2
 * ERROR: app-editors/emacs-24.3_rc3 failed (compile phase):
 *   emake failed
Comment 1 Martin von Gagern 2013-03-11 11:09:55 UTC
Created attachment 341660 [details, diff]
Change ERRMAX to ERROR_MAX

This patch changes the ERRMAX to ERROR_MAX, in accordance with both the surrounding code and the code in this place before the commit which introduced that ERRMAX. I'm pretty certain that this is the right thing to do.

For end users, until this patch has been included in the portage tree:
Emacs supports epatch_user, so you can simply create a directory
/etc/portage/patches/app-editors/emacs and drop the patch file in there.
Comment 2 Ulrich Müller gentoo-dev 2013-03-11 15:26:11 UTC
Have you reported this upstream?
Comment 3 Ulrich Müller gentoo-dev 2013-03-11 15:34:24 UTC
(In reply to comment #2)
> Have you reported this upstream?

Looks like I haven't read your report properly. Sorry for that.

(In reply to comment #0)
> I reported this issue to the bug-gnu-emacs@… mailing list as well.

Looks like I haven't read your report properly. Sorry for that.

I guess that the problem happens only with heimdal, but not with mit-krb5?
Comment 4 Martin von Gagern 2013-03-11 15:53:35 UTC
(In reply to comment #3)
> I guess that the problem happens only with heimdal, but not with mit-krb5?

Looks that way. There are two possible code paths there, and I'm encountering one when I have heimdal installed. So I guess that one might be specific to heimdal, and the other to mit-krb5.
Comment 5 Ulrich Müller gentoo-dev 2013-03-11 20:01:19 UTC
Fixed without revbump in emacs-24.3:

+  11 Mar 2013; Ulrich Müller <ulm@gentoo.org> emacs-24.3.ebuild:
+  Fix build failure with USE=kerberos and app-crypt/heimdal, bug 461370.
+  Thanks to Martin von Gagern for the patch.
+

Please test.
Comment 6 Martin von Gagern 2013-03-19 22:48:17 UTC
(In reply to comment #5)
> Please test.

Works, thanks.