New: gdb fails to build with xz and expat support at the same
https://bugs.busybox.net/show_bug.cgi?id=8786
Bug ID: 8786
Summary: gdb fails to build with xz and expat support at the
same
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: vincent.riera at imgtec.com
CC: buildroot at uclibc.org
Target Milestone: ---
For some reason gdb fails to build with xz and expat support at the same time when using an external toolchain.
This is how the problem is shown:
checking for liblzma... no
configure: error: missing liblzma for --with-lzma
Try this defconfig if you want to reproduce the problem:
BR2_x86_64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_XZ=y
BR2_PACKAGE_GDB=y
BR2_PACKAGE_GDB_DEBUGGER=y
BR2_PACKAGE_EXPAT=y
Using the above defconfig, the error in the gdb/config.log will look like this:
configure:13241: checking whether to use lzma configure:13243: result: yes
configure:13657: checking for liblzma
configure:13678: /br/output/host/usr/bin/i686-pc-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -I/br/output/host/usr/x86_64-buildroot-linux-gnu/sysroot/usr/include -static-libstdc++ -static-libgcc conftest.c -ldl -ldl -lncurses -lm
-ldl /usr/lib/liblzma.so >&5/lib64/liblzma.so.5: undefined reference to `clock_gettime at GLIBC_2.17'
collect2: error: ld returned 1 exit status
You can also use this defconfig to reproduce the problem for MIPS:
BR2_mips=y
BR2_mips_32r2=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_XZ=y
BR2_PACKAGE_GDB=y
BR2_PACKAGE_GDB_DEBUGGER=y
BR2_PACKAGE_EXPAT=y
In that case the error will look like this:
configure:13241: checking whether to use lzma
configure:13243: result: yes
configure:13657: checking for liblzma
configure:13678: /br/output/host/usr/bin/mips-linux-gnu-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os
-I/br/output/host/usr/mips-buildroot-linux-gnu/sysroot/usr/include
-static-libstdc++ -static-libgcc conftest.c -ldl -ldl -lncurses -lm
-ldl /usr/lib/liblzma.so >&5
/br/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.2.0/../../../../mips-linux-gnu/bin/ld:
skipping incompatible /lib64/liblzma.so.5 when searching for/lib64/liblzma.so.5 /br/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.2.0/../../../../mips-linux-gnu/bin/ld:
cannot find /lib64/liblzma.so.5
collect2: error: ld returned 1 exit status
You can also use this defconfig to reproduce the problem for ARM:
BR2_arm=y
BR2_cortex_a7=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_XZ=y
BR2_PACKAGE_GDB=y
BR2_PACKAGE_GDB_DEBUGGER=y
BR2_PACKAGE_EXPAT=y
In that case the error will look like this:
configure:13241: checking whether to use lzma configure:13243: result: yes
configure:13657: checking for liblzma
configure:13678: /br/output/host/usr/bin/arm-linux-gnueabihf-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -I/br/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include -static-libstdc++ -static-libgcc conftest.c -ldl -ldl -lncurses -lm
-ldl /usr/lib/liblzma.so >&5/lib64/liblzma.so.5: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 8786] gdb fails to build with xz and expat support at the same
https://bugs.busybox.net/show_bug.cgi?id=8786
--- Comment #1 from Thomas Petazzoni <[email protected]> --- The problem seems related to the fact that you have lzma installed on your build machine, including the development files.
I've tested your last defconfig (on ARM), and I'm not able to reproduce, either with lzma development files installed or not installed.
The failure:
/lib64/liblzma.so.5: undefined reference to `clock_gettime at GLIBC_2.17'
is related to the fact that it finds your host lzma, tries to link with it, but fails because it lacks -lrt.
Can you try --with-lzma-prefix=$(HOST_DIR)/usr in GDB_CONF_OPTS ?
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 8786] gdb fails to build with xz and expat support at the same
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=8786
--- Comment #2 from Vicente Olivert Riera <[email protected]> --- That fixes the problem. I've sent a patch:
http://patchwork.ozlabs.org/patch/595861/
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 8786] gdb fails to build with xz and expat support at the same
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=8786
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED--- Comment #3 from Thomas Petazzoni <[email protected]> --- Fixed in e6a29a4f3c48b13fde2214365067e34fbb92cfd6.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.