Click here to Skip to main content
16,009,847 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:
C#
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)
==========================

also 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.

After I tried many times I have one approach to fixed my problem, but I couldn't complete my solution, so I will explain my solution steps as follow:
First, I found solution for installing libtiff.so.4 for Ubuntu on this the following link: http://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
Posted
Updated 21-Feb-16 7:11am
v3

It is always a bad idea to use a library build for another distribution. You should install the library using the package manager of your system. I don't know CentOS but it uses RPM and yum.

To check installed and available packages, see Managing Software with yum[^].

When a library is missing check if it is installed and get the version of an installed package:
rpm -q libtiff


If it is not installed, use the package manager to install it. The package manager will check the dependencies and install required packages automatically:
rpm -i libtiff


If the library is installed but has an old version, you can check if there is newer one and install that using the upgrade (-U) or freshen (-F) option:
rpm -U libtiff


If the application requires a newer version that is not provided by your distribution version, you have to build it from the sources:
# Download or copy source package to a build folder
# wget ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.6.tar.gz
tar xzf tiff-4.0.6.tar.gz
cd tiff-4.0.6
./configure --prefix=/usr/local
make
sudo make install


Note that this local build should be installed into /usr/local. If this requires other libraries, perform similar steps for them.

[EDIT]
After install check that the path /usr/local/lib is contained in the file /etc/ld.so.conf and execute ldconf as root:
sudo ldconf

[/EDIT]

The libjbig (note the 'j' in the name) package should be available with CentOS like all other libraries mentioned by you.

When building applications, it is often necessary to install the development version of a library. These contain the necessary header files. To install the development versions just append -dev to the library name when executing the install command of the package manager.
 
Share this answer
 
v3
Comments
yaserco 29-Jan-16 6:55am    
I installed tiff-4.0.6.tar.gz.but libtiff.so.4 is still missing. would you help me to give a correct libtiffx version which has my missing librray libtiff.so.4?
Jochen Arndt 29-Jan-16 7:08am    
Have you tried installing it via RPM before?

If so and that is too old (not version 4.x), the library should be in /usr/local/lib or a sub directory after executing 'sudo make install'.

That path must be added to the LIBRARY_PATH environment variable or passed to gcc/g++ on the command line with the -L options (e.g. using the LIB_DIRS variable in your make file).

Similar for the include file path to find the header files.

I forgot also to mention that ldconfig should be called. I will update my solution.
yaserco 29-Jan-16 7:25am    
I saerch for libtiff.so.4 for all file system and it couldn't be found, would you help me to find that rpm package that you talk about or any source package which contians libtiff.so.4
Jochen Arndt 29-Jan-16 7:46am    
An additional question first: What CentOS version is installedd?
Execute 'cat /etc/*-release' to show the version.

Next you should ensure that the converted Ubuntu version is uninstalled. How to do this depends on how it has been installed. 'man rpm' may help.

What is the output for 'rpm -q libtiff'?
If installed, what is the output of 'rpm -U libtiff'?
If not installed, what is the output of 'rpm -i libtiff'?
If the above was successful, what is now the output of 'rpm -q libtiff'?

Was the build of tiff-4.0.6 successful (tar, configure, make, make install)?
To find the libraries execute 'ls -R /usr/local/lib/libtif*'
It should show all library files and symlinks. If there is a libtiff.so.4.0.6 but no libtiff.so.4 than it's just a missing symlink.

Again:
First try to use the RPM packages. Everything else will make things more complicated, may require building additional dependancies manually too, and other applications may not work anymore when using wrong setups.

If there is an older libtiff version available with your CentOS version and a newer one is required, you should think about upgrading CentOS.
yaserco 29-Jan-16 11:15am    
[root@localhost Desktop]# rpm -a -q libtiff
libtiff-3.9.4-10.el6_5.i686
libtiff-3.9.4-10.el6_5.x86_64
[root@localhost Desktop]# rpm -U libtiff
error: open of libtiff failed: No such file or directory
[root@localhost Desktop]# rpm -U -p libtiff
error: open of libtiff failed: No such file or directory
[root@localhost Desktop]# rpm -i libtiff
error: open of libtiff failed: No such file or directory
[root@localhost Desktop]# rpm -q libtiff
libtiff-3.9.4-10.el6_5.x86_64
libtiff-3.9.4-10.el6_5.i686
[root@localhost Desktop]#

I work using virtual machine for back to scapshot which is befor installing libtiff (convered from ubuntu). I installed tiff-4.0.6.tar.gz after that I found those libtiff libraries

[root@localhost tiff-4.0.6]# locate libtiff.so
/home/yaserco/Desktop/tiff-4.0.6/libtiff/.libs/libtiff.so
/home/yaserco/Desktop/tiff-4.0.6/libtiff/.libs/libtiff.so.5
/home/yaserco/Desktop/tiff-4.0.6/libtiff/.libs/libtiff.so.5.2.4
/usr/lib/libtiff.so
/usr/lib/libtiff.so.3
/usr/lib/libtiff.so.3.9.4
/usr/lib64/libtiff.so
/usr/lib64/libtiff.so.3
/usr/lib64/libtiff.so.3.9.4
/usr/local/lib/libtiff.so
/usr/local/lib/libtiff.so.5
/usr/local/lib/libtiff.so.5.2.4
[root@localhost tiff-4.0.6]#

I you see libtiff.so.4 is still missing?
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_name\E/) {
:

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
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900