-
Notifications
You must be signed in to change notification settings - Fork 99
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
Freeling installation on MacOS #90
Comments
In the make step, I got
|
Trying with the release 4.1 instead of using the MASTER branch I got another error:
Any idea @lluisp ? |
I'd say some boost or icu libraries are missing in your system. |
To prepare the system, I followed the procedure in https://freeling-user-manual.readthedocs.io/en/v4.1/installation/requirements-mac/
Looking more carefully in the docs, I found that I need extra paramenters in the I tried:
|
maybe your boost/icu version is different than the one I used to write the manual... run "make -VERBOSE=1" to see if you get more information |
Make (at least in macOS) does not understand the parameter |
try without the dash |
Nice,
|
That definitely looks like a boost/icu installation problem. |
I updated my brew boost installation and I got:
So, you need to define those paths for the compiler to work. |
It seems that the paths are not enough. It looks like newer icu versions in brew do not pull each other. Then, run all the process from scratch (i.e. from "cmake" command on a clean build directory) |
OK, I was able to compile with
after editing the PATHs in the
Above, just to properly document the issue, we must add in the list |
I already updated the master verision in GH with the right target_link_libraries What was the error with the ptyhon API ? |
The error with the
|
It looks as you might be missing some python development libraries (or the path to them) |
Yes, the question is how to indicate the location of the heads! Reading this question I found the path in my system. Python3 was installed with brew:
The documentation has only "Make sure you install also development headers" in https://freeling-user-manual.readthedocs.io/en/v4.1/installation/apis-mac/. But how to customize the location of the heads? There is a FREELINGDIR in the |
I tried with a variable:
and with:
Both cases didn't work. The error looks the same, but in any case:
|
It seems Cmake has changed the detection of python in newer versions But since 3.12, it seems it is called FindPython3 So if your cmake version is >=3.12, you need to change that line to "FIND_PACKAGE (Python3 COMPONENTS Interpreter Development)" |
OK. I edited the
Note that I used What should I do with the
|
"python4" was a typo, it should be "python3" Using 'cmake -DPYTHON3_API=ON' is the recommended way of building the API Alternatively, you can run cmake without option -DPYTHON3_API=ON, and manually create the API with the Makefile: However, this is a plan B using outdated code. The best way is to use cmake to locate python and generate the API with -DPYTHON3_API=ON Note that when you modify any CMakeLists.txt file, you have to clean your build directory (rm -rf *), and run cmake again, so it searches for dependencies again, and re-generates the makefiles. If cmake has some problem finding python, it should report an error (in that case, there is no point in running make) |
Yes, I prefer plan A. Yes, I have cleaned up the build directory before all my commands above. This is the output of cmake:
But I am still getting the error reported in the last comment. |
All these warnings in cmake make me think that the problem is in how newer cmake locates libraries. Try adding the line
at the beggining of CMakeLists.txt in the main directory (and after --or maybe instead of-- Another thing you can try (instead of, or in addition to the previous one) is replacing in APIs/python3/CMakeLists.txt, the lines
with simply
If that does not work, maybe downgrading to a cmake version previous to 3.12 would... |
None of the alternatives above worked! :-( Let us see if it is possible, https://stackoverflow.com/questions/58148541/how-to-install-cmake-version-3-12-using-homebrew. |
You won't be able to downgrade cmake if you have the latest macos, an alternative would be to install freeling using brew (which will install with no problems) and then compiling the apis by hand, but I don't know how to do that. I'm having a similar problem:
|
So, I was able to install freeling using homebrew, but when compiling the python API (using my anaconda base env) I get the following error:
|
You are trying to compile the API in the latest development version, but APIs are only guaranteed to be updated on released stable versions. In development versions they usually lag behind changes in the code (since FreeLing is a C++ project, develepment efforts are focused on C++ functionalities. APIs are updated once in a while, and when a stable release is produced). You should use code from 4.1 branch or package |
Back at square one, I can't install because I get the same error: Scanning dependencies of target dynet But I've checked my boost installation and it seems to be fine: /usr/local/Cellar/boost/1.71.0/include/boost/iostreams drwxr-xr-x 46 nd235 staff 1472 14 ago 14:29 detail Otherwise, the cmake process works ok |
if the file is there and the compiler does not find it, that means the compiler is missing some include path. run "make VERBOSE=1" and you'll see which compilation command is being used, and which include paths are set. Also, when you run cmake on a clean build directory, check whether it is finding boost, and where (you may have more than one boost version installed, and maybe it is finding the wrong one) |
Yes it seems that there's a problem with boost installations $ rm -rf * CMake Warning at /usr/local/lib/cmake/boost_filesystem-1.71.0/libboost_filesystem-variant-shared.cmake:59 (message): CMake Warning at /usr/local/lib/cmake/boost_program_options-1.71.0/libboost_program_options-variant-shared.cmake:59 (message): CMake Warning at /usr/local/lib/cmake/boost_iostreams-1.71.0/libboost_iostreams-variant-shared.cmake:59 (message): -- Found Boost: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: regex filesystem thread program_options iostreams CMake variable ICU_ROOT is set to:
For compatibility, CMake is ignoring the variable. -- Found the following ICU libraries: Call Stack (most recent call first): CMake Warning (dev) at /usr/local/Cellar/cmake/3.15.4/share/cmake/Modules/UseSWIG.cmake:460 (message): Call Stack (most recent call first): -- Configuring done |
Good, now you know where the problem is. Check how to properly install boost (did you install from source?) and make sure you have only one version. the purpose of CMake is making sure everything is all right before building FreeLing. For instance, it complains about missing python libraries. No wonder building the python API fails. |
I don't know the current status of this issue. But I tried again with the branch 4.1 (HEAD of the branch) and
I have Python3 and according to https://stackoverflow.com/questions/32578106/how-to-install-python-devel-in-mac-os, this is enough. Is it right? For boost:
|
the problem does not seem related to python headers, but to boost and icu libraries... |
Hi! I've been playing a bit with this library and I'm able to compile it using Macos 10.15.3 (clang 11), with boost-1.72.0 and different versions of ICU (64.2, 65.1 and 66.1). Using dynamic linking for I'm compiling ICU and Boost from sources using Conan, and I'm preparing a recipe for Freeling 4.1 too. It will take some time to arrive in ConanCenter, I need another PR to be accepted first (adding ICU to Boost). @arademaker, you can follow these steps to get ICU and boost (using Conan and eventually my fork of
Easiest way to use Conan generated binaries with Freeling:
(I wrote the previous steps from the top of my head, if they fail let me know and I'll go step by step to reproduce the process) I'm working on a Conan recipe to install Freeling, it works so far (it is the branch @lluisp if you think I can help with the build system and the dependencies (I see there are some embedded into this repo) let me know. The best for me would be to help here while I work on the Conan recipe, I'd try to get rid of embedded third-parties (eigen, foma, dynet, CRFsuite) to make them external dependencies... But I don't know if you have any idea in mind, I can't see any issue about it. |
That sounds great!
About conan, it sounds nice, but again, I prefer to keep it simple for non-expert users. thanks! |
Ok, let's go step by step. I'll start with easy PRs improving the CMake files so everything works smoothly. We can talk about dependency management in the future 😉 Do you want me to open an issue first or with the PR is enough? Sorry for the noise in this thread not related to the initial topic |
PR will be enough, thanks!
…On 7/4/20 13:46, Javier G. Sogo wrote:
Ok, let's go step by step. I'll start with easy PRs improving the
CMake files so everything works smoothly. We can talk about dependency
management in the future 😉 Do you want me to open an issue first or
with the PR is enough?
------------------------------------------------------------------------
Sorry for the noise in this thread not related to the initial topic
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#90 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANH567IGH7JT3ZAUJF4R7DRLMHCFANCNFSM4IZEQWAA>.
|
The boost library in brew does not contain the
with-icu4c
anymore:The text was updated successfully, but these errors were encountered: