[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Cross-compilation fails for Ghostscript 09.05
From: |
John Darrington |
Subject: |
Cross-compilation fails for Ghostscript 09.05 |
Date: |
Fri, 3 Jan 2014 09:56:24 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
- Cross-compilation fails for Ghostscript 09.05,
John Darrington <=
- Re: Cross-compilation fails for Ghostscript 09.05, Didier Link, 2014/01/05
- Re: Cross-compilation fails for Ghostscript 09.05, John Darrington, 2014/01/05
- Re: Cross-compilation fails for Ghostscript 09.05, John Darrington, 2014/01/12
- [no subject], John Darrington, 2014/01/12
- [PATCH 02/21] Makefile.in (top_srcdir): New variable, John Darrington, 2014/01/12
- [PATCH 06/21] configure: Fix endianess test while cross-compiling, John Darrington, 2014/01/12
- [PATCH 07/21] Fix test for fontconfig when cross building, John Darrington, 2014/01/12
- [PATCH 09/21] Simplify the conditional inclusion of the contrib directory., John Darrington, 2014/01/12
- [PATCH 08/21] configure.ac, Makefile.in: Use CC_FOR_BUILD for native compilation., John Darrington, 2014/01/12
- [PATCH 04/21] Fix crash on startup if the configuration file is missing., John Darrington, 2014/01/12