gdb: specify where to find lzma libraries
PATCH 1/1 gdb: specify where to find lzma libraries
As reported in...
https://bugs.busybox.net/show_bug.cgi?id=8786
..., 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
And having a deeper look in gdb/config.log we can se a message like this one:
/lib64/liblzma.so.5: undefined reference to `clock_gettime at GLIBC_2.17'
As Thomas said in the bug report quoted above, that error is related to the fact that it find the host's lzma.
Adding --with-lzma-prefix=$(HOST_DIR)/usr to GDB_CONF_OPTS fixes the problem.
Credit-to: Thomas Petazzoni <[email protected]>
--- package/gdb/gdb.mk | 1 + 1 file changed, 1 insertion(+)
package/gdb/gdb.mk +1 -0
@@ -120,6 +120,7 @@ endif ifeq ($(BR2_PACKAGE_XZ),y) GDB_CONF_OPTS += --with-lzma +GDB_CONF_OPTS += --with-liblzma-prefix=$(HOST_DIR)/usr GDB_DEPENDENCIES += xz else GDB_CONF_OPTS += --without-lzma
Signature · 1 line
2.4.10
PATCH 1/1 gdb: specify where to find lzma libraries
Quoted 35 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Vicente" == Vicente Olivert Riera <[email protected]> writes:
As reported in...
https://bugs.busybox.net/show_bug.cgi?id=8786..., 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-lzmaAnd having a deeper look in gdb/config.log we can se a message like this one:
/lib64/liblzma.so.5: undefined reference to `clock_gettime at GLIBC_2.17'As Thomas said in the bug report quoted above, that error is related to the fact that it find the host's lzma.
Adding --with-lzma-prefix=$(HOST_DIR)/usr to
GDB_CONF_OPTSfixes the problem.Credit-to: Thomas Petazzoni <[email protected]>
Signed-off-by Vicente Olivert Riera <[email protected]>--- package/gdb/gdb.mk | 1 + 1 file changed, 1 insertion(+)package/gdb/gdb.mk +0
-0
package/gdb/gdb.mk endif · line 123
Quoted 4 lines
package/gdb/gdb.mk +1
-0@@ -120,6 +120,7 @@ endif ifeq ($(BR2_PACKAGE_XZ),y) GDB_CONF_OPTS += --with-lzma +GDB_CONF_OPTS += --with-liblzma-prefix=$(HOST_DIR)/usr
But GDB_CONF_OPTS is for gdb for the target, so HOST_DIR/usr doesn't seem right?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 gdb: specify where to find lzma libraries
Hello,
Quoted 6 lines · Peter Korsgaard
Quoted 3 lines
ifeq ($(BR2_PACKAGE_XZ),y)
GDB_CONF_OPTS+= --with-lzma
+GDB_CONF_OPTS += --with-liblzma-prefix=$(HOST_DIR)/usrBut
GDB_CONF_OPTSis for gdb for the target, so HOST_DIR/usr doesn't seem right?
Gaah, yes, indeed. My suggestion in the bug report was done quickly while at work. --with-liblzma-prefix=$(HOST_DIR)/usr should indeed be passed in HOST_GDB_CONF_OPTS.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com