libnetconf2 icon indicating copy to clipboard operation
libnetconf2 copied to clipboard

Is libnetconf2 support cross-compile with cmake?

Open foolloow opened this issue 6 years ago • 5 comments

I want to cross-compile this lib in powerpc64. But when i set cross-compile parameters, cmake is not work well, so, is it support cross-compiling?

This is also happened when i cross-compile libssh.

foolloow avatar Feb 26 '19 08:02 foolloow

Yes, libnetconf2 support cross-builds. My suggestion is to start with a known-good tooling such as buildroot or yocto, that tends to save time.

jktjkt avatar Feb 26 '19 08:02 jktjkt

Hi,i want update some progress, at last cross-compile is ok using -CMAKE_C_COMPILER and -CMAKE_CXX_COMPILER, libssh i make WITH_ZLIB OFF(not installed in my cross-compile environment) and libnetconf2 must set openssl and libssh and libyang 's include and library directory.(these names can be found by CMakeLists.txt, for example:OPENSSL_LIBRARIES) The global set of cmake's directory may be covered by particular lib and include name. I think global cmake dir can cover the perticular libs' path may be more friendly in cross-compiling.

foolloow avatar Feb 26 '19 10:02 foolloow

@foolloow :hi,libnetconf2 cross compile failed using: cmake .. -DCMAKE_C_COMPILER=arm-arago-linux-gnueabi-gcc Looking for pthread.h - not found Cmake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArfs.cmake:137(message): Could NOT find Threads(missing:Threads_FOUND)

Do you konw how can i solve this issue? Thanks.

Arvliu avatar Oct 12 '19 00:10 Arvliu

Hi, I am not sure we can help you much, the error is clear enough, cmake was unable to find pthread.h. Maybe it is found in some non-standard path on your platform?

Regards, Michal

michalvasko avatar Oct 12 '19 06:10 michalvasko

@michalvasko thanks, the issue has been solved already.

Arvliu avatar Oct 12 '19 08:10 Arvliu