Skip to content
Advertisement

compile error in VeridisBiometricSDK_5.0_Linux sample: MatchingExample

I try to use VeridisBiometricSDK_5.0_Linux which is free Biometric library which has samples I tired to compile MatchingExample by doing exactly what the Readme file said : make MatchingExample.cpp but I have this error result:

root@localhost MatchingExample]# make MatchingExample
g++ -Wall -g  MatchingExample.cpp -o ../../../bin/MatchingExample -I../../../include/ -L../../../lib/   -lVrBio -lpthread -ludev -lusb -lusb-1.0 -ldl
MatchingExample.cpp: In function ‘int main()’:
MatchingExample.cpp:47: warning: deprecated conversion from string constant to ‘char*’
MatchingExample.cpp:55: warning: deprecated conversion from string constant to ‘char*’
/usr/bin/ld: warning: libtiff.so.4, needed by ../../../lib//libVrBio.so, not found (try using -rpath or -rpath-link)
../../../lib//libVrBio.so: undefined reference to `TIFFWriteScanline'
../../../lib//libVrBio.so: undefined reference to `TIFFDefaultStripSize'
../../../lib//libVrBio.so: undefined reference to `__fdelt_chk@GLIBC_2.15'
../../../lib//libVrBio.so: undefined reference to `_TIFFmalloc'
../../../lib//libVrBio.so: undefined reference to `memcpy@GLIBC_2.14'
../../../lib//libVrBio.so: undefined reference to `TIFFClose'
../../../lib//libVrBio.so: undefined reference to `TIFFSetErrorHandler'
../../../lib//libVrBio.so: undefined reference to `TIFFGetField'
../../../lib//libVrBio.so: undefined reference to `_TIFFfree'
../../../lib//libVrBio.so: undefined reference to `TIFFClientOpen'
../../../lib//libVrBio.so: undefined reference to `TIFFSetField'
../../../lib//libVrBio.so: undefined reference to `TIFFReadDirectory'
../../../lib//libVrBio.so: undefined reference to `TIFFSetWarningHandler'
../../../lib//libVrBio.so: undefined reference to `TIFFReadRGBAImageOriented'
collect2: ld returned 1 exit status
make: *** [MatchingExample] Error 1
==================================================
this is the Makefile codes:
# ------------------ Compilation options ------------------------
# Loads libraries. 
LIBS = -lVrBio -lpthread -ludev -lusb -lusb-1.0 -ldl

# Flags for the C compiler:
#   -Wall for strict gcc warnings (requires prototypes for all functions).
#   -g to produce debug data for gdb
#   -O for optimization
CFLAGS = -Wall -g

CC = g++
# --------------------- Directory Paths ----------------------------

INC_DIRS = -I../../../include/

LIB_DIRS = -L../../../lib/

BIN_DIR = ../../../bin/

# --------------------- Code modules ----------------------------

# Object files
#OBJ =

# Definitions
#DEFS = 
# ------------------------ Rules --------------------------------

$@.cpp: $@.cpp 
    ${CC} $(CFLAGS) $@.cpp -o $(BIN_DIR)$@ $(INC_DIRS) $(LIB_DIRS)   $(LIBS)
==========================
aslo this is the ReadMe file content
In the AsyncCaptureExample folder there is a Makefile. This Makefile can be used for all the
other cpp examples.

To compile use: make

For example: make AsyncCaptureExample

The output will be generated in the bin folder.

also this is the VeridisBiometricSDK_5.0 ReadMe file: 1 – install necessary packages: *libudev *libusb *libusb-1.0 *fxload 2 – In the misc folder there are files necessary for the program access the USB with the extension .rules. Copy them to /etc/udev/rules.d folder or equivalent

3 – mkdir /usr/share/usb and copy the .hex files of the misc folder there 4 – Set LD_LIBRARY_PATH as the path to the .so files

5 – copy the file UFLicense.dat, which is in the misc folder, to the folder of your application if you use suprema readers.

would you please help me?

UPDATE

I am so close to solve my problem: First, I found solution for installing libtiff.so.4 for Ubuntu on this the following link: https://askubuntu.com/questions/457011/why-is-libtiff-so-4-not-recognized Second, I convert the same Ubuntu library package into centos rpm using alien tool as the following: alien -r -g libtiff4_3.9.7-2ubuntu1_amd64.deb Third, I Installed libtiff4-3.9.7-3.x86_64.rpm (which is result from alien converting) on my Centos 6.7 it installed successfully but when try make my samples I supersized that libtiff.so.4 requires 2 library which are

[root@localhost]# readelf  -d  /usr/lib/x86_64-linux-gnu/libtiff.so.4
0x0000000000000001 (NEEDED)             Shared library: [libjbig.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libjpeg.so.8]

I installed libjpeg.so.8 from source code library from jpegsrc.v8.tar.gz and it worked well But I couldn’t find any suitable package to fix missing libbig.so.0 library So would you help me to fix this missing library… By way the when I fixed my problem, I will explain the all solution so it will be useful for any one

Advertisement

Answer

Finally I solved my problem if you read my problem you would know that my problem is missing libtiff.so.4

I fixed it, my solutions steps as follows first if you dipslay current libtiff.so by using this command

[yaserco@localhost Desktop]$ locate libtiff.so
/usr/lib64/libtiff.so.3

so I made symble link to libtiff.so.3

ln -s /usr/lib64/libtiff.so.3 /usr/lib64/libtiff.so.4

after I tested my sample it diplayed this 2 error messages tried this solution: first create symbolic link ln -s /usr/lib64/libtiff.so.3.9.4 /usr/lib64/libtiff.so.4 then I did the command [root@localhost MatchingExample]# make MatchingExample it had an error result as:

MatchingExample.cpp: In function ‘int main()’:
MatchingExample.cpp:47: warning: deprecated conversion from 
string constant to ‘char*’ MatchingExample.cpp:55: warning: deprecated

conversion from string constant to ‘char*’ ../../../lib//libVrBio.so: 

undefined reference to __fdelt_chk@GLIBC_2.15' ../../../lib//libVrBio.so: 
undefined reference to memcpy@GLIBC_2.14'

second I solved this error by installing

A- glibc for (GLIBC_2.14) as the follows:

cd /tmp
wget http://ftp.gnu.org/gnu/glibc/glibc-2.16.0.tar.gz
tar -xvzf glibc-2.16.0.tar.gz
cd glibc-2.16.0
mkdir glibc-build
cd glibc-build
../configure --prefix='/usr'

B-

We have to fix a little typo, so run:

nano +171 ../scripts/test-installation.pl

and replace if (/$ld_so_name/) { with if (/Q$ld_so_nameE/) {
:

make
sudo make install

see more form this link https://github.com/FezVrasta/ark-server-tools/wiki/Install-of-required-versions-of-glibc-and-gcc-on-RHEL-CentOS then when I compile my sample it worked well

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement