texinfo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Perl's cc


From: Eli Zaretskii
Subject: Re: Using Perl's cc
Date: Fri, 03 Jul 2015 17:08:35 +0300

> Date: Fri, 3 Jul 2015 14:01:11 +0100
> From: Gavin Smith <address@hidden>
> Cc: address@hidden
> 
> The C compiler should not be needed to be installed for using a
> prebuilt Texinfo package.

I'm talking also as someone who builds the package.

> The big question is ABI: will the loadable modules that are
> distributed as part of a binary Texinfo package be compatible with
> the Perl executable?

Not necessarily.  It depends on many details of how Perl was built,
including the switches used with the compiler.  I had the same issue
once with Python (I needed to build extensions used by the Bazaar
VCS); in that case, I was lucky because the Python folks provide a way
for building extensions with MinGW, something Perl binary
distributions might not provide.  All in all, it's fragile at best.

> I think we need the same compiler to build an extension, but I don't
> know about running the extension. It's possible that a module could be
> loaded for a different Perl to the one it was compiled against, but I
> am still trying to find out if this is the case. There are some
> properties which we need, and which are likely: the processor
> architecture being the same, the calling convention being the same,
> the use of system calls matching and so on. It's possible that it
> won't work in spite of that: it depends on whether the Perl developers
> made the ABI between perl executables and loadable modules stable.

Not only stable: immutable.  Because different versions of Perl can
also run the risk of changing the ABI.

> If it turns out the same Perl version is needed, MinGW, and other
> distributions, would have to make sure that the same Perl was
> installed somewhere, and that it was used when texi2any was run.

That'd be a death blow to MinGW port of Texinfo.  Requesting the same
Perl is an impossible requirement.  Packaging Perl is a large job that
requires a lot of knowledge to select the useful set of extensions.
Currently, the MinGW project doesn't even provide a build of Perl, so
I presume anyone who has Perl uses some binary distribution built most
probably with Microsoft compilers.

So if this is going to be the future of Texinfo, its Windows support
will dwindle and die, except in Cygwin.  That'd be unfortunate, I
think.

Btw, I expect similar problems on other systems, certainly non-GNU,
but even on GNU/Linux, whenever GCC breaks backward compatibility with
the ABI.

> >   . the C compiler used to build Perl might not be installed on the
> >     machine where Texinfo is being built, since none of the builds of
> >     Perl involved in the Texinfo build are MinGW builds
> >
> > So if the design is based on the assumption that the same compiler
> > used to build Perl is available when building Texinfo, this would
> > complicate things on Windows to a great extent.
> 
> The problem is with the Perl development headers, which record
> information about the system being compiled on. We need these headers
> in order to build the extension - I don't think there's any way around
> this.

But don't those headers include other standard headers?  If they do,
you have a more-or-less catholic marriage with the specific compiler
version used to build Perl; any other version might not be able to
compile the extension.

> Have you had any success in building and using the extension module
> from the current trunk under Windows?

I don't know.  Does the extension module compile by default?  If not,
how do I enable it?

(I don't expect this to succeed, anyway, since Perl used during the
build is the MSYS build of Perl, and that is definitely incompatible
with MinGW.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]