[sword-devel] SWORD 1.7.0RC2

Greg Hellings greg.hellings at gmail.com
Tue Aug 6 09:26:02 MST 2013


On Tue, Aug 6, 2013 at 11:12 AM, Troy A. Griffitts <scribe at crosswire.org>wrote:

>  Yes, quick lookup and paste for an example, but the problem is the same
> regardless of my mention of vtable:  The classes are different between the
> compiled objects and this is not a safe situation.
>
> My only mention of this is to show that we're not simply speaking of
> obtaining version information when discussion whether or not to use
> pkg-config.
>
> As I mentioned to Greg, my initial intent was to give you the define for
> which you asked in swversion.h but didn't want a 3rd place to have to
> change the version number for our package.  I'm happy to generate something
> with the autotools build system, but Greg would probably have to follow
> suite in coordination, or otherwise always rely on autotools generating
> this and we'll commit the generated file into the package, as we currently
> do with config.h.
>
> Regarding saving compile flags in a, e.g., swbuildoptions.h, I'm not amiss
> to this either, but this again would need to be coordinated between the
> autotools and the cmake builds.
>

CMake supports the same syntax as autotools for populating files such as
sword.pc. Since CMake already has the version information in the string
form, the only difficult part from my viewpoint is to properly parse that
into whatever final form we decide, whether that's a _MAJOR, _MINOR and
_PATCH or a single numeric version with expanded numbers of variables.

I already have examples of CMake handling version data in
cmake/FindCLucene.cmake around lines 82-99. And you can see that populating
sword.pc.in is as simple as a single call on line 52 of
cmake/install.cmake. So adding an additional file that we process is pretty
trivial for CMake as it was for autotools.

--Greg


>
> I am still of the impression that pkg-config is the right way to solve
> this problem, and the system which don't have pkg-config don't have a
> problem to solve.
>
> e.g., you are grabbing the source for SWORD and installing it and
> compiling it yourself.  You know exactly which options you've chosen to
> compile with, and you know exactly which version of SWORD you grabbed.
>
> In conclusion, I'm not against adding a new version define to swversion.h
> But we need to coordinate something between the make system managers.
>
> Troy
>
>
>
>
> On 08/06/2013 04:29 PM, Jaak Ristioja wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 06.08.2013 16:05, Troy A. Griffitts wrote:
>
>  For example, consider the following code:
>
> class Q_CORE_EXPORT QString { public: ... #ifndef QT_NO_REGEXP int
>  indexOf(const QRegExp &, int from = 0) const; int
> lastIndexOf(const QRegExp &, int from = -1) const; inline QBool
> contains(const QRegExp &rx) const { return QBool(indexOf(rx) !=
> -1); } int count(const QRegExp &) const;
>
> int indexOf(QRegExp &, int from = 0) const; int lastIndexOf(QRegExp
> &, int from = -1) const; inline QBool contains(QRegExp &rx) const {
> return QBool(indexOf(rx) != -1); } #endif
>
> ...
>
>
> If this library was compiled with QT_NO_REGEXP defined, and you
> include this header file in your project and build without
> QT_NO_REGEXP defined, then your .o files will expect different
> vtables than what are provided by the compiled library.
>
>  Ok, I think I must have misunderstood where the discussion ended up.
> First of all since none of the functions in that #ifndef block are
> virtual, there's no difference in the vtable. Secondly, during
> compilation time the situation you just described can be better
> circumvented in ways not requiring passing -Ddefines via pkg-config
> (see Greg's reply about config.h files). Thirdly, one usually gets a
> runtime warning like "Symbol _XTV1MyClass has different size in shared
> object, consider re-linking", or a dynamic linking error which
> prevents the program from starting. Proper precautions can be taken
> for most such cases to prevent any memory errors.
>
> Anyway, I'm not arguing against using pkg-config (or *.cmake files) to
> detect -I, -L and -l options which need to be passed to the
> compiler/linker. With -D and other stuff things might get a bit
> complicated. I still think that #defining a SWORD_VERSION macro should
> instead be done in some installed header file, at least for platforms
> without a working pkg-config (or for devs who don't know what
> pkg-config is or how to use it).
>
> Blessings,
> Jaak
>
> PS: Just for your information, I attached to this email a ABI
> compliance checker report for compatibility between Sword 1.6.2 and
> 1.7.0RC2. The tool gave me some compile errors so its output might not
> be fully reliable, but the file might still be informative.
> PPS: For good reading on shared libraries, see
>   http://www.akkadia.org/drepper/dsohowto.pdf
>   http://www.akkadia.org/drepper/goodpractice.pdf
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.20 (GNU/Linux)
>
> iQgcBAEBAgAGBQJSAQhUAAoJEEqsYmEt1rCOb1NAAMXMip28jilh+EJSFo5Iv7Yy
> ymkWJBod1tkTOq+wEPZU8yCX+6aSPxKwajBOD+k2L4kGHbpiap3VTw5WuyIIhANi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qzJxSJkhoIQdIN3mrpQIWuB3qk8l568XbIoLW5zp5JIHnB
> 0TITR18ADEjdDpmvIBwjBJ9oFY4aWO0uZpPfVf0XL6UNno+XYFoMM4MKe4BOrOs8
> ByDjEXO8D2iIT15kzuPqb5TepXy2+FWs7gYuHk/oQ4cGA3iB3RMjbTqk49uzPUbN
> yRIlUy3DEirVou0lxzOVYpc5zu3DHPjBCAUzQzIlfHNWSW+qfOLTefoXI0Ohp6+7
> P1HCmV0xpwruOa5d0VIlqP60rwTq5ESJRYCpS1/aJgi/TTMqeHsWM9NBXTmSrbP4
> h5aTU8UUeaGG9ZN7EDtpIvzrGsUylKoet5OhmiBIf43U7z0feEJ6UJZtFv90FPlv
> CYXZoQcRq39WfdDopqktXHvNzXs4ihml8C190b9RkhqBSZzc7gcxyLyGODDfMF70
> HelnI9CkKtAXwdyYN6n7faIYwegWTlfs94azI+B5BSqMhipUjNRA2H9Jl7F19UEv
> kRGL9N1JkJATl0csG4bw79o506mCY+zX8Rd11vuaom6m+rjD8mNr5cvAKsOX/HfG
> /aye8G6DLBpX9C/t+aV+
> =Jtus
> -----END PGP SIGNATURE-----
>
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.orghttp://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130806/50aa5c2b/attachment.html>


More information about the sword-devel mailing list