[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using Qt debug libraries without configure and qmake

On 18/11/11 00:07, Neil Williams wrote:
On Thu, 17 Nov 2011 20:01:42 +0000
Philip Ashmore<contact@philipashmore.com>  wrote:

On 17/11/11 14:56, Neil Williams wrote:
The path doesn't matter that much, as long as the debugger can find a
filename which at least matches the end of the path. i.e. work
backwards and use the best match. This isn't down to Debian, it is down
to how gcc and gdb work together and how developers need to use gdb or
other tools frontending gdb to set the path to the unpacked sources.
Some tools do it better than others, especially when considering how to
follow a call down through a couple of different libraries.

You mean as long as the user knows where the sources are supposed to be
installed, such as
$ apt-get source

That puts the unpacked source exactly where the user expects - in the
current directory.

You'd need to be root to put the unpacked source into /usr/src using
apt-get source and that is NOT good advice.

There are binary packages which *install* the source into /usr/src but
that isn't the default. This is about getting the source of typical,
routine Qt applications and libraries. *That* is what you get from
deb-src URL's. Packages which unpack to /usr/src will come from deb
repositories NOT deb-src.

, presuming they are even installed or the user downloaded (the matching
version of) them.
apt-get source - it always gives you the matching version, that's the
presuming you've done apt-get upgrade, which requires elevated(root)

The debugger will only find the file itself if the debugging information
contains an absolute path.
Not true. The debugger will look for the path you provide and try to
match the files according to the reverse lookup - much the same way as
so it won't find it itself based on the path provided in the debugging information.
Sometimes it's far from obvious which package a source file belongs to.
It would be great if the debugger could tell you.

The choice of root folder, for example /usr/src/foo-1.2 or
is Debian specific.
More commonly, /home/$USER/code/src/$PACKAGE etc.

The tools which Debian supplies should also use it so that the sources
get installed there.

Hopefully one day, the Debian build tools will alter the debugging
information to point to this
location regardless of where the sources really were when the package
was built.

Could this be a build option?
No, because the actual location varies according to user preference.
but unless you've built the package from source yourself, the debugging
information points to just one place - usually the location on the machine that
built it, not very useful.
I use /home/neil/code/debian/src or /home/neil/code/debian/qa/
or /home/neil/code/debian/rc, depending on why I'm debugging a
particular package. ./src/ for routine devleopment, ./qa/ for orphaned
packages and ./rc/ for release goals. Depending on exactly what is
going on, I could quite easily be debugging three different versions of
the same package in those directories and if I need to debug a fourth,
well it's trivial.

Also, if source packages from deb-src could be "installed", populating
/usr/src then that would
avoid having to package "source" binary packages, and be version-safe.
Forget about /usr/src, it isn't useful for the majority of packages.
Arbitrary directories specified by the user are the only way to allow
developers to debug against a variety of dependencies and in a variety
of situations. /usr/src is a privileged path, source does not need a
privileged path and is usually far better in a user path.

Qt applications or libraries do NOT use /usr/src.
I'm not a Fedora fan, but that's exactly what they do.
It's a de-facto Debian decision not to standardize on any install path, which is

Don't forget, some people have accounts on multi-user systems, and filling
their home directory with package sources is something they simply cannot do
for space reasons, and even if they could, it duplicates downloads and storage.

Yes, I realise this isn't Qt specific.

With respect, have you had a look at


Reply to: