Skip to content

Instantly share code, notes, and snippets.

@tpeng
Last active August 9, 2017 09:51
Show Gist options
  • Save tpeng/9073881 to your computer and use it in GitHub Desktop.
Save tpeng/9073881 to your computer and use it in GitHub Desktop.
Build crfsuite on macos
diff --git a/configure.in b/configure.in
index dafbcf6..743037c 100644
--- a/configure.in
+++ b/configure.in
@@ -30,7 +30,7 @@ dnl ------------------------------------------------------------------
AM_INIT_AUTOMAKE(crfsuite, 0.12)
AC_CONFIG_HEADERS(config.h)
AM_MAINTAINER_MODE
-AM_C_PROTOTYPES
+
dnl ------------------------------------------------------------------
diff --git a/swig/python/setup.py b/swig/python/setup.py
index 9442110..c0ce097 100644
--- a/swig/python/setup.py
+++ b/swig/python/setup.py
@@ -26,7 +26,7 @@ crfsuite_module = Extension(
'export_wrap.cpp',
],
# include_dirs=['../../include',],
- extra_link_args=['-shared'],
+ extra_link_args=['-shared', '-Wl,-undefined,dynamic_lookup'],
# library_dirs=['../../lib/crf',],
libraries=['crfsuite'],
# extra_objects=['../../lib/crf/libcrfsuite.la'],
  1. autoreconf -vfi
  2. ./configure
  3. make
@zhugw
Copy link

zhugw commented Aug 9, 2017

Thanks! It works. but I find it no need to execute below command

➜  ~ autoreconf -vfi
zsh: command not found: autoreconf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment