all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: 23003@debbugs.gnu.org
Subject: bug#23003: 25.1.50; --with-x-toolkit options cause the build to fail.
Date: Thu, 17 Mar 2016 23:57:34 -0700	[thread overview]
Message-ID: <56EBA6DE.3030208@cs.ucla.edu> (raw)
In-Reply-To: <m2twkazt3j.wl%esq@lawlist.com>

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

> emacsgtkfixed.c:36: error: redefinition of typedef 'EmacsFixedPrivate'
> ...
> emacsgtkfixed.c:37: error: redefinition of typedef 'EmacsFixedClass'

Thanks for reporting the problem. It looks like you have a picky C99 compiler 
that rejects duplicate typedefs. I installed into the emacs-25 branch the 
attached patch to fix this porting glitch; please give it a try.

The other diagnostics look like you ran './configure FOO-OPTIONS; make; 
./configure BAR-OPTIONS; make', which does not work in general.  When switching 
'configure' options, in general one must start with a fresh tree.  One way to do 
this is to leave the source tree alone and build in a separate directory, e.g.:

tar xf emacs-25.1.50.tar.gz

mkdir build-foo
cd build-foo
../emacs-25.1.50/configure FOO-OPTIONS
make
cd ..

mkdir build-bar
cd build-bar
../emacs-25.1.50/configure BAR-OPTIONS
make
cd ..


So please try something like the above, after installing the attached patch.

[-- Attachment #2: 0001-Port-to-GTK-with-strict-C99-compiler.patch --]
[-- Type: text/x-diff, Size: 1641 bytes --]

From 09154cfbe27159d5a9f0acd3e3ae89c6969f694d Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 17 Mar 2016 23:45:02 -0700
Subject: [PATCH] Port to GTK with strict C99 compiler

* src/emacsgtkfixed.c: Use workaround for GNOME bug 683906 only
in glib 2.35.6 and earlier, since the bug is fixed in 2.35.7.
* src/emacsgtkfixed.c (EmacsFixedPrivate):
* src/emacsgtkfixed.h (EmacsFixedClass):
Remove duplicate typedef, which strict C99 does not allow (Bug#23003).
---
 src/emacsgtkfixed.c | 3 +--
 src/emacsgtkfixed.h | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index cebd7b6..ca0bbfb 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -27,13 +27,12 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "emacsgtkfixed.h"
 
 /* Silence a bogus diagnostic; see GNOME bug 683906.  */
-#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__)
+#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__) && ! GLIB_CHECK_VERSION (2, 35, 7)
 # pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Wunused-local-typedefs"
 #endif
 
 typedef struct _EmacsFixed EmacsFixed;
-typedef struct _EmacsFixedPrivate EmacsFixedPrivate;
 typedef struct _EmacsFixedClass EmacsFixedClass;
 
 struct _EmacsFixedPrivate
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h
index 3d6a76a..0d09525 100644
--- a/src/emacsgtkfixed.h
+++ b/src/emacsgtkfixed.h
@@ -30,7 +30,6 @@ G_BEGIN_DECLS
 struct frame;
 
 typedef struct _EmacsFixedPrivate       EmacsFixedPrivate;
-typedef struct _EmacsFixedClass         EmacsFixedClass;
 
 struct _EmacsFixed
 {
-- 
2.5.0


  reply	other threads:[~2016-03-18  6:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-13  8:21 bug#23003: 25.1.50; --with-x-toolkit options cause the build to fail Keith David Bershatsky
2016-03-18  6:57 ` Paul Eggert [this message]
2016-03-20 17:04 ` Keith David Bershatsky
2016-03-21  6:24   ` Paul Eggert
2016-03-22  3:38 ` Keith David Bershatsky
2016-03-22  3:54 ` Keith David Bershatsky
2016-03-22  5:45   ` Paul Eggert
2016-03-27  1:57 ` Keith David Bershatsky
2016-03-27  1:58   ` Paul Eggert

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=56EBA6DE.3030208@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=23003@debbugs.gnu.org \
    --cc=esq@lawlist.com \
    /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.