From: Al <oss.elmar@googlemail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] gawk and filefuncs
Date: Sat, 4 Sep 2010 00:25:32 +0200 [thread overview]
Message-ID: <AANLkTim6mBMSnjYTvVDQMcuG_NFBRuSVVOJ_6=+6irr8@mail.gmail.com> (raw)
In-Reply-To: <20100903220429.4c949e46@scooter.muppet.show>
>
> The gawk source distribution comes with a number of such extensions in the
> (doh) extensions/ directory. filefuncs.c is such one extension, which
> demonstrate how to add stat() and chdir() capabilities to awk.
> The file is compiled into a .so file, which is then referenced from within
> gawk to make the extended commands available.
>
> A vanilla build of gawk does not have any dynamic extension.
>
>
> Now, the Gentoo devs at some point in the past (very early) took that file
> (filefuncs.c) and extended it to implement new commands like "symlink",
> "unlink", "mkdir", "rmdir" and "stat", so those are callable from within
> awk, effectively extending the language. (you can see the Gentoo copyright
> in the file, look
> into /usr/portage/sys-apps/gawk/files/filefuncs/filefuncs.c)
>
> There are a number of Gentoo system scripts that use those awk extensions
> (look into /lib/rcscripts and /lib/rcscripts/awk), which means that
> compiling the expanded filefuncs.c (not the vanilla one) is mandatory on a
> Gentoo system, because there are awk scripts that rely on the extended
> functionaltiy provided by it. Hence Gentoo maintains the filefuncs.c file
> independently, and the gawk ebuild, besides building gawk itself, also takes
> care of building filefuncs.c containing the extensions.
>
>
Thank you very much. That is the best explanation a read to this. It
should be deliverd with the sources.
Still the procedure is unusual. They could apply a patch to
extensions/ filefuncs.c and exclude it for vanilla.
I have a second issue. When compiling gawk on Cygwin, where is no
windows kernel, the Gentoo version of filefuncs breaks. I have to
disable it in the ebuild to get gawk compiled.
filefuncs.o:filefuncs.c:(.text+0x1e): undefined reference to `_make_builtin'
[... lots of this ... ]
filefuncs.o:filefuncs.c:(.text+0x10f1): undefined reference to `_update_ERRNO'
collect2: ld returned 1 exit status
make: *** [filefuncs.so.0.0.1] Error 1
You say it is mandatory on a Gentoo system, because there are awk
scripts that rely on. Do this functions break because of the missing
kernel? What would be the workaround?
Thanks
Al
next prev parent reply other threads:[~2010-09-03 23:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 20:31 [gentoo-user] gawk and filefuncs Al
2010-09-03 21:04 ` Etaoin Shrdlu
2010-09-03 22:25 ` Al [this message]
2010-09-03 22:26 ` Al
2010-09-04 9:58 ` Etaoin Shrdlu
2010-09-04 10:51 ` Al
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTim6mBMSnjYTvVDQMcuG_NFBRuSVVOJ_6=+6irr8@mail.gmail.com' \
--to=oss.elmar@googlemail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox