Unable to compile GDB with expat for use with remote debugging

Viewed 3516

I have been trying to compile a copy of GDB on 64 bit X86 Ubuntu for use with remote debugging of an ARM device. This means compiling GDB using expat; GDB uses XML parsing when connecting to a remote debugger. Here are some of the things I've tried, and the results.

Compile with just --with-expat

./configure --target=arm-none-eabi --with-expat 
make

....
checking whether to use expat... yes
checking for libexpat... (cached) no
configure: error: expat is missing or unusable
Makefile:9125: recipe for target 'configure-gdb' failed
....

Compile with --with-libexpat-prefix

ls -alg /usr/local/lib/*expat*
-rw-r--r-- 1 root 999128 Mar 20 23:55 /usr/local/lib/libexpat.a
-rwxr-xr-x 1 root    942 Mar 20 23:55 /usr/local/lib/libexpat.la
lrwxrwxrwx 1 root     17 Mar 20 23:55 /usr/local/lib/libexpat.so -> libexpat.so.1.6.0
lrwxrwxrwx 1 root     17 Mar 20 23:55 /usr/local/lib/libexpat.so.1 -> libexpat.so.1.6.0
-rwxr-xr-x 1 root 534224 Mar 20 23:55 /usr/local/lib/libexpat.so.1.6.0

./configure --target=arm-none-eabi --with-expat --with-libexpat-prefix=/usr/local/lib
make

....
checking whether to use expat... yes
checking for libexpat... (cached) no
configure: error: expat is missing or unusable
Makefile:9125: recipe for target 'configure-gdb' failed
....

I've tried to install expat in every way I can think of. The above library binaries are from a local compile of expat with make install; I've also done:

apt-get install libexpat1-dev
apt-get install expat

Both are already the newest version. Same results as above; I can only compile if I omit --with-expat and --with-libexpat-prefix.

Suggestions welcome. How can I find out more about the failure - how can I figure out how/where the make process is failing to find/approve of expat?

Fellow travellers (but I found no working answers here):

gdb building with expat

http://comments.gmane.org/gmane.comp.gdb.devel/29306

gdb remote cross debugging fails with "Remote 'g' packet reply is too long"

4 Answers

The version of gdb 8.3 has the same problem. I thought of various ways, but I still can't work. In the end, I used the 10.2 version and all the problems were gone. God bless you, Good luck.

Related