chokkan / crfsuite

CRFsuite: a fast implementation of Conditional Random Fields (CRFs)
http://www.chokkan.org/software/crfsuite/
Other
641 stars 208 forks source link

How to install lib on the M1 MacBooks? #123

Open fannigurt opened 1 year ago

fannigurt commented 1 year ago

How install this lib on M1 MacBook with Ventura?

Last 15 lines from /Users/fannigurt/Library/Logs/Homebrew/crfsuite/02.make:
Making install in include
make[2]: Nothing to be done for `install-exec-am'.
test -z "/opt/homebrew/Cellar/crfsuite/0.12/include" || .././install-sh -c -d "/opt/homebrew/Cellar/crfsuite/0.12/include"
 /usr/bin/install -c -m 644 crfsuite.h crfsuite_api.hpp crfsuite.hpp '/opt/homebrew/Cellar/crfsuite/0.12/include'
Making install in lib/cqdb
/bin/sh ../../libtool  --tag=CC   --mode=compile clang -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I.   -I./include -mfpmath=sse -msse2 -DUSE_SSE -O3 -fomit-frame-pointer -ffast-math -Winline -std=c99  -c -o libcqdb_la-lookup3.lo `test -f 'src/lookup3.c' || echo './'`src/lookup3.c
/bin/sh ../../libtool  --tag=CC   --mode=compile clang -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I.   -I./include -mfpmath=sse -msse2 -DUSE_SSE -O3 -fomit-frame-pointer -ffast-math -Winline -std=c99  -c -o libcqdb_la-cqdb.lo `test -f 'src/cqdb.c' || echo './'`src/cqdb.c
libtool: compile:  clang -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I. -I./include -mfpmath=sse -msse2 -DUSE_SSE -O3 -fomit-frame-pointer -ffast-math -Winline -std=c99 -c src/cqdb.c  -fno-common -DPIC -o .libs/libcqdb_la-cqdb.o
libtool: compile:  clang -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -I. -I./include -mfpmath=sse -msse2 -DUSE_SSE -O3 -fomit-frame-pointer -ffast-math -Winline -std=c99 -c src/lookup3.c  -fno-common -DPIC -o .libs/libcqdb_la-lookup3.o
error: unknown FP unit 'sse'
error: unknown FP unit 'sse'
make[1]: *** [libcqdb_la-lookup3.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [libcqdb_la-cqdb.lo] Error 1
make: *** [install-recursive] Error 1

Similar question here https://stackoverflow.com/questions/71203042/how-install-crfsuite-on-mac-os-monterey-m1

usptact commented 1 year ago

When running the configure script, disable SSE2 as the Arch is not Intel

./configure --disable-sse2

On my M1 MBP with MacOS Monterey it built successfully.