-
Notifications
You must be signed in to change notification settings - Fork 44
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
Install libraries and headers by "make install" #86
Conversation
Thank you for the PR. There are couple of problems by installing all that stuff into the system.
I wonder if the approach of jumanpp-grpc will work for you (if you use CMake for building, otherwise need to think about everything once more): The steps are basically as following: Add this repo as a subrepo. |
My use cases:
I wanted to create .deb and .rpm packages of Juman++ for easy install for these use cases. For example, I did it for Groonga related products and Apache Arrow related products at https://packages.groonga.org/ and https://github.com/red-data-tools/packages.red-data-tools.org . If there are .deb and .rpm packages, Groonga users and Ruby users install 1. and 2. easily. (I can create Juman++ based Groonga tokenizer package with static linked Juman++ for Groonga users.) I understand that Juman++ doesn't support dynamic link. It seems that it's not suitable for my use cases. I'll close this pull request if you don't have any questions my use cases. |
For Ruby, I wonder if it's possible to go jumanpp-grpc approach. You can then specify CMAKE_CXX_FLAGS as About groonga - need to read on that stuff to say something more definite. My main idea about bindings was to implement a subset of MeCab public API, so the binding code could simply be reused. |
Thanks for the comment. |
The good thing about public API or bindings: they are not set in stone and you can help me designing them :p if you want. |
There is a definite need for that: see #61 But I could not specify requirements for them yet, so if you could write down things you want from them, I will be grateful. |
If Juman++ project is positive to dynamic link support, I'm positive to help Juman++ project. |
I'm completely OK with dynamic libraries being here eventually, I'm simply not sure if the current sublibrary division is suitable for them. E.g. probably util and core should be merged in a single dynamic object and dictionary-specific stuff be in another object. |
Or maybe have both options. |
Using C++ at library boundary is not fun as well, so we need to have a C API that can access dictionaries, which currently does not exist at all. |
How about the following steps?
I propose that we use GLib (and GObject Introspection) for C API. With GObject Introspection, we can generate language bindings automatically (at run-time or compile time). It's similar to SWIG but another approach. If we use GObject Introspection, we can get language bindings for Ruby, Python, Lua, Go and so on. I'm using this approach for Apache Arrow. See also about GObject Introspection in Japanese:
|
I'm not sure if the Juman++ is the best solution for the search tokenization (if you want only tokenization). Ruby bindings are another matter. So we have dictionary-dependent code (output, codegen stuff) and dictionary-independent code. Defining an API to access dictionary independent data should probably come before doing the library infrastructure stuff and that code definitely belongs to this repo. About simple dynamic linking: just add Installing the current header forest to the system locations won't be any good because they are not written with the objective to be installed somewhere and will be simply scattered around When there will be a C API, creating bindings should not be a large problem. |
Let's continue the discussion in #61. |
It's needed to use Juman++ as a library.
In this change, all headers are installed. I'm not sure this is expected...
If you tell me which headers should be installed, I can choose only them.