mattn / mruby-onig-regexp

mrbgem of 鬼雲's Regular Expression
31 stars 36 forks source link

Fix library name for onigmo #92

Closed ksss closed 5 years ago

ksss commented 5 years ago

Onigmo library name is onigmo ref https://github.com/k-takata/Onigmo/blob/27fa4fbbcb064c5e18870081fbd652461db34239/README.md#usage

mattn commented 5 years ago

On Linux, libonig.so.4 is provided.

$ dpkg -L libonig4 | grep onig
/lib/x86_64-linux-gnu/libonig.so.4.0.0
/share/doc/libonig4
/share/doc/libonig4/changelog.Debian.gz
/share/doc/libonig4/copyright
/lib/x86_64-linux-gnu/libonig.so.4
ksss commented 5 years ago

Islibonig oniguruma? Could you compile with #include <onigmo.h>?

# apt-get install libonig-dev
...
# dpkg -L libonig5 | grep onig
/usr/lib/x86_64-linux-gnu/libonig.so.5.0.0
/usr/share/doc/libonig5
/usr/share/doc/libonig5/changelog.Debian.gz
/usr/share/doc/libonig5/copyright
/usr/lib/x86_64-linux-gnu/libonig.so.5

cat /usr/share/doc/libonig5/copyright | grep Source
Source: https://github.com/kkos/oniguruma

# cat onigmo.c
#include <onigmo.h>
int main(int argc, const char *argv) {
  return 0;
}

# gcc onigmo.c
t.c:1:10: fatal error: onigmo.h: No such file or directory
 #include <onigmo.h>
          ^~~~~~~~~~
compilation terminated.
mattn commented 5 years ago

Ah, you are right.