CESNET / libyang

YANG data modeling language library
BSD 3-Clause "New" or "Revised" License
364 stars 291 forks source link

LibYang error when compiling the libnetconf libary. #2287

Open Ray123456a opened 1 month ago

Ray123456a commented 1 month ago

libyang.lib error occured when I trying tho compiling the libnetconf. The compile is aarch64-linux-gnu-gcc , I have finished compiled libpcre2-10.42 libpcre2-10.42 libpcre2-10.42 libpcre2-10.42 libpcre2-10.42 before that. error_libyang Pls help me to find out where to fix this issue , thanks a lot.

Ray123456a commented 1 month ago

My cmake command as below: CC=aarch64-linux-gnu-gcc cmake -DOPENSSL_ROOT_DIR=/drgfly/lib/openssl -DCMAKE_INSTALL_PREFIX:PATH=/drgfly/netopeer2_server/libnetconf -D CMAKE_BUILD_TYPE:String="Release" -DLIBSSH_INCLUDE_DIRS=/drgfly/lib/libssh/include/libssh -DLIBSSH_LIBRARIES="/drgfly/lib/libssh/lib/libssh.so" -DLIBYANG_INCLUDE_DIRS=/drgfly/netopeer2_server/libyang/include -DLIBYANG_LIBRARY="/drgfly/netopeer2_server/libyang/lib/libyang.so" -DENABLE_TLS=ON -DENABLE_SSH=ON ..

michalvasko commented 1 month ago

Seems you are missing some library but I really do not know which. In any case, looks like a libssh problem so ask them, I cannot help.

jktjkt commented 1 month ago

It seems to me that CMake is trying to link libnetconf2 against libssh (which is the right thing to do), and libssh requires some symbols from zlib (which makes sense), but the build scripts do not capture this transitive dependency (which might be a bug in your build/packaging/installation of libssh). Either way, there's nothing to fix in libyang or libnetconf2.