GNOME Bugzilla – Bug 313443
compile error with dbus 0.35.2
Last modified: 2005-08-19 18:37:18 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
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
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.
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
Created attachment 50796 [details] [review] Updated patch Oh, you are right. I think this new patch will really fix it.
Should be fixed in CVS. Thanks.
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?
Fuck, can you get a trace please?
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
Crash with reasonable backtrace is in the bug 313724. Let's discuss it there. This bug should be fixed anyhow.
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.
In addition I think this expression is more correct than mine. I have dbus 0.35.2 and I can't reproduce the crash . . .
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?
Can you diff the config.h files produced by the configure runs of 0.3.4 and cvs head?
no difference
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?
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?
Yeah, please attach the diff between the two shell/ev-application-service.h files.
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...
Do you have multiple versions of dbus installed? Can you check that both are using the same dbus-binding-tool binary?
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
Is there any diff between shell/Makefile files?
Created attachment 50923 [details] shell/Makefile diff
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.
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
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.
Yes, with shell/ev-application-service.h removed from the extracted tarball before ./configure, everything works fine, too
Nice. I've committed fix to CVS. Thanks to all.