Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS Illegal instruction: 4 #19

Closed
grylem opened this issue Mar 4, 2020 · 8 comments
Closed

macOS Illegal instruction: 4 #19

grylem opened this issue Mar 4, 2020 · 8 comments
Labels
problem Something isn't working due to a (minor) problem

Comments

@grylem
Copy link

grylem commented Mar 4, 2020

Hi
for compiled binary from you

  1. macOS versions of ugrep depends on libpcre2-8.0.dylib
    please make static pcre2 lib and make ugrep without depends on pcre2 dylib.
  2. modify ugrep with install_name_tool -change or add pcre2 dylib to /opt/local/lib and now i have a message:
    Illegal instruction: 4
    macOS High Sierra.
    Regards.
@genivia-inc
Copy link
Member

genivia-inc commented Mar 4, 2020

I will remove option -P from the prebuilt binaries altogether.

EDIT:

For those that want a MacOS version of ugrep with all features enabled, you may want to use Homebrew to install the latest release:

$ brew install https://raw.githubusercontent.com/Genivia/ugrep/master/Formula/ugrep.rb

See #21.

END EDIT

To install pcre2 on Mac, use macports:

$ sudo port install pcre2

Or if you prefer homebrew:

$ brew install pcre2

If you don't have bzip2-dev and lzma-dev (check with ls /usr/lib/libbz2* /usr/lib/liblzma*, then try this:

$ sudo port install bzip2
$ sudo port install xz

@grylem
Copy link
Author

grylem commented Mar 4, 2020

maybe I found the reason: Illegal instruction: 4
I used an mac computer for testing and the latest version of ugrep that works on it - 1.7.6,
all others include the latter give an error - Illegal instruction: 4

@genivia-inc
Copy link
Member

It could be an AVX problem. I've now updated bin/macosx/ugrep in the master branch to use SSE2 only.

@grylem
Copy link
Author

grylem commented Mar 4, 2020

Works on new mac with Mojave/Catalina, but on old with High Sierra - Illegal instruction: 4

@genivia-inc
Copy link
Member

We should create a homebrew formula for ugrep instead of sharing the binary, because it's best to use ugrep's optimizations for speed. I'll get to that in a few days.

@grylem grylem closed this as completed Mar 7, 2020
@genivia-inc
Copy link
Member

I've created a homebrew formula. However, the brew audit command says "repository not notable enough (<30 forks, <30 watchers and <75 stars)". Well, this is not surprising as the repo is relatively quite new.

It seems we need more stars and forks to release a homebrew formula.

Any help is appreciated.

@genivia-inc genivia-inc added the problem Something isn't working due to a (minor) problem label Mar 11, 2020
@genivia-inc
Copy link
Member

See "help wanted" #21

@genivia-inc
Copy link
Member

For those that want a MacOS version of ugrep with all features enabled, use brew tap https://github.com/Genivia/ugrep to clone ugrep on your system with homebrew tap. Then brew install ugrep to install ugrep . I'll create a homebrew formula later, see #21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working due to a (minor) problem
Projects
None yet
Development

No branches or pull requests

2 participants