GNOME Bugzilla – Bug 741359
check.h distributed unnecessarily
Last modified: 2014-12-16 15:33:02 UTC
I found recently that check.h is distributed in the tarballs: ./gstreamer-1.5.0.1/libs/gst/check/libcheck/check.h This file is actually generated by configure from check.h.in in the same directory so it is not necessary to distribute it. Moreover since the latest libcheck 0.9.14 updates the contents of this file have actually changed which means that there is a slim chance that you may see compilation errors.
Created attachment 292484 [details] [review] Proposed patch.
If that file is autogenerated, we should replace our internal-check.h file with that one. At least it looks like that is the same file :)
I don't remember why I added the internal-check.h, but I'm sure there was a reason :) Anyway, what's to be done here now?
I think we should just get rid of the internal-check.h then and use libcheck/check.h. Less risk of things in the build system breaking.
Alright, then I'll try to whip up a patch that does that. :)
Created attachment 292693 [details] [review] Proposed patch. Well... I failed in my attempts to generate a check.h as it would clobber an existing check.h. So instead I opted for generating an internal-check.h directly. This had the conequence of requiring libcheck code to include internal-check.h instead. But maybe this is ok? Compiles on Linux, builds and runs the check tests, distcheck works fine, as does compiling the contents of the tarball. I most likely have missed something, but I'm not sure of what exactly.
Comment on attachment 292484 [details] [review] Proposed patch. I forgot to obsolete the old patch.
It clobbered which existing check.h?
libs/gst/check/check.h. This is really difficult to explain, but let me try: So we are talking about these files: libs/gst/check/libcheck/check.h.in --generates--> libs/gst/check/libcheck/check.h libs/gst/check/libcheck/check.h --included-by-> libs/gst/check/libcheck/*.[ch] libs/gst/check/libcheck/check.h --copied-to--> libs/gst/check/internal-check.h libs/gst/check/internal-check.h --included-by--> libs/gst/check/gstcheck.h libs/gst/check/gstcheck.h --included-by--> libs/gst/check/check.h libs/gst/check/check.h --included-by-> all unit tests By using autotools I can change this to: libs/gst/check/libcheck/check.h.in --generates--> libs/gst/check/check.h libs/gst/check/libcheck/check.h --included-by-> libs/gst/check/libcheck/*.[ch] libs/gst/check/check.h --included-by--> libs/gst/check/gstcheck.h libs/gst/check/gstcheck.h --included-by--> libs/gst/check/check.h (This is the problem) libs/gst/check/check.h --included-by-> all unit tests (This is also the problem) But since check.h can not be used to contain both the generated contents and the manually created check.h I opted to keep the file name internal-check.h: libs/gst/check/libcheck/check.h.in --generates--> libs/gst/check/internal-check.h libs/gst/check/internal-check.h --included-by-> libs/gst/check/libcheck/*.[ch] (Diverges more from upstream libcheck) libs/gst/check/internal-check.h --included-by--> libs/gst/check/gstcheck.h libs/gst/check/gstcheck.h --included-by--> libs/gst/check/check.h libs/gst/check/check.h --included-by-> all unit tests In this last example we refrain from copying internal-check.h to check.h, but at the cost of diverging from upstream a bit more.
Ah I see, it conflicts with our own single-include check.h. Seems fine to me then. Tim?
Sure, whatever works.
Created attachment 292772 [details] [review] Proposed patch As per slomo's suggestion move the generated internal-check.h from libs/gst/check/libcheck to libs/gst/check. Appears to compile well, make check works as does make distcheck and compiling the resulting tarball, making check from it as well as installing the compiled tarball. I hope I have tested everything now.
commit 0b09573bbec99a2474d5ff41e2cf1be8147ecd60 Author: Sebastian Rasmussen <sebras@hotmail.com> Date: Sun Dec 14 12:54:32 2014 +0100 check: Have autotools generate internal-check.h Previously GStreamer got access to the libcheck interface by including libs/gst/check/check.h which in turn included internal-check.h in the same directory. internal-check.h was generated by copying libs/gst/check/libcheck/check.h which in turn was generated from check.h.in in the same directory. In this case generating libs/gst/check/libcheck/check.h is unnecessary, in addition this file was accidentally distributed in generated project tarballs. Now libs/gst/check/internal-check.h is generated directly from libs/gst/check/libcheck/check.h.in by configure. This means that the libcheck source must include internal-check.h instead of the previously generated libs/gst/check/libcheck/check.h. However the unnecessary intermediate step is now skipped. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741359