[JdeRobot] Generating debian packages for JdeRobot

Roberto Calvo rocapal at gsyc.urjc.es
Tue Mar 24 10:18:02 CET 2015


Hi Francisco,

For creating debian packages we use cpack. So, just type:

rocapal en belmo:~/pentalo/JdeRobot$ sudo cpack .
[sudo] password for rocapal: 
CPack: Create package using DEB
CPack: Install projects
CPack: - Run preinstall target for: jderobot
CPack: - Install project: jderobot
CPack: Create package
CPackDeb: - Generating dependency list
CPack: - package: /home/rocapal/pentalo/JdeRobot/jderobot_5.2.4-rc1_amd64.deb generated.


We have to create some macros in the main CMakeLists.txt to know what
architecture is (amd64, x86) and what distribution is (debian, ubuntu,
and version).

If you see the debian/control file you can see how the dependencies are
set -> ${misc:Depends}

The dependencies of the packages are set in the CMakefiles that you can
find in JdeRobot/Deps/$library/CMakeList. For instance, in boost folder
you can see how the dependencies are set.

SET(DEPS "${DEPS} libboost-system1.46.1, libboost-filesystem1.46.1,")

Since each distribution/architecture have different versions we need to
know the architecture and distribution to set the correct dependency.

If you want, you can create an issue in github about generating debian
packages and I can help you with this task (I'm going to send an email
with the steps for make the pull request).

About your compilation error I don't know what is the reason. I compiled
in debian sid with gcc/g++ 4.9 without problems. Just use cpack and
we'll see.

Best,

El lun, 23-03-2015 a las 13:43 -0700, Francisco Pérez escribió:
> Hi, 
> 
> I'm trying to create a debian package for the new release of JdeRobot that
> include some modifications of the CMakeLists, but I am a little bit lost :(
> I'm using dh_make and dpkg-buildpackage to generate the .deb, but I'm having
> some problems related (I guess) with my lack of knowledge. I've managed to
> do the dh_make --createorig succesfully, but when I try to execute
> dpkg-buildpackage -rfakeroot it give me a lot of errors related with Ice. If
> I compile the project with cmake and make it works perfectly, but when dpkg
> tries to do it, it crash! I think I have to modify the debian/control file
> in order to find the dependences, but I don't understand how it works yet.
> The error I get when I execute /dpkg-buildpackage -rfakeroot/ is the
> following:
> 
> 
> (a lot of same errors)
> ...
> In file included from /usr/include/Ice/Handle.h:23:0,
>                  from /usr/include/Ice/LocalObjectF.h:15,
>                  from
> /home/fran/debianizer/jderobot-5.2.4/src/stable/interfaces/slice/jderobot/../../cpp/jderobot/body.h:24,
>                  from
> /home/fran/debianizer/jderobot-5.2.4/src/stable/interfaces/cpp/jderobot/body.cpp:21:
> /usr/include/Ice/ProxyHandle.h: In instantiation of
> ‘IceInternal::ProxyHandle<T>& IceInternal::ProxyHandle<T>::operator=(const
> IceInternal::ProxyHandle<T>&) [with T = IceProxy::Ice::Object]’:
> /usr/include/Ice/Proxy.h:953:11:   required from here
> /usr/include/Ice/ProxyHandle.h:253:30: error: ‘upCast’ was not declared in
> this scope, and no declarations were found by argument-dependent lookup at
> the point of instantiation [-fpermissive]
>                  upCast(r._ptr)->__incRef();
>                               ^
> In file included from /usr/include/Ice/LocalException.h:29:0,
>                  from
> /home/fran/debianizer/jderobot-5.2.4/src/stable/interfaces/cpp/jderobot/body.cpp:24:
> /usr/include/Ice/Proxy.h:50:34: note: ‘IceProxy::Ice::Object*
> IceInternal::upCast(IceProxy::Ice::Router*)’ declared here, later in the
> translation unit
>  ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Router*);
>                                   ^
> In file included from /usr/include/Ice/Handle.h:23:0,
>                  from /usr/include/Ice/LocalObjectF.h:15,
>                  from
> /home/fran/debianizer/jderobot-5.2.4/src/stable/interfaces/slice/jderobot/../../cpp/jderobot/body.h:24,
>                  from
> /home/fran/debianizer/jderobot-5.2.4/src/stable/interfaces/cpp/jderobot/body.cpp:21:
> /usr/include/Ice/ProxyHandle.h:258:34: error: ‘upCast’ was not declared in
> this scope, and no declarations were found by argument-dependent lookup at
> the point of instantiation [-fpermissive]
>                  upCast(this->_ptr)->__decRef();
>                                   ^
> In file included from /usr/include/Ice/LocalException.h:29:0,
>                  from
> /home/fran/debianizer/jderobot-5.2.4/src/stable/interfaces/cpp/jderobot/body.cpp:24:
> /usr/include/Ice/Proxy.h:50:34: note: ‘IceProxy::Ice::Object*
> IceInternal::upCast(IceProxy::Ice::Router*)’ declared here, later in the
> translation unit
>  ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Router*);
>                                   ^
> In file included from /usr/include/Ice/LocalObjectF.h:15:0,
>                  from
> /home/fran/debianizer/jderobot-5.2.4/src/stable/interfaces/slice/jderobot/../../cpp/jderobot/body.h:24,
>                  from
> /home/fran/debianizer/jderobot-5.2.4/src/stable/interfaces/cpp/jderobot/body.cpp:21:
> /usr/include/Ice/Handle.h: In instantiation of
> ‘IceInternal::Handle<T>::~Handle() [with T = Ice::Object]’:
> /usr/include/c++/4.8/bits/stl_pair.h:96:12:   required from ‘void
> __gnu_cxx::new_allocator<_Tp>::destroy(__gnu_cxx::new_allocator<_Tp>::pointer)
> [with _Tp = std::pair<const int, IceInternal::Handle<Ice::Object> >;
> __gnu_cxx::new_allocator<_Tp>::pointer = std::pair<const int,
> IceInternal::Handle<Ice::Object> >*]’
> /usr/include/c++/4.8/bits/stl_tree.h:395:2:   required from ‘void
> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
> _Alloc>::_M_destroy_node(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
> _Alloc>::_Link_type) [with _Key = int; _Val = std::pair<const int,
> IceInternal::Handle<Ice::Object> >; _KeyOfValue =
> std::_Select1st<std::pair&lt;const int, IceInternal::Handle&lt;Ice::Object>
> > >; _Compare = std::less<int>; _Alloc = std::allocator<std::pair&lt;const
> int, IceInternal::Handle&lt;Ice::Object> > >; std::_Rb_tree<_Key, _Val,
> _KeyOfValue, _Compare, _Alloc>::_Link_type =
> std::_Rb_tree_node<std::pair&lt;const int,
> IceInternal::Handle&lt;Ice::Object> > >*]’
> /usr/include/c++/4.8/bits/stl_tree.h:1127:23:   required from ‘void
> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
> _Alloc>::_M_erase(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
> _Alloc>::_Link_type) [with _Key = int; _Val = std::pair<const int,
> IceInternal::Handle<Ice::Object> >; _KeyOfValue =
> std::_Select1st<std::pair&lt;const int, IceInternal::Handle&lt;Ice::Object>
> > >; _Compare = std::less<int>; _Alloc = std::allocator<std::pair&lt;const
> int, IceInternal::Handle&lt;Ice::Object> > >; std::_Rb_tree<_Key, _Val,
> _KeyOfValue, _Compare, _Alloc>::_Link_type =
> std::_Rb_tree_node<std::pair&lt;const int,
> IceInternal::Handle&lt;Ice::Object> > >*]’
> /usr/include/c++/4.8/bits/stl_tree.h:671:28:   required from
> ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::~_Rb_tree() [with
> _Key = int; _Val = std::pair<const int, IceInternal::Handle<Ice::Object> >;
> _KeyOfValue = std::_Select1st<std::pair&lt;const int,
> IceInternal::Handle&lt;Ice::Object> > >; _Compare = std::less<int>; _Alloc =
> std::allocator<std::pair&lt;const int, IceInternal::Handle&lt;Ice::Object> >
> >]’
> /usr/include/c++/4.8/bits/stl_map.h:96:11:   required from here
> /usr/include/Ice/Handle.h:106:30: error: ‘upCast’ was not declared in this
> scope, and no declarations were found by argument-dependent lookup at the
> point of instantiation [-fpermissive]
>              upCast(this->_ptr)->__decRef();
>                               ^
> In file included from /usr/include/Ice/LocalException.h:29:0,
>                  from
> /home/fran/debianizer/jderobot-5.2.4/src/stable/interfaces/cpp/jderobot/body.cpp:24:
> /usr/include/Ice/Proxy.h:50:34: note: ‘IceProxy::Ice::Object*
> IceInternal::upCast(IceProxy::Ice::Router*)’ declared here, later in the
> translation unit
>  ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Router*);
>                                   ^
> make[3]: ***
> [../src/stable/interfaces/cpp/jderobot/CMakeFiles/JderobotInterfaces.dir/body.cpp.o]
> Error 1
> make[3]: Leaving directory
> `/home/fran/debianizer/jderobot-5.2.4/obj-i686-linux-gnu'
> make[2]: ***
> [../src/stable/interfaces/cpp/jderobot/CMakeFiles/JderobotInterfaces.dir/all]
> Error 2
> make[2]: Leaving directory
> `/home/fran/debianizer/jderobot-5.2.4/obj-i686-linux-gnu'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory
> `/home/fran/debianizer/jderobot-5.2.4/obj-i686-linux-gnu'
> dh_auto_build: make -j1 returned exit code 2
> make: *** [binary] Error 2
> dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit
> status 2
> 
> Anyone knows what am I doing wrong?
> 
> Best,
> 
> P.S.: I'm working in a virtual machine with Ubuntu 14.04.2 x86
> 
> 
> 
> 
> --
> View this message in context: http://jderobot-developer-list.2315034.n4.nabble.com/JdeRobot-Generating-debian-packages-for-JdeRobot-tp4642544.html
> Sent from the Jderobot Developer List mailing list archive at Nabble.com.
> _______________________________________________
> Jde-developers mailing list
> Jde-developers en gsyc.es
> http://gsyc.escet.urjc.es/cgi-bin/mailman/listinfo/jde-developers

-- 
Roberto Calvo Palomino        | Robotics Lab (GSyC) 
R&D Android Mobile Engineer   | Universidad Rey Juan Carlos

Twitter: @rocapal 
Linkedin: http://www.linkedin.com/in/rocapal



More information about the Jde-developers mailing list