|
From: John S. <joh...@sw...> - 2016-09-07 14:11:46
|
I have built libdbus-c++ with option --enable-debug
The file debug.cpp contains the following line:
static int debug_env = getenv("DBUSXX_VERBOSE") ? 1 : 0;
However, adding some print statements to the code, I find that getenv() is
always returning null.
For a sanity check, I added this line:
system("echo DBUSXX_VERBOSE: $DBUSXX_VERBOSE > /dev/pts/1");
This prints out "DBUSXX_VERBOSE:" without a value, in spite of the fact
that I am launching with the variable set on the command line, like this:
# DBUSXX_VERBOSE=1 /bin/dbus-daemon --system --nofork
So for some reason, it seems that the code is in a different environment
than that from which it was launched?
I can get the debug output by commenting out the if structure, but I would
like to know why the environment isn't getting passed through, and what is
an appropriate procedure for enabling the debug messages.
Package was built with dbus-c++_0.9.0.orig.tar.gz and
dbus-c++_0.9.0-6ubuntu1.debian.tar.gz
System:
# uname -a
Linux SW0012 4.4.15-cec-release-rt23 #0 SMP PREEMPT RT Fri Aug 26 16:08:24
EDT 2016 i686 i686 i686 GNU/Linux
# cat /etc/debian_version
jessie/sid
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"
# sed 8q config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libdbus-c++ configure 0.9.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --build=i686-linux-gnu --prefix=/usr
--includedir=${prefix}/include --mandir=${prefix}/share/man
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var
--libdir=${prefix}/lib/i386-linux-gnu
--libexecdir=${prefix}/lib/i386-linux-gnu --disable-maintainer-mode
--disable-dependency-tracking --enable-glib --disable-ecore
--enable-doxygen-docs --enable-debug
Please let me know if any further info would be helpful.
Thanks,
John
|