Skip to content
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

build errors with gcc 7.2.0 #1640

Closed
oberon-manjaro opened this issue Nov 7, 2017 · 6 comments
Closed

build errors with gcc 7.2.0 #1640

oberon-manjaro opened this issue Nov 7, 2017 · 6 comments

Comments

@oberon-manjaro
Copy link

Building latest git snapshot with gcc 7.2.0 fails with [-Werror=sign-compare] and [-Werror=misleading-indentation] errors:

nemo-3.6.2:

	prefix:                 /usr
	source code location:	.
	compiler:		gcc
	libexif support:	yes
	libexempi support:	yes
	Tracker support:	no

        debugging support:      yes
	nemo-extension documentation: no
	nemo-extension introspection: yes

make  all-recursive
make[1]: Entering directory '/home/bernhard/manjaro/myaur/nemo-git/src/nemo'
Making all in eel
make[2]: Entering directory '/home/bernhard/manjaro/myaur/nemo-git/src/nemo/eel'
  CC       eel-accessibility.lo
  CC       eel-art-extensions.lo
  CC       eel-debug.lo
  CC       eel-editable-label.lo
  CC       eel-canvas.lo
  CC       eel-gdk-extensions.lo
  CC       eel-glib-extensions.lo
eel-editable-label.c: In function ‘eel_editable_label_get_block_cursor_location’:
eel-editable-label.c:1325:3: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
   if (layout_line == NULL)
   ^~
eel-editable-label.c:1328:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
     text = pango_layout_get_text (label->layout);
     ^~~~
  CC       eel-gnome-extensions.lo
  CC       eel-graphic-effects.lo
  CC       eel-gtk-extensions.lo
  CC       eel-lib-self-check-functions.lo
  CC       eel-self-checks.lo
cc1: all warnings being treated as errors
make[2]: *** [Makefile:767: eel-editable-label.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/lib/glib-2.0/include/glibconfig.h:9:0,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h:29,
                 from eel-gtk-extensions.h:31,
                 from eel-gtk-extensions.c:30:
eel-gtk-extensions.c: In function ‘sanity_check_window_dimensions’:
/usr/include/glib-2.0/glib/gmacros.h:291:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 #define MIN(a, b)  (((a) < (b)) ? (a) : (b))
                          ^
eel-gtk-extensions.c:123:11: note: in expansion of macro ‘MIN’
  *width = MIN (*width, gdk_screen_width());
           ^~~
/usr/include/glib-2.0/glib/gmacros.h:291:39: error: signed and unsigned type in conditional expression  -Werror=sign-compare]
 #define MIN(a, b)  (((a) < (b)) ? (a) : (b))
                                       ^
eel-gtk-extensions.c:123:11: note: in expansion of macro ‘MIN’
  *width = MIN (*width, gdk_screen_width());
           ^~~
/usr/include/glib-2.0/glib/gmacros.h:291:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 #define MIN(a, b)  (((a) < (b)) ? (a) : (b))
                          ^
eel-gtk-extensions.c:124:12: note: in expansion of macro ‘MIN’
  *height = MIN (*height, gdk_screen_height());
            ^~~
/usr/include/glib-2.0/glib/gmacros.h:291:39: error: signed and unsigned type in conditional expression  -Werror=sign-compare]
 #define MIN(a, b)  (((a) < (b)) ? (a) : (b))
                                       ^
eel-gtk-extensions.c:124:12: note: in expansion of macro ‘MIN’
  *height = MIN (*height, gdk_screen_height());
            ^~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:767: eel-gtk-extensions.lo] Error 1
make[2]: Leaving directory '/home/bernhard/manjaro/myaur/nemo-git/src/nemo/eel'
make[1]: *** [Makefile:511: all-recursive] Error 1
make[1]: Leaving directory '/home/bernhard/manjaro/myaur/nemo-git/src/nemo'
make: *** [Makefile:440: all] Error 2
@leigh123linux
Copy link
Contributor

It compiles fine here using gcc-7.2.1

https://koji.fedoraproject.org/koji/buildinfo?buildID=990212

What configure options are you using?, I use

NOCONFIGURE=1 ./autogen.sh

%build
%configure --disable-static \
           --disable-update-mimedb \
           --disable-schemas-compile \
           --enable-tracker=no

sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool

@oberon-manjaro
Copy link
Author

oberon-manjaro commented Nov 7, 2017

I use

  ./autogen.sh \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --disable-static \
    --disable-update-mimedb \
    --disable-schemas-compile \
    --enable-tracker=no \
    --enable-selinux=no

sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' libtool

I don't know of a gcc 2.7.1 release, to my knowledge 2.7.0 is the latest available...?
The errors seem to be limited to eel.

edit: Adding NOCONFIGURE=1 leaves me with no libtool to sed 😉

@leigh123linux
Copy link
Contributor

I think 7.2.1 is a git snapshot

https://koji.fedoraproject.org/koji/buildinfo?buildID=971026

Can you make the build verbose and post the error again so I can check the build flags used.

NOCONFIGURE=1 ./autogen.sh
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
--disable-update-mimedb \
--disable-schemas-compile \
--enable-tracker=no \
--enable-selinux=no
make V=1

@oberon-manjaro
Copy link
Author

Here you are:
https://pastebin.com/yfwwffg3

@leigh123linux
Copy link
Contributor

leigh123linux commented Nov 7, 2017

The -Werror flag is breaking the build for you, try adding this to configure --disable-Werror

cc1: all warnings being treated as errors
--disable-Werror        Unconditionally make all compiler warnings non-fatal

@oberon-manjaro
Copy link
Author

Thank you, that does the trick! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants