Issues while building NNtrainer
KirillP2323 opened this issue · comments
Hello, we are installing NNtrainer on another machine, Ubuntu 20.04.
I started with pdebuild installation. During the pbuilder create --distribution focal
I encountered the following warning, which might be relevant: W: GPG error: http://ppa.launchpad.net/nnstreamer/ppa/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY CADA0F77901522B3
. Then for pdebuild
I needed to install all dependencies manually for it to run successfully, and in the end I couldn't find the nntrainer
package in the include directory.
I also tried meson build
and ninja -C build install
, which ran without errors, and the nntrainer
package ended up in /usr/local/include
directory. However, when compiling and running the SimpleShot application, I get the following error:
$ g++ -o simple_shot task_runner.cpp ./layers/centering.cpp simpleshot_utils.cpp -I/usr/local/include/nntrainer -I./layers -I. -L/usr/local/lib/ -lnntrainer -lccapi-nntrainer -std=c++17
$ ./simple_shot conv4 L2N tractor-turtle-squirrel-willow_tree-sunflower_20shot_seed-456_train.dat tractor-turtle-squirrel-willow_tree-sunflower_seed-456_test.dat
./simple_shot: error while loading shared libraries: libccapi-nntrainer.so: cannot open shared object file: No such file or directory
Let me know if you can help with any of the issues, or if you need more info.
Could you check if the libraries in /usr/local/bin/ with pkg-config --cflags --libs nntrainer
I also use 20.04 and I got
$pkg-config --cflags --libs nntrainer
-I/usr/local/include/nntrainer/../nntrainer -L/usr/local/lib/x86_64-linux-gnu -lnntrainer
and I'm sure you've done it already but check if the libccapi-nntrainer.so
is in /usr/local/lib/x86_64-linux-gnu
After pdebuild
installation, there is no lib found by pkg-config
, there is no nntrainer
in /usr/include
, and no libccapi-nntrainer.so
in /usr/lib/x86_64-linux-gnu
.
During pdebuild
there were some log saying the lib is in /build/nntrainer-0.4.0/debian/tmp/usr/include/nntrainer
, but it doesn't end up in /usr/include/
in the end.
After ninja -C build install
installation, nntrainer
is in /usr/local/include
, and libccapi-nntrainer.so
is in /usr/local/lib/x86_64-linux-gnu
, and pkg-config
gives me the same output as on your machine:
$ pkg-config --cflags --libs nntrainer
-I/usr/local/include/nntrainer/../nntrainer -L/usr/local/lib/x86_64-linux-gnu -lnntrainer
However, the issue with missing libccapi-nntrainer.so
library still persists:
$ g++ -o simple_shot task_runner.cpp ./layers/centering.cpp simpleshot_utils.cpp -I/usr/local/include/nntrainer -I./layers -I. -L/usr/local/lib -lnntrainer -lccapi-nntrainer -std=c++17
$ ./simple_shot vit_dino_no_erf UN dog_5way_5shot_train.dat dog_5way_5shot_test.dat
./simple_shot: error while loading shared libraries: libccapi-nntrainer.so: cannot open shared object file: No such file or directory
Also might be worth mentioning that nnstreamer
and other dependencies are in /usr/include/
, not in /usr/local/include
.
I'm certain there is libccapi-nntrainer.so in /usr/local/lib/x86_64-linux-gnu. seems to me, $LD_LIBRARY_PATH does not have /usr/local/lib/x86_64-linux-gnu. AFAIK, it includes usually.
Could you try,
$ export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu
$ ./simple_shot vit_dino_no_erf UN dog_5way_5shot_train.dat dog_5way_5shot_test.dat
Great, now it works, thank you!