Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdb: fix expat search on some hosts #4222

Merged
merged 1 commit into from
Feb 22, 2020
Merged

Conversation

jernejsk
Copy link
Member

@jernejsk jernejsk commented Feb 20, 2020

If /usr/lib/libexpat.so exists on host, it's picked instead of that from LE build system. From what I can tell, this issue was present before. However, in older configure logs only warning is issued but now error is returned.

Give search path for expat explicitly. This solves issue on some hosts where expat is present in system. Previously expat was set on auto and gdb configure only printed a warning. But now that it's set to "yes" configure script fails if expat isn't found.

@dhewg
Copy link
Contributor

dhewg commented Feb 21, 2020

@MilhouseVH
Copy link
Contributor

Prior to the bump, expat support defaulted to auto which most probably explains why it hasn't been fatal until now.

I don't have the expat libs installed on my Ubuntu build host(s), so my own builds successfully found the LE expat libs once I forced this option to be ON. Sorry, my bad.

The fix suggested by @dhewg is likely the best option, and just means the following change:

-                           --with-expat=yes \
+                           --with-expat=yes --with-libexpat-prefix=${SYSROOT_PREFIX}/usr \

in gdb/package.mk - @jernejsk can you try that?

This results in:

checking for libexpat... yes
checking how to link with libexpat... /home/ubuntu/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.80-devel/toolchain/armv7ve-libreelec-linux-gnueabihf/sysroot/usr/lib/libexpat.so -Wl,-rpath -Wl,/home/ubuntu/projects/LibreELEC.tv/build.LibreELEC-RPi2.arm-9.80-devel/toolchain/armv7ve-libreelec-linux-gnueabihf/sysroot/usr/lib
checking for XML_StopParser... yes

which seems to work...

Although I suspect it's somewhat unlikely anyone will need the features supported by expat:

https://sourceware.org/gdb/current/onlinedocs/gdb/Requirements.html

but since we've included it in the past, I guess we should continue...

@jernejsk
Copy link
Member Author

@MilhouseVH That works, but I don't think we need it. I can give similar argument, for me (and surely for some other people) was never enabled.

@MilhouseVH
Copy link
Contributor

I have no objection if you leave it disabled. :)

@jernejsk jernejsk changed the title gdb: remove expat as dependency gdb: fix expat search on some hosts Feb 22, 2020
@MilhouseVH MilhouseVH merged commit d8b1f40 into LibreELEC:master Feb 22, 2020
@jernejsk jernejsk deleted the gdb branch March 19, 2020 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants