Hi, I'm trying to build a Debian package but I have found a problem with a libboost dependency. I'm totally new to building Debian packages. I'm using bzr builddeb for building. It generates a .dsc file containing: ... Build-Depends: debhelper (>= 8.0.0), libfreetype6-dev, libunittest++-dev (>= 1.3.0), zlib1g (>= 1:1.1.4), libpng-dev, libboost-date-time-dev, libboost-thread-dev ...
But when all files are compiled and it is going to link, it fails with the following error (from .build log): ... /datos/USR/lm/build/lomse/build-area/lomse-0.12.4/obj-i686-linux-gnu/bin/testlib: error while loading shared libraries: libboost_date_time.so.1.42.0: cannot open shared object file: No such file or directory ... At this point I'm completely lost because libboost_date_time version 1.42.0 is installed in my machine, as dpkg shows: $ dpkg -l | grep 'boost' ii libboost-date-time-dev 1.48.0.2 date-time libraries based on generic programming (default version) rc libboost-date-time1.42.0 1.42.0-4ubuntu2 set of date-time libraries based on generic programming concepts ii libboost-date-time1.46-dev 1.46.1-7ubuntu3 set of date-time libraries based on generic programming concepts ii libboost-date-time1.46.1 1.46.1-7ubuntu3 set of date-time libraries based on generic programming concepts rc libboost-python1.42.0 1.42.0-4ubuntu2 Boost.Python Library rc libboost-python1.46.1 1.46.1-5ubuntu2 Boost.Python Library ii libboost-serialization1.42.0 1.42.0-4ubuntu2 serialization library for C++ ii libboost-serialization1.46-dev 1.46.1-7ubuntu3 serialization library for C++ ii libboost-serialization1.46.1 1.46.1-7ubuntu3 serialization library for C++ ii libboost-thread-dev 1.48.0.2 portable C++ multi-threading (default version) rc libboost-thread1.42.0 1.42.0-4ubuntu2 portable C++ multi-threading ii libboost-thread1.46-dev 1.46.1-7ubuntu3 portable C++ multi-threading ii libboost-thread1.46.1 1.46.1-7ubuntu3 portable C++ multi-threading ii libboost1.46-dev 1.46.1-7ubuntu3 Boost C++ Libraries development files $ Also, I do not understand why it tries to link to version 1.42.0. The point is that I use CMake for generating the makefile. Before attempting to build the Debian package I have tested my CMakeList.txt file. I can generate the makefile, and build from the command line, by doing: $ cmake -G "Unix Makefiles" ../sources $ make This works perfectly. My debian/rules file contains: #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/cmake.mk In the build log (file .build) I see that libboost 1.46.1 is found: ... -- Boost version: 1.46.1 -- Found the following Boost libraries: -- date_time -- thread Boost found: libraries: /usr/lib/libboost_date_time-mt.so;/usr/lib/libboost_thread-mt.so;pthread Boost found: include= /usr/include Boost found: libdir= /usr/lib Boost found: version= 1_46_1 ... Those lines are generated by CMakeList.txt file, containing: ... # Check for Boost >= 1.42.0 set(Boost_ADDITIONAL_VERSIONS "1.42" "1.42.0" "1.43" "1.43.0" "1.44" "1.44.0" "1.45" "1.45.0" "1.46" "1.46.0" "1.47" "1.47.0" "1.48" "1.48.0""1.49" "1.49.0" "1.50" "1.50.0" ) #set(Boost_USE_STATIC_LIBS OFF) #set(Boost_USE_MULTITHREADED OFF) #set(Boost_USE_STATIC_RUNTIME OFF) #set(Boost_DEBUG TRUE) find_package(Boost 1.42.0 COMPONENTS date_time thread REQUIRED) if(Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) link_libraries( ${Boost_LIBRARIES} ) link_directories( ${Boost_LIBRARY_DIRS} ) message("Boost found: libraries: ${Boost_LIBRARIES}" ) message("Boost found: include= ${Boost_INCLUDE_DIRS}" ) message("Boost found: libdir= ${Boost_LIBRARY_DIRS}" ) message("Boost found: version= ${Boost_LIB_VERSION}" ) else() message(SEND_ERROR "Boost package not found. Reason: ${Boost_ERROR_REASON}" ) endif() ... As in no place in my CMakeList.txt file nor in any other debian/ file I point to 1.42.0 version, but to the found version, I do not understand why it tries to use version 1.42.0 instead of 1.46 and from where the 1.42.0" string comes. But in any case, both are present! I would greatly appreciate any clues or help to solve this issue. I'm a newbie on this (my first deb package) and I am completely lost. Thank you in advance. Cecilio Salmeron