From: Jason G. <jgl...@go...> - 2010-04-06 17:52:25
|
When building for the HEAD of the tree at git:// anongit.freedesktop.org/git/dbus/dbus-c++/ I get the following error: g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I../include -I../include -fvisibility=hidden -Wall -O3 -MT eventloop-integration.lo -MD -MP -MF .deps/eventloop-integration.Tpo -c eventloop-integration.cpp -fPIC -DPIC -o .libs/eventloop-integration.o In file included from eventloop-integration.cpp:30: ../include/dbus-c++/eventloop-integration.h: In constructor ‘DBus::BusDispatcher::BusDispatcher()’: ../include/dbus-c++/eventloop-integration.h:71: error: ‘toString’ was not declared in this scope eventloop-integration.cpp: In member function ‘virtual void DBus::BusDispatcher::leave()’: eventloop-integration.cpp:93: error: ‘toString’ was not declared in this scope make[2]: *** [eventloop-integration.lo] Error 1 make[2]: Leaving directory `/usr/local/google/home/jglasgow/chromeos-wednesday/chromeos/src/third_party/dbus-c++/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/google/home/jglasgow/chromeos-wednesday/chromeos/src/third_party/dbus-c++' make: *** [all] Error 2 I have fixed this with the following patch. Is this a known problem? I am compiling on Ubuntu, but the problem also occurs in a portage build environment. Thanks for any information. Jason Glasgow diff --git a/examples/echo/echo-client.cpp b/examples/echo/echo-client.cpp index 093595f..8fe7ad7 100644 --- a/examples/echo/echo-client.cpp +++ b/examples/echo/echo-client.cpp @@ -6,6 +6,7 @@ #include <iostream> #include <pthread.h> #include <signal.h> +#include <stdio.h> using namespace std; diff --git a/include/dbus-c++/eventloop-integration.h b/include/dbus-c++/eventloop-integration.h index fd56c6e..2579273 100644 --- a/include/dbus-c++/eventloop-integration.h +++ b/include/dbus-c++/eventloop-integration.h @@ -26,6 +26,7 @@ #define __DBUSXX_EVENTLOOP_INTEGRATION_H #include <errno.h> +#include <string.h> #include "api.h" #include "dispatcher.h" #include "util.h" @@ -68,8 +69,12 @@ public: //pipe to create a new fd used to unlock a dispatcher at any // moment (used by leave function) int ret = pipe(_pipe); - if (ret == -1) throw Error("PipeError:errno", toString(errno).c_str()); - + if (ret == -1) { + char buffer[128]; + throw Error("PipeError:errno", strerror_r(errno, + buffer, + sizeof(buffer))); + } _fdunlock[0] = _pipe[0]; _fdunlock[1] = _pipe[1]; diff --git a/src/eventloop-integration.cpp b/src/eventloop-integration.cpp index d801574..53aea5f 100644 --- a/src/eventloop-integration.cpp +++ b/src/eventloop-integration.cpp @@ -90,8 +90,12 @@ void BusDispatcher::leave() _running = false; int ret = write(_fdunlock[1],"exit",strlen("exit")); - if (ret == -1) throw Error("WriteError:errno", toString(errno).c_str()); - + if (ret == -1) { + char buffer[128]; + throw Error("PipeError:errno", strerror_r(errno, + buffer, + sizeof(buffer))); + } close(_fdunlock[1]); close(_fdunlock[0]); } @@ -172,4 +176,3 @@ void BusDispatcher::watch_ready(DefaultWatch &ew) watch->handle(flags); } - |
From: Andreas V. <li...@br...> - 2010-04-13 21:30:11
|
Am Tue, 6 Apr 2010 13:52:14 -0400 schrieb Jason Glasgow: Hello Jason, you're right. I forgot to merge something to the fdo branch. I'll commit your patch slightly modified to both branches in the next days. Thanks for the hint. regards Andreas > When building for the HEAD of the tree at git:// > anongit.freedesktop.org/git/dbus/dbus-c++/ I get the following error: > > g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/dbus-1.0 > -I/usr/lib/dbus-1.0/include -I../include -I../include > -fvisibility=hidden -Wall -O3 -MT eventloop-integration.lo -MD -MP -MF > .deps/eventloop-integration.Tpo -c eventloop-integration.cpp -fPIC > -DPIC -o .libs/eventloop-integration.o > In file included from eventloop-integration.cpp:30: > ../include/dbus-c++/eventloop-integration.h: In constructor > ‘DBus::BusDispatcher::BusDispatcher()’: > ../include/dbus-c++/eventloop-integration.h:71: error: ‘toString’ was > not declared in this scope > eventloop-integration.cpp: In member function ‘virtual void > DBus::BusDispatcher::leave()’: > eventloop-integration.cpp:93: error: ‘toString’ was not declared in > this scope > make[2]: *** [eventloop-integration.lo] Error 1 > make[2]: Leaving directory > `/usr/local/google/home/jglasgow/chromeos-wednesday/chromeos/src/third_party/dbus-c++/src' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory > `/usr/local/google/home/jglasgow/chromeos-wednesday/chromeos/src/third_party/dbus-c++' > make: *** [all] Error 2 > > > I have fixed this with the following patch. Is this a known > problem? I am compiling on Ubuntu, but the problem also occurs in a > portage build environment. > > Thanks for any information. > Jason Glasgow > > > diff --git a/examples/echo/echo-client.cpp > b/examples/echo/echo-client.cpp index 093595f..8fe7ad7 100644 > --- a/examples/echo/echo-client.cpp > +++ b/examples/echo/echo-client.cpp > @@ -6,6 +6,7 @@ > #include <iostream> > #include <pthread.h> > #include <signal.h> > +#include <stdio.h> > > using namespace std; > > diff --git a/include/dbus-c++/eventloop-integration.h > b/include/dbus-c++/eventloop-integration.h > index fd56c6e..2579273 100644 > --- a/include/dbus-c++/eventloop-integration.h > +++ b/include/dbus-c++/eventloop-integration.h > @@ -26,6 +26,7 @@ > #define __DBUSXX_EVENTLOOP_INTEGRATION_H > > #include <errno.h> > +#include <string.h> > #include "api.h" > #include "dispatcher.h" > #include "util.h" > @@ -68,8 +69,12 @@ public: > //pipe to create a new fd used to unlock a dispatcher at any > // moment (used by leave function) > int ret = pipe(_pipe); > - if (ret == -1) throw Error("PipeError:errno", > toString(errno).c_str()); - > + if (ret == -1) { > + char buffer[128]; > + throw Error("PipeError:errno", strerror_r(errno, > + buffer, > + > sizeof(buffer))); > + } > _fdunlock[0] = _pipe[0]; > _fdunlock[1] = _pipe[1]; > > diff --git a/src/eventloop-integration.cpp > b/src/eventloop-integration.cpp index d801574..53aea5f 100644 > --- a/src/eventloop-integration.cpp > +++ b/src/eventloop-integration.cpp > @@ -90,8 +90,12 @@ void BusDispatcher::leave() > _running = false; > > int ret = write(_fdunlock[1],"exit",strlen("exit")); > - if (ret == -1) throw Error("WriteError:errno", > toString(errno).c_str()); - > + if (ret == -1) { > + char buffer[128]; > + throw Error("PipeError:errno", strerror_r(errno, > + buffer, > + sizeof(buffer))); > + } > close(_fdunlock[1]); > close(_fdunlock[0]); > } > @@ -172,4 +176,3 @@ void BusDispatcher::watch_ready(DefaultWatch &ew) > > watch->handle(flags); > } > - |
From: Andreas V. <li...@br...> - 2010-04-20 19:15:13
|
Am Tue, 13 Apr 2010 18:01:04 -0400 schrieb Jason Glasgow: Hi, I would do it, but for some reasons I couldn't commit. It seems fdo doesn't accept my ssh keys. It was the hell to get some commit access from fdo. :-( Not sure if I've the time to trouble again with fdo to find the problem. If I don't find a solution, development will continue in gitorious branch only.. regards Andreas > Great. Thanks. -Jason > > On Tue, Apr 13, 2010 at 5:29 PM, Andreas Volz <li...@br...> > wrote: > > > Am Tue, 6 Apr 2010 13:52:14 -0400 schrieb Jason Glasgow: > > > > Hello Jason, > > > > you're right. I forgot to merge something to the fdo branch. I'll > > commit your patch slightly modified to both branches in the next > > days. Thanks for the hint. > > > > regards > > Andreas > > > > > When building for the HEAD of the tree at git:// > > > anongit.freedesktop.org/git/dbus/dbus-c++/ I get the following > > > error: > > > > > > g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/dbus-1.0 > > > -I/usr/lib/dbus-1.0/include -I../include -I../include > > > -fvisibility=hidden -Wall -O3 -MT eventloop-integration.lo -MD > > > -MP -MF .deps/eventloop-integration.Tpo -c > > > eventloop-integration.cpp -fPIC -DPIC > > > -o .libs/eventloop-integration.o In file included from > > > eventloop-integration.cpp:30: ../include/dbus-c++/eventloop-integration.h: > > > In constructor ‘DBus::BusDispatcher::BusDispatcher()’: > > > ../include/dbus-c++/eventloop-integration.h:71: error: ‘toString’ > > > was not declared in this scope > > > eventloop-integration.cpp: In member function ‘virtual void > > > DBus::BusDispatcher::leave()’: > > > eventloop-integration.cpp:93: error: ‘toString’ was not declared > > > in this scope > > > make[2]: *** [eventloop-integration.lo] Error 1 > > > make[2]: Leaving directory > > > > > `/usr/local/google/home/jglasgow/chromeos-wednesday/chromeos/src/third_party/dbus-c++/src' > > > make[1]: *** [all-recursive] Error 1 > > > make[1]: Leaving directory > > > > > `/usr/local/google/home/jglasgow/chromeos-wednesday/chromeos/src/third_party/dbus-c++' > > > make: *** [all] Error 2 > > > > > > > > > I have fixed this with the following patch. Is this a known > > > problem? I am compiling on Ubuntu, but the problem also occurs > > > in a portage build environment. > > > > > > Thanks for any information. > > > Jason Glasgow > > > > > > > > > diff --git a/examples/echo/echo-client.cpp > > > b/examples/echo/echo-client.cpp index 093595f..8fe7ad7 100644 > > > --- a/examples/echo/echo-client.cpp > > > +++ b/examples/echo/echo-client.cpp > > > @@ -6,6 +6,7 @@ > > > #include <iostream> > > > #include <pthread.h> > > > #include <signal.h> > > > +#include <stdio.h> > > > > > > using namespace std; > > > > > > diff --git a/include/dbus-c++/eventloop-integration.h > > > b/include/dbus-c++/eventloop-integration.h > > > index fd56c6e..2579273 100644 > > > --- a/include/dbus-c++/eventloop-integration.h > > > +++ b/include/dbus-c++/eventloop-integration.h > > > @@ -26,6 +26,7 @@ > > > #define __DBUSXX_EVENTLOOP_INTEGRATION_H > > > > > > #include <errno.h> > > > +#include <string.h> > > > #include "api.h" > > > #include "dispatcher.h" > > > #include "util.h" > > > @@ -68,8 +69,12 @@ public: > > > //pipe to create a new fd used to unlock a dispatcher at any > > > // moment (used by leave function) > > > int ret = pipe(_pipe); > > > - if (ret == -1) throw Error("PipeError:errno", > > > toString(errno).c_str()); - > > > + if (ret == -1) { > > > + char buffer[128]; > > > + throw Error("PipeError:errno", > > > strerror_r(errno, > > > + > > > buffer, + > > > sizeof(buffer))); > > > + } > > > _fdunlock[0] = _pipe[0]; > > > _fdunlock[1] = _pipe[1]; > > > > > > diff --git a/src/eventloop-integration.cpp > > > b/src/eventloop-integration.cpp index d801574..53aea5f 100644 > > > --- a/src/eventloop-integration.cpp > > > +++ b/src/eventloop-integration.cpp > > > @@ -90,8 +90,12 @@ void BusDispatcher::leave() > > > _running = false; > > > > > > int ret = write(_fdunlock[1],"exit",strlen("exit")); > > > - if (ret == -1) throw Error("WriteError:errno", > > > toString(errno).c_str()); - > > > + if (ret == -1) { > > > + char buffer[128]; > > > + throw Error("PipeError:errno", strerror_r(errno, > > > + buffer, > > > + > > > sizeof(buffer))); > > > + } > > > close(_fdunlock[1]); > > > close(_fdunlock[0]); > > > } > > > @@ -172,4 +176,3 @@ void BusDispatcher::watch_ready(DefaultWatch > > > &ew) > > > > > > watch->handle(flags); > > > } > > > - > > > > > > ------------------------------------------------------------------------------ > > Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > dbus-cplusplus-devel mailing list > > dbu...@li... > > https://lists.sourceforge.net/lists/listinfo/dbus-cplusplus-devel > > |
From: Andreas V. <li...@br...> - 2010-04-21 07:00:10
|
Am Tue, 20 Apr 2010 15:18:34 -0400 schrieb Jason Glasgow: Yes, do this. It features the direct C++ object transport wrapper. It's very comfortable to access it in this way and much easier to replace Dbus-C++ in your application with another transport layer if ever needed. But note that the C++ object transport it's yet optimised for throughput. So if you transport large vectors measure the data copy loss! I've some ideas how to optimise this, but not yet had the time. read this: http://sourceforge.net/apps/trac/dbus-cplusplus/wiki/Introspection%20Format regards Andreas > Thanks for the update. Sounds bad the fdo is such a pain. We'll > start looking at the gitorious code. > -Jason > > On Tue, Apr 20, 2010 at 3:12 PM, Andreas Volz <li...@br...> > wrote: > > > Am Tue, 13 Apr 2010 18:01:04 -0400 schrieb Jason Glasgow: > > > > Hi, > > > > I would do it, but for some reasons I couldn't commit. It seems fdo > > doesn't accept my ssh keys. It was the hell to get some commit > > access from fdo. :-( > > > > Not sure if I've the time to trouble again with fdo to find the > > problem. If I don't find a solution, development will continue in > > gitorious branch only.. |