Error in xbob.paper.tpami2013 related to bob-master version

26 views
Skip to first unread message

eslam mostafa

unread,
Sep 29, 2014, 1:38:00 PM9/29/14
to bob-...@googlegroups.com

Manuel Günther and laurent El Shafey: Thanks for your help and time for fixing the compile error of giflib version > 5.1 with bob. I used the master version from git hub.



Unfortunately, I had this error with the version of bob.master


Note : while I am running old version of bob 1.2 , I was not have this problem.


Traceback (most recent call last):

File "./bin/toolchain_pcaplda.py", line 14, in <module>

import xbob.paper.tpami2013.scripts.toolchain_pcaplda

File "/home/eamost01/PLDA_PAMI_2013/xbob.paper.tpami2013-master/xbob/paper/tpami2013/scripts/toolchain_pcaplda.py", line 24, in <module>

from .. import utils

File "/home/eamost01/PLDA_PAMI_2013/xbob.paper.tpami2013-master/xbob/paper/tpami2013/utils.py", line 22, in <module>

import bob

File "/usr/lib64/python2.7/site-packages/bob/__init__.py", line 4, in <module>

from . import core

File "/usr/lib64/python2.7/site-packages/bob/core/__init__.py", line 74, in <module>

__from_extension_import__('._core', __package__, locals())

File "/usr/lib64/python2.7/site-packages/bob/core/__init__.py", line 67, in __from_extension_import__

module = __import_extension__(name, package, locals)

File "/usr/lib64/python2.7/site-packages/bob/core/__init__.py", line 50, in __import_extension__

__import__(name, locals=locals)

ImportError: /lib64/libbob_core_py27.so: undefined symbol:_ZTVN3bob4core12OutputStreamE

Laurent El Shafey

unread,
Sep 29, 2014, 2:13:03 PM9/29/14
to bob-...@googlegroups.com
Hello,

If you want to replicate the results of our TPAMI article from 2013, you need to install bob 1.2.x.
The package https://pypi.python.org/pypi/xbob.paper.tpami2013 indeed relies on the API of the bob 1.2 branch. It is hence not compatible with the current master branch of bob (which is the development branch of bob 2.0.x) on github.

First, revert any change that you may have done in "boost/smart_ptr/shared_ptr.hpp and boost/smart_ptr/detail/shared_count.hpp" and make sure you have a clean environment.

You then have two options:

1- Compilation from source
1.a. Download the archive located here:
https://github.com/idiap/bob/releases/tag/v1.2.2
1.b. Installation of the dependencies required by bob 1.2. List available here
http://www.idiap.ch/software/bob/docs/releases/v1.2.2/sphinx/html/Dependencies.html#section-dependencies
1.c. Compilation of bob, according to the instructions here:
http://www.idiap.ch/software/bob/docs/releases/v1.2.2/sphinx/html/Compilation.html

2. If you are using a distribution with a pre-packaged release of bob such as Ubuntu 12.04 LTS or Mac OS X, you could just install bob using your package manager, e.g. on ubuntu (see https://github.com/idiap/bob/wiki/Packages)
$
sudo add-apt-repository ppa:biometrics/bob
$ sudo apt-get update
$ sudo apt-get install bob

Once bob is installed properly, you will have to follow the following instructions to install the package xbob.paper.tpami201:
https://pypi.python.org/pypi/xbob.paper.tpami2013#installation


If you don't succeed in installing bob cleanly, please report us the detailed error message as well as information (such as version) about your operating system and dependencies (giflib and boost). A good way to be helped successfully is to follow these guidelines:
http://www.idiap.ch/software/bob/docs/releases/v1.2.2/sphinx/html/TicketReportingDev.html


With kind regards,
Laurent
--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Laurent El Shafey

unread,
Sep 30, 2014, 5:47:53 AM9/30/14
to bob-...@googlegroups.com
Hello,

Following your new issue #194 (please use the mailing list for problem wrt. the installation, except if you identify a 'clear' bug).
https://github.com/idiap/bob/issues/194

If you really compiled bob against giflib 4.2.0, I don't see how you could get the error you reported here:
"""
../../../lib64/libbob_io.so: undefined reference to MakeMapObject' ../../../lib64/libbob_io.so: undefined reference toFreeMapObject'
collect2: error: ld returned 1 exit status
src/io/cxx/CMakeFiles/test_bob_io_image_codec.dir/build.make:102: recipe for target 'bin/test_bob_io_image_codec' failed
make[2]: *** [bin/test_bob_io_image_codec] Error 1
CMakeFiles/Makefile2:765: recipe for target 'src/io/cxx/CMakeFiles/test_bob_io_image_codec.dir/all' failed
"""

In giflib 4.x.y, the following functions should be defined in your giflib header (most probably in /usr/include/gif_lib.h):
"""
267 extern ColorMapObject *MakeMapObject(int ColorCount,
268                                      const GifColorType * ColorMap);
269 extern void FreeMapObject(ColorMapObject * Object);
270 extern ColorMapObject *UnionColorMap(const ColorMapObject * ColorIn1,
271                                      const ColorMapObject * ColorIn2,
272                                      GifPixelType ColorTransIn2[]);
"""

In contrast, in giflib 5.x.y, these functions have been renamed:
"""
extern ColorMapObject *GifMakeMapObject(int ColorCount,
                                     const GifColorType *ColorMap);
extern void GifFreeMapObject(ColorMapObject *Object);
extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1,
                                     const ColorMapObject *ColorIn2,
                                     GifPixelType ColorTransIn2[]);
"""
which would explained the undefined references that you faced.

Could you please make sure that giflib 4.x.y is properly installed, and then try to recompile bob again (after a make clean).

I may give a try in compiling bob on the mageia distribution, but this would take some time.


Another option for you would be to use a virtual machine with bob 1.2 preinstalled. You may find such virtualbox images here:
http://www.idiap.ch/software/bob/images/


Cheers,
Laurent
-- 
Dr. Laurent El Shafey 
Idiap Research Institute
Centre du Parc - Rue Marconi 19
CH-1920 Martigny, Suisse
Phone: +41 27 721 77 95
Fax: +41 27 721 77 12
http://www.idiap.ch/~lelshafey
Reply all
Reply to author
Forward
0 new messages