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 12:29:05 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

On Tue, May 10, 2022 at 06:52:19PM +0300, Eli Zaretskii wrote:
> I just copied gawkextlib.h from the Git repository to the system
> include directory.  The configure script looked only for the
> gawkextlib.h file, and didn't say anything about any other file(s).
> And "./configure --help" says just
> 
>     --with-gawkextlib=PATH  Use gawkextlib in PATH
> 
> Which is very low on informational value: how am I supposed to know
> what gawkextlib is and how should I go about installing it?  INSTALL
> is not specific to gawk-mpfr, README doesn't say anything about
> dependencies, and gawk-mpfr.info to which README refers doesn't seem
> to say anything at all about installation.

OK, sorry, it never occurred to me that somebody would install
the gawkextlib.h header file without actually installing the
entire gawkextlib package. When one builds and installs gawkextlib,
that installs both the header file and a shared library that exports
some APIs that are useful for some of the extensions.

> > Maybe I should try setting up a MinGW build environment, but I have
> > zero experience with MinGW.
> 
> I don't think MinGW is the problem.  I think there are some build
> dependencies that are assumed, but seem to not be documented anywhere
> (or what did I miss?).  Does the library really build on a Unix system
> that has nothing on it except Gawk and the tarball you cited, and no
> previous gawkextlib installation (whatever that means)?  I very much
> doubt that the error from the configure script is specific to MinGW or
> MS-Windows in general -- that file must exist for configure to
> succeed, but the build instructions say nothing about how to make it
> available.

I agree that MinGW is not the problem. Please download and install
the gawkextlib package first. This is all explained in the top-level README:

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

Please download gawkextlib plus one or more individual extensions.  You should
build and install gawkextlib first.  After you untar each package, please cd
into its directory and build as follows:

   ./configure && make && make check && make install && echo Success.

My initial instructions were sloppy. They should have said:

wget https://sourceforge.net/projects/gawkextlib/files/gawkextlib-1.0.4.tar.gz
tar xf gawkextlib-1.0.4.tar.gz
cd gawkextlib-1.0.4.tar.gz
./configure && make && make check && make install && echo Success.
cd ..
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 && echo Success.

But this still may have some problems with installation paths.
We need to make sure that the shared libaries end up in the AWKLIBPATH
directory, as revealed by:
   gawk 'BEGIN {print ENVIRON["AWKLIBPATH"]}'

If I create a "gawkext" script, it will attempt to do all of this automatically.

But I am curious as to whether you can get this to work on MinGW if you're
willing to waste a few more minutes on this.

Note: you don't need gawkextlib for these extensions:
   abort
   errno
   json
   mbs
   nl_langinfo
   reclen
   redis
   timex

Regards,
Andy



reply via email to

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