notify-osd-0.9.11: ./configure && make gives compile errors

Bug #361788 reported by Sebastian Pipping
4
Affects Status Importance Assigned to Milestone
notify-osd (Ubuntu)
Fix Released
Low
Mirco Müller

Bug Description

==============================================
make[3]: Entering directory `/home/sping/Desktop/notify-osd-0.9.11/src'
gcc -DHAVE_CONFIG_H -I. -I.. -I. -I. -DDATADIR=\""/usr/local/share"\" -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1 -DORBIT2=1 -pthread -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libwnck-1.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/startup-notification-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -g -O2 -lm -Wall -Werror -std=c99 -MT notify_osd-bubble.o -MD -MP -MF .deps/notify_osd-bubble.Tpo -c -o notify_osd-bubble.o `test -f 'bubble.c' || echo './'`bubble.c
bubble.c: In function âload_iconâ:
bubble.c:1621: error: âGFileâ undeclared (first use in this function)
bubble.c:1621: error: (Each undeclared identifier is reported only once
bubble.c:1621: error: for each function it appears in.)
bubble.c:1621: error: âfileâ undeclared (first use in this function)
[..]
==============================================

As GTK_ICON_LOOKUP_FORCE_SIZE and gtk_dialog_get_content_area used by notify-osd both do not appear in my GTK/glib include files I guess you forgot to make configure require more recent version of a dependency?

Related branches

Revision history for this message
Mirco Müller (macslow) wrote :

Did you do a "apt-get build-dep notify-osd", before trying to build notify-osd? On what distro do you try to compile it?

Revision history for this message
Sebastian Pipping (webmaster-hartwork) wrote :

Building manually (on Gentoo). Afaik configure should not create a Makefile if my system is missing proper dependencies.

Revision history for this message
Mirco Müller (macslow) wrote :

Hm, in notify-osd's top-level configure.in I state ...

"PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16.0 gthread-2.0 gconf-2.0 gio-2.0])".

But in notify-osd/src/Makefile.am I forgot to add ...

$(GLIB_CFLAGS)

... to notify_osd_CFLAGS. I've attached a patch to fix this. Please apply that, run ...

"make clean; autoreconf; ./autogen.sh; ./configure; make"

... and report back if that fixes the issue for you. Since you seem to be missing the needed gio library-headers autoreconf or autogen.sh should fail instead of succeeding. Due to the test-suite using glib's testing framework we depend on glib >= 2.16.x, which includes gio.

Revision history for this message
Mirco Müller (macslow) wrote :
Changed in notify-osd:
assignee: nobody → Mirco Müller (macslow)
importance: Undecided → Low
status: New → In Progress
Revision history for this message
sirin (pagan-bk) wrote :

make[3]: Entering directory `/home/sirin/builds/ndosd/notify-osd-0.9.11/src'
cc -DHAVE_CONFIG_H -I. -I.. -I. -I. -DDATADIR=\""/usr/share"\" -I/usr/local/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1 -DORBIT2=1 -pthread -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include -I/usr/include/libwnck-1.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/startup-notification-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -g -O2 -g -Wall -O2 -lm -Wall -Werror -std=c99 -c -o notify_osd-bubble.o `test -f 'bubble.c' || echo './'`bubble.c
bubble.c: In function ‘load_icon’
bubble.c:1651: error: ‘GTK_ICON_LOOKUP_FORCE_SIZE’ undeclared (first use in this function)
bubble.c:1651: error: (Each undeclared identifier is reported only once
bubble.c:1651: error: for each function it appears in.)
make[3]: *** [notify_osd-bubble.o] error1

Revision history for this message
Mirco Müller (macslow) wrote :

Apply the second patch on top of the first one to catch any too old version of GTK+ at configure-time. GTK_ICON_LOOKUP_FORCE_SIZE was introduced with GTK+ 2.4.x and we depend on GTK+ >= 2.6.x for notify-osd.

Revision history for this message
Sebastian Pipping (webmaster-hartwork) wrote :

I have applied both of your patches, same results. I have GTK+ 2.12.11 installed here.
I ran "fgrep -R GTK_ICON_LOOKUP_FORCE_SIZE <dir>" on both /usr/include and
the extracted contents of gtk+-2.12.11.tar.bz2 without any result.

I'll attach configure and (second run) make log for you in a minute.

Revision history for this message
Sebastian Pipping (webmaster-hartwork) wrote :
Revision history for this message
Mirco Müller (macslow) wrote :

It turns out that GTK_ICON_LOOKUP_FORCE_SIZE was introduced with GTK+ 2.14.0. I updated notify-osd trunk to reflect that. Needed patch is attached.

Revision history for this message
Sebastian Pipping (webmaster-hartwork) wrote :

Applied you patch and updated my system to GTK+ 2.14. Now compilation fails with

===============================
cc1: warnings being treated as errors
dnd.c: In function âdnd_is_xscreensaver_activeâ:
dnd.c:75: warning: dereferencing type-punned pointer will break strict-aliasing rules
===============================

I suggest to ..
0) fix the cause of that warning
1) remove harcoded "-Werror" from <configure.in> and <tests/Makefile.am>
2) remove hardcoded "-std=c99" from the same two files, use Autoconf's macro AC_PROG_CC_C99 instead
3) run "./configure --enable-compile-warnings=error" on your end when warning-to-error conversion is wanted. Some Gnome macro notify-osd uses pulls that in. I guess you overlooked it.
4) fix former or integration of it to notify-osd. at least for me after applying (1) compilation did not fail as expected.

Looking forward to your feedback.

Revision history for this message
Mirco Müller (macslow) wrote :

Skipping -Werror from configure.in and tests/Makefile.am and instead using ./configure --enable-compile-warnings=error does not have same effect. Warnings are just that and are not treated as errors, thus the are not interrupting the compilation and pointing you to the flaw in the sourcecode. I've added AC_PROG_CC_C99 and removed -std=c99 though.

Revision history for this message
Sebastian Pipping (webmaster-hartwork) wrote :

Are you saying that you will neither fix the warnings nor remove -Werror?

Mirco Müller (macslow)
Changed in notify-osd:
status: In Progress → Fix Committed
milestone: none → ubuntu-9.10
Revision history for this message
Mirco Müller (macslow) wrote :

Sebastian, your suggestion using --enable-compile-warnings=error doesn't work. Regarding the warnings themselves, I don't get any. Did you try the latest trunk of notify-osd or its 0.9.22 release yet?

Revision history for this message
Sebastian Pipping (webmaster-hartwork) wrote :

Just tried compiling 0.9.22, no more warnings, very nice. Still, please remove -Werror. Just because your and my compiler (GCC 4.2.4 atm) do not produce warnings right now does not mean it will do the same for 90% of your users. Shipping -Werror will just increase the number of mails with patches you get from downstream, or worse. Trust me on that one.

What version of GCC are you working with btw? Something older than 4.3? People with GCC 4.3 and 4.4 are likely to get more warnings and they will all come back to you with compile errors due to -Werror.

Mirco Müller (macslow)
Changed in notify-osd:
status: Fix Committed → Fix Released
affects: notify-osd → notify-osd (Ubuntu)
Changed in notify-osd (Ubuntu):
milestone: ubuntu-9.10 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers