During some test builds with the GUIX system, it became apparent that, for a number of reasons, Ghostscript cannot be cross-compiled like other GNU software.
The main issue, is that much of configure.ac seems to be using unusual constructs which have not been designed for cross builds. When looking at possible improvements, I saw this comment: # We MUST NOT use PKG_CHECK_MODULES since it is a) not a standard # autoconf macro and b) requires pkg-config on the system, which is # NOT standard on ANY OS, including Linux! I think this based on several misunderstandings: 1. Although the PKG_CHECK_MODULES is not a "standard" macro, it is shipped in the pkg.m4 file with the pkg-config tool which is common on most GNU/Linux OSes today. 2. In fact, the PKG_CHECK_MODULES macro DOES NOT require pkg-config to be on the system at the time the macro is processed by Autoconf. It DOES require pkg-config to be present when the resulting ./configure script is run by the user, but this is also true for the code which is currently in configure.ac too. 3. Neither the PKG_CHECK_MODULES macro, nor the pkg.m4 file is ever required to be present on the user's system; only that of the Ghostscript maintainers. It is not required in order to build or configure Ghostscript; only to bootstrap it before making a release. Using PKG_CHECK_MODULES would not add any dependencies for users. In view of this, I think that the work-arounds to avoid PKG_CHECK_MODULES are doing more harm than good. Although, I personally, am not a big fan of pkg-config, I think that if it is going to be used, then it should be used in the most standard way. Alternatively one could avoid pkg-config altogether and use Autoconf's AC_SEARCH_LIBS et al. macros, but I think the ghostscript use case is slightly more complex than normal and this would not be altogether straightforward. Other reasons preventing cross compiling, seem to include the use of hand crafted macros to test for endianess (recent autoconf has a reliable macro to do this) and a non-standard variable to represent the native compiler (instead of the standard CC_FOR_BUILD variable). Would the Ghostscript maintainer accept a patch fixing these issues? Regards, John -- PGP Public key ID: 1024D/2DE827B3 fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature