Bruno Haible <[email protected]> writes:
> Collin Funk wrote:
>> my ./configure scripts from my host
>> machine did not like toybox's 'grep' command in the VM (*).
>>
>> (*) I do not mean to blame toybox. Based on the error message it seems
>> like QNX's regex engine does not like adjacent duplication symbols and
>> will return an error upon seeing them. GNU's regex chooses to handle
>> them, even though it is not required. I'll have to look into that more
>> to see if an Autoconf bug is needed.
>
> Guessing from the symbols in libregex.so, QNX's regex engine appears to be
> TRE, which claims to be POSIX compliant. (But maybe it's an earlier version
> of TRE? Who knows...)
Ah, interesting. I have never used it. But based on the description here
[1], I think the behavior I noticed make sense.
> Once you are done with that: Maybe it would make sense to install GNU grep
> from source; then you should be able to build a testdir of all of Gnulib?
Well, you would have to run ./configure in GNU grep's tarball which
wouldn't work. :)
I did end up finding a workaround, though. Using an Alpine container
since it is easier to start than the QNX VM and both use 'apk':
$ podman run --rm -it alpine:latest
$ cd /tmp && apk fetch grep
Downloading grep-3.12-r0
$ tar -xf grep-3.12-r0.apk
$ ls bin
egrep fgrep grep
I guess 'apk fetch' doesn't use some database file that was missing on
the QNX VM because that worked when 'apk add' did not.
That method won't work when the application needs a shared library you
don't have installed, of course. E.g., in an Alpine container that
executable cannot be used since PCRE2 (used for 'grep -P') is not
installed by default.
Collin
[1]
https://github.com/laurikari/tre/tree/1fe337ff41b304311e536b8ac2524fb4e84669b0?tab=readme-ov-file#strict-standard-conformance