uricamic / clandmark

Open Source Landmarking Library
http://cmp.felk.cvut.cz/~uricamic/clandmark
GNU General Public License v3.0
199 stars 111 forks source link

Python bindings linux #64

Open Dorozhko-Anton opened 8 years ago

Dorozhko-Anton commented 8 years ago

There were a lot of problems with building project. For example cmake did not managed well headers file, but I avoided it by dirty copy past. But that problem I dont understand. I turned build shared libs BUILD_SHARED_LIBS ON

but there is only libpy_flandmark.a file

[ 30%] Built target clandmark [ 61%] Built target flandmark [ 65%] Built target static_input [ 69%] Built target video_input [ 69%] Built target ReplicatePythonSourceTree [ 76%] Built target py_featurePool [ 84%] Built target py_flandmark Copying python_interface/src/py_flandmark.so Error copying file "/notebooks/clandmark/build/python_interface/src/py_flandmark.so" to "/notebooks/clandmark/build/python_interface/bin". make[2]: * [python_interface] Error 1 make[1]: * [python_interface/src/CMakeFiles/python_interface.dir/all] Error 2 make: *\ [all] Error 2

so, what additional info should I provide in order to answer the question "why there is no .so"

btw, I am working in docker to build that lib, and may be if I will manage to reliably build project I could make image for people to easily get acquainted with clandmark?

uricamic commented 8 years ago

Hi @Dorozhko-Anton,

There were a lot of problems with building project. For example cmake did not managed well headers file, but I avoided it by dirty copy past. But that problem I dont understand. I turned build shared libs BUILD_SHARED_LIBS ON

This sounds strange, many people compiled it on Linux without any problems. Typically, there are problems of this kind on windows. Could you, please, specify your system in more detail and possibly show the error messages which you have encountered?

I have to admit, that python interface is still under development. I am not currently using Python at all, but I do not remember such problems during compilation. Maybe it is because something is missing. I will try to compile it somewhere else and report the result.

btw, I am working in docker to build that lib, and may be if I will manage to reliably build project I could make image for people to easily get acquainted with clandmark?

That would be really appreciated. When it is ready, I can share the link on the project web page (with credits, of course :) )

Dorozhko-Anton commented 8 years ago

the environment is defined by https://github.com/Dorozhko-Anton/clandmark_docker/blob/master/Dockerfile

so I've checked that without python bindings everything is ok.

with python bindings cmake cant find both packages(clandmark, flandmark) and require to manualy set directories with clandmark-Config.cmake. But there is only clandmark/build/clandmark/CLandmarkConfig.cmake (first two letters are capital). If I rename that file and set clandmark_DIR = clandmark/build/clandmark/ it will go a little further.

after that it will ask for flandmark-Config.cmake, should I git clone flandmark repo for that?

If I delete from python_bindings/CMakeLists.txt

find_package(clandmark REQUIRED)
find_package(flandmark REQUIRED)
include_directories(
  ${CLANDMARK_INCLUDE_DIRS}
  ${FLANDMARK_INCLUDE_DIRS}
)

make will build up to flandmark_demo and the give linking errors (for clandmark, flandmark) as expected.

I have found similar issue in #32 , will try to reproduce

uricamic commented 8 years ago

Hi @Dorozhko-Anton,

I see, so the problem is that CLandmark is not found after compilation by CMake. Just to be sure, have you run make install after compilation?

The cconfiguration files might be outdated, I will check what could be the problem. Thanks for reporting it.

Dorozhko-Anton commented 8 years ago

yes, I've tried make && make install without python_bindings, then turn bindings ON. still the same errors about clandmark and flandmark files. If I type in directories with corresponding cmake files I get this

root@2a203a1b8bf9:/share/clandmark/build# make
[ 30%] Built target clandmark
[ 61%] Built target flandmark
[ 65%] Built target static_input
[ 69%] Built target video_input
Scanning dependencies of target ReplicatePythonSourceTree
[ 69%] Built target ReplicatePythonSourceTree
[ 73%] Compiling Cython CXX source for py_featurePool...
Scanning dependencies of target py_featurePool
[ 76%] Building CXX object python_interface/src/CMakeFiles/py_featurePool.dir/py_featurePool.cxx.o
...
a lot of warnings
...
Linking CXX shared module py_featurePool.so
/usr/bin/ld: cannot find -lflandmark_shared
collect2: error: ld returned 1 exit status
make[2]: *** [python_interface/src/py_featurePool.so] Error 1
make[1]: *** [python_interface/src/CMakeFiles/py_featurePool.dir/all] Error 2
make: *** [all] Error 2