Problems compiling

Submitted by Mercedes on Fri, 10/09/2020 - 09:56
Forums

Hello! I have follow all the steps of the manual but I have the next problem when I do nmake install:

ERROR
c:\Freeling\src\FreeLing-4.2\build>nmake install

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.

[ 22%] Built target dynet
[ 30%] Built target crfsuite
[ 39%] Built target foma
[ 49%] Built target treeler
[ 95%] Built target freeling
[ 96%] Built target analyzer_client
[ 97%] Built target analyzer
[ 97%] Built target build-dict
[ 97%] Built target fusion-mw
[ 98%] Built target dicc2phon
[ 99%] Built target gz-cat
[100%] Built target convert_model
[100%] Built target pyfreeling_swig_compilation
NMAKE : fatal error U1073: don't know how to make 'APIs\python3\CMakeFiles\_pyfreeling.dir\freeling_pythonAPIPYTHON_wrap.cxx'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.

Any idea of what could be going on?

Thank you!

what "cmake" command did you use before compiling ?

Note that to build python API, you need to have swig installed

If you don't have a special need to compile it yourself, you can download a precompiled package, which already includes the python API.

Hello Lluis, sorry, I didn't noticed that you answered to me. I was expecting an email notification.

I have replicated the steps that I followed. And, yes, I installed swig. This is the cmake command that I used.

cmake .. -DCMAKE_INSTALL_PREFIX=C:\Freeling\freeling-win\freeling -DZLIB_ROOT=C:\Freeling\freeling-win\dependencies\zlib -DBOOST_ROOT=C:\Freeling\freeling-win\dependencies\boost -DICU_ROOT=C:\Freeling\freeling-win\dependencies\icu -G "NMake Makefiles" -DSWIG_DIR=C:\Freeling\swigwin-4.0.2 -DSWIG_EXECUTABLE=C:\Freeling\swigwin-4.0.2\swig.exe -DPYTHON3_API=ON

And here the output:

c:\Freeling\src\FreeLing-4.2\build>cmake .. -DCMAKE_INSTALL_PREFIX=C:\Freeling\freeling-win\freeling -DZLIB_ROOT=C:\Freeling\freeling-win\dependencies\zlib -DBOOST_ROOT=C:\Freeling\freeling-win\dependencies\boost -DICU_ROOT=C:\Freeling\freeling-win\dependencies\icu -G "NMake Makefiles" -DSWIG_DIR=C:\Freeling\swigwin-4.0.2 -DSWIG_EXECUTABLE=C:\Freeling\swigwin-4.0.2\swig.exe -DPYTHON3_API=ON
CMake Warning (dev) at CMakeLists.txt:37 (find_package):
Policy CMP0074 is not set: find_package uses _ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

CMake variable ZLIB_ROOT is set to:

C:\Freeling\freeling-win\dependencies\zlib

For compatibility, CMake is ignoring the variable.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:50 (find_package):
Policy CMP0074 is not set: find_package uses _ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

CMake variable ICU_ROOT is set to:

C:\Freeling\freeling-win\dependencies\icu

For compatibility, CMake is ignoring the variable.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found the following ICU libraries:
-- dt (required)
-- in (required)
-- uc (required)
-- BACKEND not specified, defaulting to eigen.
-- Eigen dir is C:/Freeling/src/FreeLing-4.2/src/eigen3
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.18/Modules/UseSWIG.cmake:634 (message):
Policy CMP0078 is not set: UseSWIG generates standard target names. Run
"cmake --help-policy CMP0078" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

Call Stack (most recent call first):
APIs/python3/CMakeLists.txt:9 (SWIG_ADD_LIBRARY)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.18/Modules/UseSWIG.cmake:486 (message):
Policy CMP0086 is not set: UseSWIG honors SWIG_MODULE_NAME via -module
flag. Run "cmake --help-policy CMP0086" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.18/Modules/UseSWIG.cmake:736 (SWIG_ADD_SOURCE_TO_MODULE)
APIs/python3/CMakeLists.txt:9 (SWIG_ADD_LIBRARY)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: C:/Freeling/src/FreeLing-4.2/build

I wanted to do it with precomplied package but I saw in the docs this "To be able to call FreeLing from Python or Java, you should have built it from source, using cmake options".

Thank you!