Busybox grep vs. gnu grep

I’m trying to build emacs-27.1 on Sailfish (Xperia X device) from sources.
The build-configure script demands for a grep version that handles long lines and -e… configure
I see the installed grep version is a grep-replacement coming from busybox-package.
The gnu grep package grep-1:2.5.1a-1.3.1.jolla.armv7hl (jolla) is available through pkconf, however:

pkcon install grep
Fatal error: busybox-symlinks-grep-1.31.0+git7-1.5.1.jolla.armv7hl conflicts with gnu-grep provided by grep-1:2.5.1a-1.3.1.jolla.armv7hl

Deinstallation of busybox prior to installation of gnu-grep fails saying

pkcon remove busybox
Fatal error: This request will break your system!

So is there a secure way of installing the gnu grep package?

Thank for answer,

1 Like

Have you tried with zypper? i.e. pkcon install zypper followed by zypper in gnu-grep

Well - this might work, but I confess I’m a bit afraid to just overwrite the present busybox version of grep w/out knowing compatibility.
Is there anybody aware of compatibility issues between the grep versions shipping with busybox-symlinks-grep-1.31.0+git7-1.5.1.jolla.armv7hl and grep-1:2.5.1a-1.3.1.jolla.armv7hl respectively?
Thanks, Oliver

Don’t uninstall busybox! Just uninstall busybox-symlinks-grep, this does not trigger the system breakage warning and will allow you to install the grep package.

I’m not sure which parts of the system make assumptions that grep is the busybox version so it may still break things. I deem it unlikely though.


One option would be to extract the GNU grep binary from that package, put
it to some directory and then start with PATH=/path/to/that/dir:$PATH ./configure

Then that does not mess up w/ the system configuration any way.

1 Like

Probably safest to build this on the Mer SDK to be honest… if a target is broken, it can be reinstalled or a new SDK image downloaded. I don’t know if I would want to remove busybox’s grep (even if it’s just a symlink), as other things may depend on that grep’s syntax now or in the future.

1 Like

thanks for all your prompt replies - this is a lively forum indeed!
Just on closure of this thread:
I decided to follow nephros’ suggestion to uninstall busybox-symlinks-grep. Having gnu grep in place, the reminder build of emacs-27.1 went streight-forward. A couple of devel-libs were requested, all available in present repos.
A Sony Xperia X device running emacs - nice thing
Best, Oliver

ps. For safety, busybox-symlinks-grep has been re-installed afterwards.


…, but instead messes up the system! :roll_eyes:

1 Like

Hmm, true, if the grep is left around, so

  1. I forgot to add – rm -rf dir-where-this-temporary-grep installed after done building

  2. just left it around, junk on filesystems accumulate anyway ;/