ฉันกำลังพยายามสร้าง gdb 10.1 ล่าสุดจากแหล่งที่มา
[เหตุผลของฉันที่ต้องการทำคือฉันกำลังพยายามดีบักโปรแกรมที่ลิงก์ไปยังบิลด์ที่กำหนดเองของ Python 2.7.18 และระบบของฉัน gdb เชื่อมโยงกับบิลด์ของ Python 2.7.5 ในไดเร็กทอรี /lib64 ของฉันและ ใช้งานไม่ได้กับเวอร์ชันที่ใหม่กว่า]
หลังจากอ่านไฟล์ README แล้ว ฉันได้กำหนดค่าโดยใช้:
../gdb-10.1/configure --with-python=<path to my 2.7.18 installation> --prefix=<path to where I want the new gdb to go>
...แล้ววิ่ง
make all install
...ตามคำแนะนำ อย่างไรก็ตาม ความพยายามทุกครั้งในการสร้างนั้นล้มเหลวด้วยข้อความแสดงข้อผิดพลาดของแบบฟอร์ม:
python/py-arch.o: In function `gdbarch_to_arch_object(gdbarch*)':
.../build/gdb/../../../gdb-10.1/gdb/python/py-arch.c:86: undefined reference to `_Py_RefTotal'
python/py-arch.o: In function `gdbpy_ref_policy<_object>::decref(_object*)':
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_RefTotal'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_NegativeRefcount'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_Dealloc'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_RefTotal'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_RefTotal'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_RefTotal'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_NegativeRefcount'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_Dealloc'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_RefTotal'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_Dealloc'
.../build/gdb/../../../gdb-10.1/gdb/python/py-ref.h:36: undefined reference to `_Py_NegativeRefcount'
ในการตรวจสอบผลลัพธ์ของขั้นตอนการกำหนดค่าและ Makefile เอง ฉันไม่พบการอ้างอิงใด ๆ เกี่ยวกับการติดตั้ง Python ที่ฉันระบุ ณ เวลากำหนดค่า (และที่ฉันวางไว้ที่ส่วนหัวของ LD_LIBRARY_PATH ของฉันด้วย เพื่อให้แน่ใจว่าคอมไพเลอร์ และลิงเกอร์สามารถค้นหาได้เมื่อสร้าง)
ฉันพลาดอะไรไปที่นี่?
grep PYTHON_CPPFLAGS /path/to/your/build/directory/gdb/config.log
(หรือconfig.status
) ตัวเลือก-I
อ้างถึงไดเร็กทอรีที่มีPython.h
หรือไม่ - person Mark Plotnick   schedule 27.10.2020config.log
ในไดเร็กทอรีbuild/gdb
เพื่อหาบรรทัดที่ขึ้นต้นด้วยchecking whether to use python
และchecking compiler flags for python code
และดูว่าโปรแกรมทดสอบสำเร็จหรือไม่ - person Mark Plotnick   schedule 27.10.2020.../configure
สำหรับทั้ง gdb และ python ให้เราหน่อยได้ไหม - person Mark Plotnick   schedule 28.10.2020