"how to use debug libraries on ubuntu" Code Answer

5

1) when i need to dig into a library that i installed through a package, the first thing i do is install it from source. i mean configur/make/make install. i typically put the source code in /usr/local/src and install it in /usr/local . this, in my opinion is the most reliable way of running the exact code for which you have the source.

3)

how to use the debug version i managed to compile?

this sounds like you did what i described above. what you need to do is make sure that your software is using the include and link directories that are hosting your compiled, debug enabled, library. meaning making sure that -i/usr/local/include and -l /usr/local/lib flags are set and they come before /usr/include and /usr/lib.

you can be even more certain by removing the binary version of the libraries from the ubuntu installation, making sure that that version that you built and installed is the only version present on the hard disk. this way you will know for sure that you were able to configure your app to use that library. otherwise it'll just fail, instead of you constantly wondering whether it's using the new library or the old library.

2) typically yes. but it'd depend on how the library is written, and what the ubuntu packager decided to do.

once you compile the program using your locally built library, see if you are getting the same exact error first. if not then that is also a data point. maybe the problem got fixed since the last time ubuntu packaged the library. maybe the library is not packaged properly and that's the problem. you might even get new errors, because the ubuntu packager configured the library a certain way so that it'd work and you didn't do the same thing. you will get interesting leads anyway.

good luck

By edrian on April 23 2022

Answers related to “how to use debug libraries on ubuntu”

Only authorized users can answer the Search term. Please sign in first, or register a free account.