/usr/bin/ld: cannot find -lmdb
collect2: error: ld returned 1 exit status
Makefile:568: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1
How to get rid of this problem.
Make sure that the library file your are trying to use while compiling is present in the path that your have given while compiling...
Related
I have used Ada successfully for years; but I am trying to create "hello world," and I am getting the following error:
/opt/GNAT/2021/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld:
.gnu.build.attributes has both ordered
[.gnu.build.attributes.lo.exit in /lib/../lib64/crt1.o] and unordered
[.gnu.build.attributes in /lib/../lib64/crt1.o] sections
/opt/GNAT/2021/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld:
final link failed: bad value collect2: error: ld returned 1 exit status
Try to replace GNAT CE ld with system one:
cd /opt/GNAT/2021/libexec/gcc/x86_64-pc-linux-gnu/10.3.1/
mv ld ld_
ln -s /usr/bin/ld ./ld
I am using following system
* Tesseract Version: 4.0.0-324-gb67f
* Platform: Ubuntu16.04 64-bit
I want to retrain tesseract, I am referring to Googles documentation at https://github.com/tesseract-ocr/tesseract/blob/master/INSTALL. Here are the steps that I am following
1. git pull https://github.com/tesseract-ocr/tesseract.git
2. cd tesseract/
3. ./autogen.sh
4. ./configure
5. make
6. make check
After doing make check I am observing this error:
make[1]: Entering directory '/home/ajinkya/Documents/tesseract/doc'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/home/ajinkya/Documents/tesseract/doc'
Making check in unittest
make[1]: Entering directory '/home/ajinkya/Documents/tesseract/unittest'
make libgtest.la libgtest_main.la libgmock.la libgmock_main.la libabseil.la apiexample_test applybox_test baseapi_test bitvector_test cleanapi_test colpartition_test dawg_test denorm_test fileio_test heap_test imagedata_test indexmapbidi_test intfeaturemap_test intsimdmatrix_test lang_model_test layout_test linlsq_test loadlang_test mastertrainer_test matrix_test nthitem_test osd_test paragraphs_test progress_test qrsequence_test recodebeam_test rect_test resultiterator_test shapetable_test stats_test stringrenderer_test tablefind_test tablerecog_test tabvector_test tfile_test commandlineflags_test lstm_recode_test lstm_squashed_test lstm_test lstmtrainer_test unichar_test unicharcompress_test unicharset_test validate_grapheme_test validate_indic_test validate_khmer_test validate_myanmar_test validator_test
make[2]: Entering directory '/home/ajinkya/Documents/tesseract/unittest'
make[2]: *** No rule to make target '../googletest/googletest/src/gtest-all.cc', needed by '../googletest/googletest/src/libgtest_la-gtest-all.lo'. Stop.
make[2]: Leaving directory '/home/ajinkya/Documents/tesseract/unittest'
Makefile:2207: recipe for target 'check-am' failed
make[1]: *** [check-am] Error 2
make[1]: Leaving directory '/home/ajinkya/Documents/tesseract/unittest'
Makefile:495: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1
How do I resolve this error?
You run version from git you have to follow https://github.com/tesseract-ocr/tesseract/blob/master/INSTALL.GIT.md instruction.
Also why are you running make check? Do you understand what are you doing? Even instruction you posted above marks it as optional...
I was installing Caffe and ran into an error:
make all CXX/LD -o .build_release/tools/compute_image_mean.bin
//home/ivan/anaconda3/lib/libpng16.so.16: undefined reference to
`inflateValidate#ZLIB_1.2.9' collect2: error: ld returned 1 exit
status Makefile:625: recipe for target
'.build_release/tools/compute_image_mean.bin' failed make: ***
[.build_release/tools/compute_image_mean.bin] Error 1
the possible solution is to run ./configure --prefix=/usr/local/, however, which configure is it about, and where can I find it?
I am still doing the Caffe Installation but now I'm facing a new problem. When I run make command a new error massage appear which is:
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
/usr/bin/ld: cannot find -lopencv_imgcodecs
collect2: error: ld returned 1 exit status
Makefile:563: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3'
failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1
I am pretty sure I already have all the dependencies.
Hope someone can help me. Thank you.
It can't find the way to reach the files. I mean the files here are libhdf5_hl.so, libhdf5.so and libopencv_imgcodecs.so.
Open your Makefile.config file, you'll find the following lines:
# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
That means those 3 files I mentioned above are not found within the default LIBRARY_DIRS. Search through usr subdirectories.
If you've found the location, for example /usr/local/hdf5/lib, then add it to LIBRARY_DIRS.
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/local/hdf5/lib
You need to create symbolic links to the missing library files. For hdf5 you may do this:
ln -s /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.0.1 /usr/lib/x86_64-linux-gnu/libhdf5.so
ln -s /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10.0.1 /usr/lib/x86_64-linux-gnu/libhdf5_hl.so
Before creating the symbolic links check the version of your library files and OS. For me it's 10.0.1 and my OS is Ubuntu 15.10.
I can run my code in vc2012.
I need to compile my code to android so I use linux system to run ./build_native.sh
. Then terminal turn out this
StaticLibrary : libchipmunk.a
Compile thumb : cpufeatures <= cpu-features.c
StaticLibrary : libcpufeatures.a
SharedLibrary : libgame.so
/myData/Data/JAVA/adt-bundle-linux-x86_64-20130717/android-ndk-r8e/toolchains/arm-linux- androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux- androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/game_shared/__/__/Classes/AppDelegate.o: in function AppDelegate::applicationDidFinishLaunching():jni/../../Classes/AppDelegate.cpp:29: error: undefined reference to 'CPWScene::createScene()'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libgame.so] Error 1
make: Leaving directory `/myData/Workspace/C++/cocos2d-2.1rc0-x-2.1.3/Workspace/ClassDesgin/proj.android'
You have to add CPWScene.cpp file to Android.mk file so that compiler can compile the file. Android.mk file is located in proj.android/jni folder. In order to compile your project you need to list all your cpp files in Android.mk file.