Skip to content

Commit

Permalink
gdb: Rebuild
Browse files Browse the repository at this point in the history
gdb produces a warning messages on startup:

    buczek@sigusr2:~$ gdb
    Traceback (most recent call last):
      File "/usr/share/gdb/python/gdb/__init__.py", line 143, in auto_load_packages
        __import__(modname)
      File "/usr/share/gdb/python/gdb/command/frame_filters.py", line 21, in <module>
        import copy
      File "/usr/local/system/python-2.7.16-0/lib/python2.7/copy.py", line 52, in <module>
        import weakref
      File "/usr/local/system/python-2.7.16-0/lib/python2.7/weakref.py", line 14, in <module>
        from _weakref import (
    ImportError: cannot import name _remove_dead_weakref

This seems to be related to an incompatibility between the include files
from python 2.7.16 from /usr/local/system/python2 and /usr/lib/libpython2.7.so
from python2_compat which is based on python 2.7.11.

Add -L to use correct library at link time.
Add -Wl,-rpath= to use correct library at run time.
  • Loading branch information
donald committed Oct 2, 2019
1 parent 4b21519 commit 1907b76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gdb.be0
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env beesh

# BEE_VERSION gdb-8.3.1-0
# BEE_VERSION gdb-8.3.1-1

SRCURL[0]="http://ftp.gnu.org/gnu/gdb/gdb-${PKGVERSION}.tar.xz"

Expand All @@ -20,7 +20,9 @@ SRCURL[0]="http://ftp.gnu.org/gnu/gdb/gdb-${PKGVERSION}.tar.xz"
#}

mee_configure() {
bee_configure --with-python=/usr/local/system/python2
bee_configure --with-python=/usr/local/system/python2 \
CFLAGS="-L/usr/local/system/python2/lib -Wl,-rpath=/usr/local/system/python2/lib" \
CXXFLAGS="-L/usr/local/system/python2/lib -Wl,-rpath=/usr/local/system/python2/lib"
}

#mee_build() {
Expand Down

0 comments on commit 1907b76

Please sign in to comment.