我在jetson中做Makefile时出错了
这是一条错误消息。
chmod +x *.sh
g++ -std=c++11 -std=c++11 -Iinclude/ -I3rdparty/stb/include -DOPENCV_DNN `pkg-config --cflags libconfig++` `pkg-config --cflags libcurl` `pkg-config --cflags sqlite3` `pkg-config --cflags libxml-2.0` `pkg-config --cflags libhttpserver` `pkg-config --cflags live555` `pkg-config --cflags libswscale` `pkg-config --cflags x264` -DOPENCV `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` -DGPU -I/usr/local/cuda/include/ -DCUDNN -DCUDNN_HALF -Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -fPIC -Ofast -DOPENCV_DNN -DRTSP -DOPENCV -DGPU -DCUDNN -I/usr/local/cudnn/include -DCUDNN_HALF -fPIC obj/image_opencv.o obj/http_stream.o obj/gemm.o obj/utils.o obj/dark_cuda.o obj/convolutional_layer.o obj/list.o obj/image.o obj/activations.o obj/im2col.o obj/col2im.o obj/blas.o obj/crop_layer.o obj/dropout_layer.o obj/maxpool_layer.o obj/softmax_layer.o obj/data.o obj/matrix.o obj/network.o obj/connected_layer.o obj/cost_layer.o obj/parser.o obj/option_list.o obj/darknet.o obj/detection_layer.o obj/captcha.o obj/route_layer.o obj/writing.o obj/box.o obj/nightmare.o obj/normalization_layer.o obj/avgpool_layer.o obj/coco.o obj/dice.o obj/yolo.o obj/detector.o obj/layer.o obj/compare.o obj/classifier.o obj/local_layer.o obj/swag.o obj/shortcut_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/rnn.o obj/rnn_vid.o obj/crnn_layer.o obj/demo.o obj/tag.o obj/cifar.o obj/go.o obj/batchnorm_layer.o obj/art.o obj/region_layer.o obj/reorg_layer.o obj/reorg_old_layer.o obj/super.o obj/voxel.o obj/tree.o obj/yolo_layer.o obj/gaussian_yolo_layer.o obj/upsample_layer.o obj/lstm_layer.o obj/conv_lstm_layer.o obj/scale_channels_layer.o obj/sam_layer.o obj/convolutional_kernels.o obj/activation_kernels.o obj/im2col_kernels.o obj/col2im_kernels.o obj/blas_kernels.o obj/crop_layer_kernels.o obj/dropout_layer_kernels.o obj/maxpool_layer_kernels.o obj/network_kernels.o obj/avgpool_layer_kernels.o obj/pw_encrypt.o -o darknet -lm -pthread `pkg-config --libs libconfig++` `pkg-config --libs libcurl` `pkg-config --libs sqlite3` `pkg-config --libs libxml-2.0` `pkg-config --libs libhttpserver` `pkg-config --libs live555` `pkg-config --libs libswscale` `pkg-config --libs x264` `pkg-config --libs opencv4 2> /dev/null || pkg-config --libs opencv` -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand -L/usr/local/cudnn/lib64 -lcudnn -lstdc++ -lcrypt
Package sqlite3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sqlite3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sqlite3' found
Package sqlite3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sqlite3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sqlite3' found
obj/parser.o: In function `parse_implicit':
parser.c:(.text+0x4b54): undefined reference to `make_implicit_layer'
obj/parser.o: In function `save_implicit_weights':
parser.c:(.text+0x85d4): undefined reference to `pull_implicit_layer'
obj/parser.o: In function `load_implicit_weights':
parser.c:(.text+0x9b84): undefined reference to `push_implicit_layer'
collect2: error: ld returned 1 exit status
Makefile.nano:249: recipe for target 'darknet' failed
make: *** [darknet] Error 1我将其设置如下,并编译了它,但出现了一个错误。你知道问题出在哪里吗?
GPU=1
CUDNN=1
CUDNN_HALF=1
OPENCV=1
AVX=0
OPENMP=0
LIBSO=1
OPENCV_DNN=1
TENSORRT=0
RTSP=1发布于 2022-07-15 20:49:36
1.将作为jetpack一部分的文件复制到darknet使用的正确位置。
# add the cudnn header file to the include folder
sudo cp /usr/include/cudnn.h /usr/local/cuda/include
# copy the cudnn shared object library files to the cuda library folder
sudo cp -P /usr/lib/aarch64-linux-gnu/libcudnn* /usr/local/cuda/lib64
# change the ownership and read writes for the jetson nano user
sudo chmod a+r /usr/local/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*使用build_darknet_nano.sh 2.编译暗网
事实证明,src/representation_layer.c没有被编译,这就是为什么奇怪的错误会出现,说它找不到函数。我通过在构建命令中包含c文件来解决这个问题。
我已经创建了这个build_darknet_nano.sh脚本,您可以运行这个脚本来编译jetson上的黑网:
https://gist.github.com/Raunak-Singh-Inventor/4f1a20808bf2579ec938f8e050bf6514
要运行该程序,请执行以下操作:
将此代码保存在名为build_darknet_nano.sh的文件中
chmod u+x build_darknet_nano.sh
./build_darknet_nano.sh然后就到了。这将成功地在Jetson上编译出暗网。试着运行./darknet看看是否一切正常。
https://stackoverflow.com/questions/71626260
复制相似问题