bug-gawk
[Top][All Lists]
Advanced

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

Re: Extension packaging


From: Andrew J. Schorr
Subject: Re: Extension packaging
Date: Tue, 10 May 2022 08:45:24 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

On Tue, May 10, 2022 at 09:05:20AM +0200, Manuel Collado wrote:
> El 10/05/2022 a las 6:52, pjfarley3@earthlink.net escribió:
> >><pjfarley3@earthlink.net> wrote:
> >
> >I was not lobbying for gawk to distribute them, nor did I intend to lobby
> >for that idea, but I did not say so explicitly.  Mea culpa.
> >
> >Why can't gawkextlib be like CPAN then?  AFAIK CPAN doesn't require the user
> >to recompile the main function code.  No one has to recompile perl when they
> >download a CPAN module they wish to use.
> 
> Well, CPAN (or CTAN) mostly distribute Perl (or TeX) sources.
> Perhaps precompiled to intermediate bytecode.

I'm not a Perl expert, but I do believe that CPAN Perl modules may contain a
mix of Perl and C code. From the CPAN website:

https://cpan.org/modules/INSTALL.html

"Most Perl modules are written in Perl, some use XS (they are written in C) so 
require a C compiler (it's easy to get this setup - don't panic), see your OS 
of choice below to find out how to get the right compiler."

The cpan command compiles the code as needed and installs it.
With perl, you say:

   cpan -i XML

With gawkextlib, you say:

   wget https://sourceforge.net/projects/gawkextlib/files/gawk-mpfr-1.1.0.tar.gz
   tar xf gawk-mpfr-1.1.0.tar.gz
   cd gawk-mpfr-1.1.0
   ./configure && make && make check && make install

The only challenge is that the configure command may need some arguments
to ensure that the binaries and docs end up in the right place.

I don't think it would be hugely difficult to put together a script that does
the right thing in many cases and works on various Linux flavors and Cygwin and
MacOS, such that one could say:

   gawkext -i mpfr

Are you saying that having such a script available would make a big difference
in adoption? If such a script were available, would it need to be part
of the core gawk distribution, or would it be OK to download it from the
gawkextlib project like so:

   wget https://sourceforge.net/projects/gawkextlib/files/gawkext

Regards,
Andy



reply via email to

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