all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#14644: emacsclient.c fails to compile
@ 2013-06-17 16:54 Stefan Monnier
  2013-06-18  7:59 ` Paul Eggert
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2013-06-17 16:54 UTC (permalink / raw)
  To: 14644

Package: Emacs
Version: 24.3.50


I started getting the following error today:

gcc -std=gnu99     -I. -I../src -I../lib -I/home/monnier/src/emacs/trunk/lib-src -I/home/monnier/src/emacs/trunk/lib-src/../src -I/home/monnier/src/emacs/trunk/lib-src/../lib  -Wl,-znocombreloc   -Wall -g3 -O1 -Wno-pointer-sign /home/monnier/src/emacs/trunk/lib-src/emacsclient.c \
           -DVERSION="\"24.3.50\""  ../lib/libgnu.a   \
             -o emacsclient
In file included from /home/monnier/src/emacs/trunk/lib-src/emacsclient.c:81:0:
../lib/getopt.h:198:8: error: redefinition of ‘struct option’
In file included from ../lib/getopt.h:32:0,
                 from /home/monnier/src/emacs/trunk/lib-src/emacsclient.c:81:
/usr/include/getopt.h:105:8: note: originally defined here
In file included from /home/monnier/src/emacs/trunk/lib-src/emacsclient.c:81:0:
../lib/getopt.h:247:12: error: conflicting types for ‘getopt_long’
In file included from ../lib/getopt.h:32:0,
                 from /home/monnier/src/emacs/trunk/lib-src/emacsclient.c:81:
/usr/include/getopt.h:174:12: note: previous declaration of ‘getopt_long’ was here
In file included from /home/monnier/src/emacs/trunk/lib-src/emacsclient.c:81:0:
../lib/getopt.h:251:12: error: conflicting types for ‘getopt_long_only’
In file included from ../lib/getopt.h:32:0,
                 from /home/monnier/src/emacs/trunk/lib-src/emacsclient.c:81:
/usr/include/getopt.h:178:12: note: previous declaration of ‘getopt_long_only’ was here

This may be due to an "aptitude upgrade" rather than a "bzr update",
since I don't see any recent change that would have caused it.

I don't have time to investigate right now, and the gnulib stuff is
a bit impenetrable to me (e.g. I have no idea where/if
GNULIB_defined_struct_option should be set), so if someone else can
figure it out for me, all the better.


        Stefan






In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.18)
 of 2013-06-17 on pastel
Bzr revision: monnier@iro.umontreal.ca-20130614153815-pykhp7poka3ayt03
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description:	Debian GNU/Linux testing (jessie)

Configured using:
 `configure -C --enable-checking --enable-check-lisp-object-type
 CFLAGS=-Wall -g3 -O1 -Wno-pointer-sign'

Important settings:
  value of $LANG: fr_CH.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: InactiveMinibuffer

Minor modes in effect:
  diff-auto-refine-mode: t
  electric-pair-mode: t
  electric-indent-mode: t
  url-handler-mode: t
  global-reveal-mode: t
  reveal-mode: t
  auto-insert-mode: t
  savehist-mode: t
  minibuffer-electric-default-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-o M-n C-x C-s M-x v C-g C-x v = <switch-frame> M-x 
v c - f i n d <tab> <return> M-o C-x C-s <down> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<M-tab> C-a C-x C-s M-x M-p <return> M-m C-x C-s M-x 
M-p <return> M-m C-x C-s M-x M-p <return> C-x C-c C-h 
f k i - b u f f <tab> <return> <help-echo> <down-mouse-2> 
<mouse-1> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <down-mouse-5> 
<mouse-5> <down-mouse-5> <mouse-5> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> M-x r e p - e m - b u <tab> <return
>

Recent messages:
Error during redisplay: (jit-lock-function 12346678) signaled (void-variable --regexp--)
Error during redisplay: (jit-lock-function 12397229) signaled (void-variable --regexp--)
Error during redisplay: (jit-lock-function 12396604) signaled (void-variable --regexp--)
Error during redisplay: (jit-lock-function 12397104) signaled (void-variable --regexp--)
Error during redisplay: (jit-lock-function 12396545) signaled (void-variable --regexp--)
Error during redisplay: (jit-lock-function 12397729) signaled (void-variable --regexp--)
Error during redisplay: (jit-lock-function 12398229) signaled (void-variable --regexp--)
Error during redisplay: (jit-lock-function 12398729) signaled (void-variable --regexp--)
Error during redisplay: (jit-lock-function 12399229) signaled (void-variable --regexp--)
Error during redisplay: (jit-lock-function 12399729) signaled (void-variable --regexp--)

Load-path shadows:
/home/monnier/src/emacs/elpa/packages/company/.dir-locals hides /home/monnier/src/emacs/work/lisp/gnus/.dir-locals
/home/monnier/src/emacs/elpa/packages/cl-lib/cl-lib hides /home/monnier/src/emacs/work/lisp/emacs-lisp/cl-lib

Features:
(sort mail-extr emacsbug message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils hideif cpp cmacexp
cc-mode two-column kmacro cc-fonts cc-awk cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-langs cc-vars cc-defs whitespace vc
executable vc-dispatcher copyright xscheme warnings trace testcover
scheme unsafep re-builder profiler shadow cl-indent inf-lisp ielm pp
comint ansi-color ring gmm-utils ert find-func ewoc debug elp edebug
cus-edit cus-start cus-load wid-edit smerge-mode diff-mode vc-bzr
filecache server noutline outline easy-mmode flyspell ispell eldoc
checkdoc thingatpt help-mode load-dir advice help-fns electric
url-handlers url-parse auth-source eieio byte-opt bytecomp byte-compile
cconv eieio-core gnus-util mm-util mail-prsvr password-cache url-vars
reveal autoinsert proof-site proof-autoloads cl pg-vars uniquify
time-date savehist minibuf-eldef disp-table info easymenu package
cl-macs gv cl-lib cl-loaddefs bbdb-autoloads agda2 vm-autoloads tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)
        





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14644: emacsclient.c fails to compile
  2013-06-17 16:54 bug#14644: emacsclient.c fails to compile Stefan Monnier
@ 2013-06-18  7:59 ` Paul Eggert
  2013-06-18 16:07   ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Eggert @ 2013-06-18  7:59 UTC (permalink / raw)
  To: 14644

Perhaps "make clean; ./configure; make" will fix whatever
state your build is wedge in....

Anyway, I'm surprised that lib/getopt.h is built on your platform,
as the stock getopt.h should be OK.
Could you please send the part of
config.log that talks about getopt?
Mine says the following (Fedora 17):

configure:9297: checking for getopt.h
configure:9297: gcc -std=gnu99 -c -g3 -O2    conftest.c >&5
configure:9297: $? = 0
configure:9297: result: yes
...
configure:18980: checking for getopt_long_only
configure:18980: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:18980: $? = 0
configure:18980: result: yes
configure:18994: checking whether getopt is POSIX compatible
configure:19036: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:19036: $? = 0
configure:19036: ./conftest
configure:19036: $? = 0
configure:19095: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:19095: $? = 0
configure:19095: ./conftest
configure:19095: $? = 0
configure:19137: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:19137: $? = 0
configure:19137: ./conftest
program: option requires an argument -- 'b'
configure:19137: $? = 0
configure:19155: result: yes
configure:19163: checking for working GNU getopt function
configure:19384: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:19384: $? = 0
configure:19384: ./conftest
configure:19384: $? = 0
configure:19400: result: yes
configure:19405: checking for working GNU getopt_long function
configure:19450: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
configure:19450: $? = 0
configure:19450: ./conftest
configure:19450: $? = 0
configure:19461: result: yes





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14644: emacsclient.c fails to compile
  2013-06-18  7:59 ` Paul Eggert
@ 2013-06-18 16:07   ` Eli Zaretskii
  2013-06-18 19:14     ` Glenn Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2013-06-18 16:07 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 14644

> Date: Tue, 18 Jun 2013 00:59:19 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> 
> Anyway, I'm surprised that lib/getopt.h is built on your platform,
> as the stock getopt.h should be OK.
> Could you please send the part of
> config.log that talks about getopt?
> Mine says the following (Fedora 17):
> [...]
> configure:19163: checking for working GNU getopt function
> configure:19384: gcc -std=gnu99 -o conftest -g3 -O2     -Wl,-znocombreloc  conftest.c -lpthread  >&5 
> configure:19384: $? = 0
> configure:19384: ./conftest
> configure:19384: $? = 0
> configure:19400: result: yes

FWIW, on this system:

  Linux fencepost.gnu.org 2.6.32-47-server #1trisquel3 SMP Thu May 16 07:52:30 UTC 2013 x86_64 GNU/Linux

with this GCC:

  gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3

the test for "working GNU getopt function" returns 1, although I see
no compilation problems with emacsclient.c.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14644: emacsclient.c fails to compile
  2013-06-18 16:07   ` Eli Zaretskii
@ 2013-06-18 19:14     ` Glenn Morris
  2013-06-18 19:30       ` Glenn Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2013-06-18 19:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Paul Eggert, 14644

Eli Zaretskii wrote:

>   Linux fencepost.gnu.org 2.6.32-47-server #1trisquel3 SMP Thu May 16 07:52:30 UTC 2013 x86_64 GNU/Linux
>
> with this GCC:
>
>   gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
>
> the test for "working GNU getopt function" returns 1

That uses glibc 2.11, and the (rather lengthy) conftest.c test for GNU
getopt has a piece that is commented as "This code fails on glibc 2.11".
Although it never gets a chance to return 32 since it apparently also
triggers the "core dump" section and so returns 1.

It also dumps core on RHEL6 with glib 2.12. So apparently you need to be
bleeding edge to have a GNU getopt good enough for gnulib... ;)

> , although I see no compilation problems with emacsclient.c.

Me neither.

This is a dupe of http://debbugs.gnu.org/10108, BTW.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14644: emacsclient.c fails to compile
  2013-06-18 19:14     ` Glenn Morris
@ 2013-06-18 19:30       ` Glenn Morris
  2013-06-18 19:33         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2013-06-18 19:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Paul Eggert, 14644


(Idle speculation) I wonder if this issue happens if:

1) you build Emacs with a system where the system getopt is not good
enough for some reason, so libgnu.a gets a getopt compat definition
compiled in.

2) you update your system and get a new glibc, so that system getopt is
now "good enough"

3) you rebuild Emacs without deleting lib/libgnu.a.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14644: emacsclient.c fails to compile
  2013-06-18 19:30       ` Glenn Morris
@ 2013-06-18 19:33         ` Eli Zaretskii
  2013-06-18 19:37           ` Glenn Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2013-06-18 19:33 UTC (permalink / raw)
  To: Glenn Morris; +Cc: eggert, 14644

> From: Glenn Morris <rgm@gnu.org>
> Cc: Paul Eggert <eggert@cs.ucla.edu>,  14644@debbugs.gnu.org
> Date: Tue, 18 Jun 2013 15:30:15 -0400
> 
> 
> (Idle speculation) I wonder if this issue happens if:
> 
> 1) you build Emacs with a system where the system getopt is not good
> enough for some reason, so libgnu.a gets a getopt compat definition
> compiled in.
> 
> 2) you update your system and get a new glibc, so that system getopt is
> now "good enough"
> 
> 3) you rebuild Emacs without deleting lib/libgnu.a.

Shouldn't .deps/getopt.Po catch that?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14644: emacsclient.c fails to compile
  2013-06-18 19:33         ` Eli Zaretskii
@ 2013-06-18 19:37           ` Glenn Morris
  2013-06-18 20:45             ` Paul Eggert
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2013-06-18 19:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: eggert, 14644

Eli Zaretskii wrote:

> Shouldn't .deps/getopt.Po catch that?

No idea. :)
I'm just idly speculating in total ignorance of the details.
I imagine make clean will fix it, and involve a lot less CPU time than
any brain time we might spend trying to figure out exactly what goes on.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14644: emacsclient.c fails to compile
  2013-06-18 19:37           ` Glenn Morris
@ 2013-06-18 20:45             ` Paul Eggert
  2013-06-19  0:38               ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Eggert @ 2013-06-18 20:45 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 14644

On 06/18/13 12:37, Glenn Morris wrote:
> I imagine make clean will fix it, and involve a lot less CPU time than
> any brain time we might spend trying to figure out exactly what goes on.

Sounds good to me.   I suggest './configure; make clean'
since it's 'configure' that checks whether getopt is working.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#14644: emacsclient.c fails to compile
  2013-06-18 20:45             ` Paul Eggert
@ 2013-06-19  0:38               ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2013-06-19  0:38 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 14644-done

> Sounds good to me.   I suggest './configure; make clean'
> since it's 'configure' that checks whether getopt is working.

I had tried a "make bootstrap".  This said, it works today, so it was
probably some transient problem on my system.


        Stefan





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-06-19  0:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-17 16:54 bug#14644: emacsclient.c fails to compile Stefan Monnier
2013-06-18  7:59 ` Paul Eggert
2013-06-18 16:07   ` Eli Zaretskii
2013-06-18 19:14     ` Glenn Morris
2013-06-18 19:30       ` Glenn Morris
2013-06-18 19:33         ` Eli Zaretskii
2013-06-18 19:37           ` Glenn Morris
2013-06-18 20:45             ` Paul Eggert
2013-06-19  0:38               ` Stefan Monnier

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.