bjoern icon indicating copy to clipboard operation
bjoern copied to clipboard

Build bjoern error in mac m1 with command `pip3 install --global-option=build_ext --global-option="-I/opt/homebrew/include" bjoern`

Open yukar1z0e opened this issue 2 years ago • 6 comments

When I tried the command pip3 install --global-option=build_ext --global-option="-I/opt/homebrew/include" bjoern to build bjoern , it crashed out with the erroers below. 截屏2022-05-07 15 56 27

yukar1z0e avatar May 07 '22 07:05 yukar1z0e

https://github.com/jonashaag/bjoern/wiki/Installation

jonashaag avatar May 07 '22 12:05 jonashaag

My m1 mac has installed libev and gcc,but it still cant work image

NaliangzzZ avatar May 07 '22 12:05 NaliangzzZ

https://github.com/jonashaag/bjoern/issues/226

jonashaag avatar May 07 '22 17:05 jonashaag

"It works for me"...

Where is your libev library? For me:

$ find /opt/homebrew -name 'libev.dylib' -print
/opt/homebrew/lib/libev.dylib
/opt/homebrew/Cellar/libev/4.33/lib/libev.dylib

Also, are you using a pip/python installed by Homebrew?

ijs-octo avatar May 10 '22 13:05 ijs-octo

You can use the following command:pip3 install --global-option=build_ext --global-option="-I/opt/homebrew/include" --global-option="-L/opt/homebrew/lib" bjoern

HK69s avatar Jun 04 '22 06:06 HK69s

The following works on M2 after brew install libev:

LDFLAGS="-L$(brew --prefix libev)/lib" CFLAGS="-I$(brew --prefix libev)/include" pip install bjoern

Homebrew v3.0.0 modified the default prefix from /usr/local on Intel, to /opt/homebrew on Apple silicon (see here). These changes can be added to the repo here if anyone wants to do the work of creating an MR for this.

synchronizing avatar Jul 29 '22 20:07 synchronizing