Bug#876901: QFINDTESTDATA uses __FILE__

Lisandro Damián Nicanor Pérez Meyer perezmeyer at gmail.com
Thu Nov 16 13:44:30 UTC 2017

On jueves, 16 de noviembre de 2017 13:22:00 -03 Ximin Luo wrote:
> I pointed to the various C standards documents, as well as documentation
> from multiple compilers, stating that __FILE__ is the "name of the source
> file" and in no way guarantees that the expansion can later be re-used as
> the path to an actual file. GCC documentation even explicitly states the
> expansion is arbitrarily chosen by the implementation of the preprocessor,
> and is explicitly "not [..] the input file name argument".

OK, let's agree we do not agree here.

> So I do consider this a bug in the QT test suite.
> The ideal solution would be to not use __FILE__ - that has numerous other
> benefits as well. But if this is too complex to change, I also suggested a
> 1-line addition to d/rules - which I agree would be "papering over" the
> issue. However, it's a simple 1-line change so I don't understand why there
> is so much resistance to it.

Because it means diverging from upstream and that causes us *lots* of 
headaches when trying to solve unit tests issues with upstream's help.

> There are several other possible solutions, all of which are low-cost and
> unintrusive, and could be done in a QT build helper in one single place:
> - define a custom macro, QT_TEST_SOURCE_BASE, and set that in the test build
> scripts, instead of using __FILE__ - export
> symlink "$srcpkg-$version" -> "."
> I would be very happy to send you the patches myself if you don't want to do
> the work, since writing 1-line patches to a few QT projects, costs far less
> time than patching 1800 packages across Debian.

Let me propose you something: create a suitable patch for upstream that makes 
stuff work no matter the distro not OS. As I do think your approach is not 
correct you should push it yourself, see


for knowing how to contribute it.

May the source be with you.

Lisandro Damián Nicanor Pérez Meyer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20171116/a90c9df4/attachment.sig>

More information about the Reproducible-builds mailing list