LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-23-2013, 01:52 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Compile dbus with backtrace support


I'm trying to build a dbus package that provides backtrace support. According to this error message, I need to add the -rdynamic option to the build configuration:

"D-Bus not built with -rdynamic so unable to print a backtrace"

I made the following change to the slackbuild:

CFLAGS="$SLKCFLAGS -rdynamic"

Per the configure script, I also tried this:

CFLAGS="$SLKCFLAGS -export-dynamic"

What is the correct way to build dbus with backtrace support?

Thanks.
 
Old 04-23-2013, 03:00 PM   #2
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Rep: Reputation: Disabled
Quote:
Originally Posted by Woodsman View Post
I'm trying to build a dbus package that provides backtrace support. According to this error message, I need to add the -rdynamic option to the build configuration:

"D-Bus not built with -rdynamic so unable to print a backtrace"

I made the following change to the slackbuild:

CFLAGS="$SLKCFLAGS -rdynamic"

Per the configure script, I also tried this:

CFLAGS="$SLKCFLAGS -export-dynamic"

What is the correct way to build dbus with backtrace support?

Thanks.
Code:
This is from --configure --help
Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --disable-maintainer-mode  disable make rules and dependencies not useful
			  (and sometimes confusing) to the casual installer
  --enable-silent-rules          less verbose build output (undo: `make V=1')
  --disable-silent-rules         verbose build output (undo: `make V=0')
  --disable-dependency-tracking  speeds up one-time build
  --enable-dependency-tracking   do not reject slow dependency extractors
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-compiler-coverage
                          Enable generation of coverage data
  --disable-compiler-optimisations
                          Disable compiler optimisations
  --enable-developer      set defaults to be appropriate for a D-Bus developer
                          instead of a distribution/end-user
  --enable-ansi           enable -ansi -pedantic gcc flags
  --enable-verbose-mode   support verbose debug mode
  --enable-asserts        include assertion checks
  --enable-checks         include sanity checks on public API
  --enable-xml-docs       build XML documentation (requires xmlto)
  --enable-doxygen-docs   build DOXYGEN documentation (requires Doxygen)
  --enable-abstract-sockets
                          use abstract socket namespace (linux only)
  --enable-selinux        build with SELinux support
  --enable-libaudit       build audit daemon support for SELinux
  --enable-dnotify        build with dnotify support (linux only)
  --enable-inotify        build with inotify support (linux only)
  --enable-kqueue         build with kqueue support
  --enable-console-owner-file
                          enable console owner file
  --enable-userdb-cache   build with userdb-cache support
  --enable-launchd        build with launchd auto-launch support
  --enable-systemd        build with systemd at_console support
  --enable-embedded-tests enable unit test code in the library and binaries
  --enable-modular-tests  enable modular regression tests (requires GLib)
  --enable-tests          enable/disable all tests, overriding
                          embedded-tests/modular-tests
  --enable-installed-tests
                          enable unit test code in the library and binaries
  --enable-epoll          use epoll(4) on Linux
  --enable-x11-autolaunch build with X11 auto-launch support
  --disable-Werror        compile without -Werror (normally enabled in
                          development builds)
  --enable-stats          enable bus daemon usage statistics

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                          both]
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-sysroot=DIR Search for dependent libraries within DIR
                        (or the compiler's sysroot if not specified).
  --with-xml=libxml/expat XML library to use (libxml may be named libxml2 on
                          some systems)
  --with-init-scripts=redhat
                          Style of init scripts to install
  --with-session-socket-dir=dirname
                          Where to put sockets for the per-login-session
                          message bus
  --with-test-socket-dir=dirname
                          Where to put sockets for make check
  --with-system-pid-file=pidfile
                          PID file for systemwide daemon
  --with-system-socket=filename
                          UNIX domain socket for systemwide daemon
  --with-console-auth-dir=dirname
                          directory to check for console ownerhip
  --with-console-owner-file=filename
                          file whose owner determines current console owner
  --with-launchd-agent-dir=dirname
                          directory to put the launchd agent (default:
                          /Library/LaunchAgents)
  --with-dbus-user=<user> User for running the DBUS daemon (messagebus)
  --with-dbus-daemondir=dirname
                          Directory for installing the DBUS daemon
  --with-dbus-session-bus-default-address=nonce-tcp:/autolaunch:/tcp:host:port
                          Transport Type to be used (default: nonce-tcp:)
  --without-64-bit        If you have to use this option, please report it as
                          a bug
  --with-valgrind         Add instrumentation to help valgrind to understand
                          our allocator
  --with-x                use the X Window System
  --with-systemdsystemunitdir=DIR
                          Directory for systemd service files
  --with-dbus-test-dir=dirname
                          path where the tests tools are available

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CPP         C preprocessor
  CXXCPP      C++ preprocessor
  PKG_CONFIG  path to pkg-config utility
  GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
  GLIB_LIBS   linker flags for GLIB, overriding pkg-config
  DBUS_GLIB_CFLAGS
              C compiler flags for DBUS_GLIB, overriding pkg-config
  DBUS_GLIB_LIBS
              linker flags for DBUS_GLIB, overriding pkg-config
  PYTHON      the Python interpreter
  LIBXML_CFLAGS
              C compiler flags for LIBXML, overriding pkg-config
  LIBXML_LIBS linker flags for LIBXML, overriding pkg-config
  SYSTEMD_CFLAGS
              C compiler flags for SYSTEMD, overriding pkg-config
  SYSTEMD_LIBS
              linker flags for SYSTEMD, overriding pkg-config
  VALGRIND_CFLAGS
              C compiler flags for VALGRIND, overriding pkg-config
  VALGRIND_LIBS
              linker flags for VALGRIND, overriding pkg-config
  XMKMF       Path to xmkmf, Makefile generator for X Window System
  MAN2HTML    Path to man2html (optional)

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=dbus>.
 
Old 04-23-2013, 04:01 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
I'm sure you intended to help, but I'm not the brightest bulb in the pack. Would you please be more specific? Thanks.
 
1 members found this post helpful.
Old 04-23-2013, 04:13 PM   #4
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Rep: Reputation: Disabled
Quote:
Originally Posted by Woodsman View Post
I'm sure you intended to help, but I'm not the brightest bulb in the pack. Would you please be more specific? Thanks.
Code:
SLKCFLAGS="-O2 -fPIC -rdynamic"
 
Old 04-23-2013, 04:46 PM   #5
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
That is essentially the same thing I posted in my original post, but I tried anyway. Still no backtrace.
 
Old 04-23-2013, 05:56 PM   #6
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Rep: Reputation: Disabled
I think you need only this configure options
Code:
./configure --prefix=/usr \
	--with-dbus-user=dbus \
	--localstatedir=/var \
	--with-x
 
Old 04-24-2013, 01:51 PM   #7
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Thanks, but that does not help.
 
Old 04-24-2013, 01:54 PM   #8
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Rep: Reputation: Disabled
Quote:
Originally Posted by Woodsman View Post
Thanks, but that does not help.
Ok add this option to configure
Code:
--enable-verbose-mode
 
Old 04-24-2013, 03:18 PM   #9
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
I already tried that too.
 
Old 04-24-2013, 09:22 PM   #10
the3dfxdude
Member
 
Registered: May 2007
Posts: 328

Rep: Reputation: 96
Woodsman, I traced the message from the code backwards...

In dbus/dbus-sysdeps-unix.c

if ! defined (DBUS_BUILT_R_DYNAMIC)
fprintf (stderr, " D-Bus not built with -rdynamic so unable to print a backtrace\n");

Running configure with no options gave me in config.h
#undef DBUS_BUILT_R_DYNAMIC

In configure.ac:

if test x$enable_asserts = xno; then
AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking])
R_DYNAMIC_LDFLAG=""
else
# -rdynamic is needed for glibc's backtrace_symbols to work.
# No clue how much overhead this adds, but it's useful
# to do this on any assertion failure,
# so for now it's enabled anytime asserts are (currently not
# in production builds).

# To get -rdynamic you pass -export-dynamic to libtool.
AC_DEFINE(DBUS_BUILT_R_DYNAMIC,1,[whether -export-dynamic was passed to libtool])
R_DYNAMIC_LDFLAG=-export-dynamic
fi

So run ./configure --enable-asserts

Just my guess; didn't try it. So you don't need to set CFLAGS. It's actually LDFLAGS, but configure is supposed to do it for you with the right switch.

Oh btw, make sure you don't strip the binaries...

Last edited by the3dfxdude; 04-24-2013 at 09:23 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP compile error - bug report needs backtrace - how to do this? jpmad4it Linux - Software 0 02-20-2009 02:17 AM
dbus "rm /var/run/dbus/Desktop can't remove..." longus Slackware 6 12-15-2008 03:33 AM
Fedora Core 9 update dbus.exception & dbus.proxies & DBus.Error.AccessDenied errors trien27 Fedora 1 12-08-2008 11:23 PM
how to Compile for NSS support behzady Linux - Software 0 07-01-2008 02:23 AM
how to compile bttv support? ratbert90 Slackware 1 11-11-2003 05:44 PM


All times are GMT -5. The time now is 02:30 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration