After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 313443 - compile error with dbus 0.35.2
compile error with dbus 0.35.2
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
git master
Other Linux
: Normal major
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks: 312019
 
 
Reported: 2005-08-14 10:31 UTC by Christian Persch
Modified: 2005-08-19 18:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A patch (1.14 KB, patch)
2005-08-14 11:42 UTC, Carlos Garcia Campos
none Details | Review
Updated patch (1.10 KB, patch)
2005-08-16 14:00 UTC, Carlos Garcia Campos
none Details | Review
requested diff (6.21 KB, text/x-patch)
2005-08-18 08:35 UTC, Michael Monreal
  Details
shell/Makefile diff (4.60 KB, text/x-patch)
2005-08-18 16:03 UTC, Michael Monreal
  Details

Description Christian Persch 2005-08-14 10:31:05 UTC
ev-application.c:86:5: error: floating constant in preprocessor expression

this line: #if DBUS_VERSION == 33

and config.h:
#define DBUS_VERSION 35.2
Comment 1 Christian Persch 2005-08-14 10:34:40 UTC
And more errors:

main.c:78:5: error: floating constant in preprocessor expression
main.c: In function ‘load_files_remote’:
main.c:79: error: ‘DBusGPendingCall’ undeclared (first use in this function)
main.c:79: error: (Each undeclared identifier is reported only once
main.c:79: error: for each function it appears in.)
main.c:79: error: ‘call’ undeclared (first use in this function)
main.c:96:5: error: floating constant in preprocessor expression
main.c:97: error: ‘DBUS_TYPE_INVALID’ undeclared (first use in this function)
main.c:97: error: too few arguments to function ‘dbus_g_proxy_begin_call’
main.c:128:5: error: floating constant in preprocessor expression
main.c:130: error: ‘DBUS_TYPE_STRING’ undeclared (first use in this function)
main.c:132: warning: passing argument 6 of ‘dbus_g_proxy_begin_call’ makes
integer from pointer without a cast
Comment 2 Carlos Garcia Campos 2005-08-14 11:42:23 UTC
Created attachment 50678 [details] [review]
A patch

I think configure should take only the major version number of dbus. Here is a
patch to fix it.
Comment 3 Nickolay V. Shmyrev 2005-08-16 05:49:48 UTC
Carlos, your patch fails on dbus-0.33 :( It's really weird that dbus interfaces
are so unstable

on my fc4

pkgconfig --modversion dbus-glib-1

outputs 0.33

Comment 4 Carlos Garcia Campos 2005-08-16 14:00:07 UTC
Created attachment 50796 [details] [review]
Updated patch

Oh, you are right. I think this new patch will really fix it.
Comment 5 Nickolay V. Shmyrev 2005-08-16 15:50:31 UTC
Should be fixed in CVS. Thanks.
Comment 6 Michael Monreal 2005-08-17 10:39:25 UTC
I was unable to compile evince 0.3.3 because of the "floating constant in
preprocessor expression" error, used to disable dbus support (hacked the
configure script).

Evince 0.3.4 now compiles fine, but it crashes at startup :/

Disabling dbus in 0.3.4 lets me run evince again, so I suppose there is still
something wrong with this?
Comment 7 Marco Pesenti Gritti 2005-08-17 10:41:18 UTC
Fuck, can you get a trace please?
Comment 8 Michael Monreal 2005-08-17 10:51:48 UTC
Unfortunatly my current gnome installation was build without debugging symbols,
so I'm afraif I can't provide any useful information right now... But i'll try
to corner the problem
Comment 9 Nickolay V. Shmyrev 2005-08-17 16:55:16 UTC
Crash with reasonable backtrace is in the bug 313724. Let's discuss it there.

This bug should be fixed anyhow.
Comment 10 Joe Marcus Clarke 2005-08-17 18:48:40 UTC
The regular expression committed does not work with FreeBSD or Solaris sed.  The
result will be, for example:

0.35.2

Instead, the following sed expression should be used.  This has been tested on
FreeBSD and Solaris:

sed 's/0\.\([0-9]*\)\.\{0,1\}\([0-9]*\)/\1/'

This will correctly produce:

35

For the DBUS_VERSION.
Comment 11 Carlos Garcia Campos 2005-08-17 19:01:55 UTC
In addition I think this expression is more correct than mine. 
I have dbus 0.35.2 and I can't reproduce the crash . . . 
Comment 12 Michael Monreal 2005-08-17 19:39:49 UTC
Strange, strange... I didn't exactly find the cause of the crash I reported in
comment #6, but I now have a working 0.3.4 build, using a CVS checkout...
I checked this multiple times, compiling 0.3.4 from tarball causes evince to
crash at startup, CVS HEAD (which is nothing but 0.3.4 atm) works fine. Is the
release tarball broken somehow?
Comment 13 Christian Persch 2005-08-17 19:41:45 UTC
Can you diff the config.h files produced by the configure runs of 0.3.4 and cvs
head?
Comment 14 Michael Monreal 2005-08-17 20:05:07 UTC
no difference
Comment 15 Michael Monreal 2005-08-17 20:55:54 UTC
Just browsed through a recursive diff, there are differences in

aclocal.m4, compile, config.guess, config.sub, configure, intltool-extract.in,
intltool-merge.in, intltool-update.in, ltmain.sh

as to be expected, and shell/ev-application-service.h, which is autogenerated, I
guess?
Comment 16 Nickolay V. Shmyrev 2005-08-18 06:30:10 UTC
Joe Marcus: Thanks, updated expression was committed to CVS. I hope, it will be
portable now. 

About crash on build. File ev-application service is autogenerated. But it can
actually be the reason of problem. Can you investigate the difference in this file?
Comment 17 Marco Pesenti Gritti 2005-08-18 08:04:56 UTC
Yeah, please attach the diff between the two shell/ev-application-service.h files.
Comment 18 Michael Monreal 2005-08-18 08:35:07 UTC
Created attachment 50895 [details]
requested diff

I can also confirm that dropping this .h file from the CVS copy to the tarball
version makes it compile fine...
Comment 19 Marco Pesenti Gritti 2005-08-18 08:41:50 UTC
Do you have multiple versions of dbus installed? Can you check that both are
using the same dbus-binding-tool binary?
Comment 20 Michael Monreal 2005-08-18 10:53:22 UTC
Uhh... well yeah, I just noticed that garnome builds its own copy of dbus, so I
have one un /usr and one in /opt/gnome2.12. Both are 0.35.2 though.

The x session is run through the dbus-launch from /opt/gnome2.12, don't know it
it somehow uses the copy in /usr somehow
Comment 21 Marco Pesenti Gritti 2005-08-18 11:00:33 UTC
Is there any diff between shell/Makefile files?
Comment 22 Michael Monreal 2005-08-18 16:03:31 UTC
Created attachment 50923 [details]
shell/Makefile diff
Comment 23 Nickolay V. Shmyrev 2005-08-18 17:08:55 UTC
Michael, does replacing ev-application-service.h in fresh release sources with
one generated for CVS solves the crash?

I think it's dbus incompatibility and we should force rebuild of
ev-application-service.h with user dbus tool even on release build.
Comment 24 Michael Monreal 2005-08-18 17:41:05 UTC
Yeah, as said in #18, if I replace the ev-application-service.h from the tarball
with the one that is generated by a CVS build, it works fine
Comment 25 Marco Pesenti Gritti 2005-08-19 01:13:40 UTC
Hmm Nickolay analysis is probably correct. Michael can you verify that removing
ev-application-service.h before building solve the issue?

I wonder if we need to put ev-application-service.h in the tarball at all.
Comment 26 Michael Monreal 2005-08-19 07:48:59 UTC
Yes, with shell/ev-application-service.h removed from the extracted tarball
before ./configure, everything works fine, too
Comment 27 Nickolay V. Shmyrev 2005-08-19 18:37:18 UTC
Nice. I've committed fix to CVS. Thanks to all.