From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 03 14:09:31 2021 Received: (at submit) by debbugs.gnu.org; 3 Sep 2021 18:09:31 +0000 Received: from localhost ([127.0.0.1]:45888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMDd4-000516-M2 for submit@debbugs.gnu.org; Fri, 03 Sep 2021 14:09:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:35194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMDd1-00050y-Vk for submit@debbugs.gnu.org; Fri, 03 Sep 2021 14:09:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mMDcz-00036z-Fx for bug-guix@gnu.org; Fri, 03 Sep 2021 14:09:27 -0400 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]:46839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mMDcx-0003Ee-9F for bug-guix@gnu.org; Fri, 03 Sep 2021 14:09:25 -0400 Received: by mail-qk1-x733.google.com with SMTP id m21so6633036qkm.13 for ; Fri, 03 Sep 2021 11:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=ojUZkgvMNmhHOyWFTEgCSsawlW6YiXyrW+fMJu3TXF4=; b=cE1Fiu/Kh65xwQGntUiWwbScnz5bsnkaBqaWIDra2bUfHqgtOSoHFiJ4f3WDac95DN 4+iaNWHVwEbGe2flQKCUtcMTt4hxSyMJss8nM+aAvP1X1HZmBCWvtUx2nITiBqQexhLw CIrhS9tfWH0gtofGKCYP+B1XspczMXoYAIjww2Luz7bXq9KHScEb6T/JrFmCDfFcas/8 M0RdWD1KM1tVa64VR/gzQdzGpju2uq2ePmUSxg3MaAOkARRAnQjxat5oiAwZchX5b93k zhaBnm/dmFgBX485OkIXlwJixiekGXnXJ1K118uwQt7y+B+ypJa9RgoKPBaf3gOZSuz4 uAiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=ojUZkgvMNmhHOyWFTEgCSsawlW6YiXyrW+fMJu3TXF4=; b=V8JnPSUnEFtDRI3rxLYiX6DYTZOgowJXbb8AxHOzaBsQnG61PmMUfwY1h/q2j2PEbl H/gmOZDuHcyB95Q0Tu3xPGi62SXscGZKf0cgAFDFvn7Z8OIeKcPJYilBCN+v1dA6AiTc kZuRNZJOZH1mdFYPa1pxdXbpJhQw0H7ThOlSyY4o5IPZeSUCWA3JAK0kbu23z1nPSaFw 5YIpDK4qM5Zg3cTonsd9ozzGDLu932odqVH/ZyQXnfJqSYnr2DyowpcBjnCj/LDK+mLu vNhraAwPBmn0+mYlyncRTCy3nlW61jl5T6bxBfqOFl5BRcmCGE8nvI2RlbW2qK8UNURU OkzA== X-Gm-Message-State: AOAM532QFAJUZEr0LlWOgQ8uiu8SNqtTaL0qa8HzTR4jbBrpbSCiQOP1 Cn/2wLZ1jf5Z71wuVaKCeDhJAokkJxM= X-Google-Smtp-Source: ABdhPJwVWC5I4N/kYoh6dnsCrCkKJzRXi9JSk9sJGhii1XvdhELoEFq3eFL6UiP4kwBkVaT6+3UgJw== X-Received: by 2002:a37:b6c1:: with SMTP id g184mr136449qkf.270.1630692561769; Fri, 03 Sep 2021 11:09:21 -0700 (PDT) Received: from hurd ([207.35.94.150]) by smtp.gmail.com with ESMTPSA id u7sm31604qtc.75.2021.09.03.11.09.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 11:09:21 -0700 (PDT) From: Maxim Cournoyer To: bug-guix Subject: Linphone symbolic link for liblinphone hampers debugging Date: Fri, 03 Sep 2021 14:09:20 -0400 Message-ID: <87ilzhbkfj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::733; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x733.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 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: . Find the GDB manual and other documentation resources online at: . 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