我正在尝试从源代码安装程序,但一直收到与 libelf 相关的错误。该程序是 Dynamips 的一个研究修改版本,来自: https://github.com/Groundworkstech/dynamips-gdb-mod。它已经有几年历史了,白皮书指出作者也必须更新对 libelf 的引用(见http://grid32.com/bb095447484a76e5c74d1...otkits.pdf)——但是我正在运行适用于 ubuntu 16.04 TLS 的最新 elfutils。
完整错误消息输出:
#DYNAMIPS_ARCH=amd64 make
Linking dynamips
/usr/lib/x86_64-linux-gnu/libelf.a(elf_compress.o): In function `deflate_cleanup.6929':
(.text+0x11): undefined reference to `deflateEnd'
/usr/lib/x86_64-linux-gnu/libelf.a(elf_compress.o): In function `__libelf_compress':
(.text+0x15e): undefined reference to `deflateInit_'
/usr/lib/x86_64-linux-gnu/libelf.a(elf_compress.o): In function `__libelf_compress':
(.text+0x26d): undefined reference to `deflate'
/usr/lib/x86_64-linux-gnu/libelf.a(elf_compress.o): In function `__libelf_compress':
(.text+0x2e2): undefined reference to `deflateEnd'
/usr/lib/x86_64-linux-gnu/libelf.a(elf_compress.o): In function `__libelf_decompress':
(.text+0x467): undefined reference to `inflateInit_'
/usr/lib/x86_64-linux-gnu/libelf.a(elf_compress.o): In function `__libelf_decompress':
(.text+0x492): undefined reference to `inflate'
/usr/lib/x86_64-linux-gnu/libelf.a(elf_compress.o): In function `__libelf_decompress':
(.text+0x49f): undefined reference to `inflateReset'
/usr/lib/x86_64-linux-gnu/libelf.a(elf_compress.o): In function `__libelf_decompress':
(.text+0x4b3): undefined reference to `inflateEnd'
collect2: error: ld returned 1 exit status
Makefile:228: recipe for target 'dynamips' failed
make: *** [dynamips] Error 1