unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 50360@debbugs.gnu.org
Subject: bug#50360: Linphone symbolic link for liblinphone hampers debugging
Date: Fri, 03 Sep 2021 14:09:20 -0400	[thread overview]
Message-ID: <87ilzhbkfj.fsf@gmail.com> (raw)

Hello,

I was trying to get a good backtrace for a segfault in linphone-desktop
(see http://issues.guix.gnu.org/47641).  So I added a debug output for
liblinphone, and did the following:

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix environment --ad-hoc linphone-desktop \
               linphone-desktop:debug liblinphone liblinphone:debug --no-grafts
--8<---------------cut here---------------end--------------->8---

The --no-grafts is to workaround http://issues.guix.gnu.org/48907.

Then I did the usual dance to get the GDB symbols resolved:

--8<---------------cut here---------------start------------->8---
export GDB_DEBUG_FILE_DIRECTORY=$GUIX_ENVIRONMENT/lib/debug

[env]$ cat $GUIX_ENVIRONMENT/bin/linphone 
#!/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
export XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}/gnu/store/jlzdmlrmsrgxqj9yw1i1zy4lrf3r9d1n-linphone-desktop-4.2.5/share:/gnu/store/k4vz4pk664fz4mf1amdzvd7w7315wwr6-liblinphone-4.4.34/share"
export QT_PLUGIN_PATH="/gnu/store/b90sxi7aphibx6amwqx2nqljjv0yp5wg-qtbase-5.15.2/lib/qt5/plugins:/gnu/store/5s66rhnjys6qq8hdff9sy3dzy40fgxji-qtdeclarative-5.15.2/lib/qt5/plugins:/gnu/store/11vb2q2kbi8aym0fx52h5inish61mzp6-qtsvg-5.15.2/lib/qt5/plugins${QT_PLUGIN_PATH:+:}$QT_PLUGIN_PATH"
export QML2_IMPORT_PATH="/gnu/store/5s66rhnjys6qq8hdff9sy3dzy40fgxji-qtdeclarative-5.15.2/lib/qt5/qml:/gnu/store/r8rpn1jclizv7a6s7c3ngblanmn9v52i-qtgraphicaleffects-5.15.2/lib/qt5/qml:/gnu/store/3rasi4dmffay6mkxhmy2xwdl1pr46wvr-qtquickcontrols-5.15.2/lib/qt5/qml:/gnu/store/baanczaq0s2yqdq7812ydkjmvnk7jl1z-qtquickcontrols2-5.15.2/lib/qt5/qml${QML2_IMPORT_PATH:+:}$QML2_IMPORT_PATH"
exec -a "$0" "/gnu/store/jlzdmlrmsrgxqj9yw1i1zy4lrf3r9d1n-linphone-desktop-4.2.5/bin/.linphone-real" "$@"

# Copying the exports
[env]$ export XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}/gnu/store/jlzdmlrmsrgxqj9yw1i1zy4lrf3r9d1n-linphone-desktop-4.2.5/share:/gnu/store/k4vz4pk664fz4mf1amdzvd7w7315wwr6-liblinphone-4.4.34/share"
export QT_PLUGIN_PATH="/gnu/store/b90sxi7aphibx6amwqx2nqljjv0yp5wg-qtbase-5.15.2/lib/qt5/plugins:/gnu/store/5s66rhnjys6qq8hdff9sy3dzy40fgxji-qtdeclarative-5.15.2/lib/qt5/plugins:/gnu/store/11vb2q2kbi8aym0fx52h5inish61mzp6-qtsvg-5.15.2/lib/qt5/plugins${QT_PLUGIN_PATH:+:}$QT_PLUGIN_PATH"
export QML2_IMPORT_PATH="/gnu/store/5s66rhnjys6qq8hdff9sy3dzy40fgxji-qtdeclarative-5.15.2/lib/qt5/qml:/gnu/store/r8rpn1jclizv7a6s7c3ngblanmn9v52i-qtgraphicaleffects-5.15.2/lib/qt5/qml:/gnu/store/3rasi4dmffay6mkxhmy2xwdl1pr46wvr-qtquickcontrols-5.15.2/lib/qt5/qml:/gnu/store/baanczaq0s2yqdq7812ydkjmvnk7jl1z-qtquickcontrols2-5.15.2/lib/qt5/qml${QML2_IMPORT_PATH:+:}$QML2_IMPORT_PATH"

# Then invoking the actual binary
[env]$ gdb --args $GUIX_ENVIRONMENT/bin/.linphone-real --verbose
GNU gdb (GDB) 10.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /gnu/store/hmgy2vk1g1qjd7r0r5hk2m4csyj97ybx-profile/bin/.linphone-real...
Reading symbols from /gnu/store/hmgy2vk1g1qjd7r0r5hk2m4csyj97ybx-profile/lib/debug//gnu/store/jlzdmlrmsrgxqj9yw1i1zy4lrf3r9d1n-linphone-desktop-4.2.5/bin/.linphone-real.debug...
--8<---------------cut here---------------end--------------->8---

But the liblinphone.so symbol table was not found.

This is due to linphone-desktop symlinking the lib/ directory of
liblinphone directly under its own, to workaround some FHS bogus
assumption.  GDB only knows the shared library from that location (it
doesn't dereference symlink) and fails to find the symbols.

Thanks,

Maxim




                 reply	other threads:[~2021-09-03 18:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilzhbkfj.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=50360@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).