Project

General

Profile

Actions

Bug #287

closed

conditionnal PREFER issues

Added by Guilhem Saurel over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-

Description

Hello,

Ubuntu provides omniORB and its python 2 bindings. So by default, on that platform, we set PREFER to system.
But if we need python 3 bindings, we need to set a PREFER to robotpkg, as there are no system packages.

But then, if we build a package that need omniORB but not python (like hpp-template-corba), it will use the system version and link to libomniORB4.so.1 from /usr/lib.
And after that, building a package that need this one and python 3 (like hpp-corbaserver), it will link to libomniORB4.so.2 from /opt/openrobots/lib.

It doesn't hurt on 18.04, because both are libomniORB4.so.2, so at runtime, the dynamic link resolution works. But on 16.04 we get a segfault because of the double link to both .1 & .2:

$ ldd /opt/openrobots/bin/hppcorbaserver | grep omni
    libomniORB4.so.2 => /opt/openrobots/lib/libomniORB4.so.2 (0x00007f635e6c8000)
    libomnithread.so.4 => /opt/openrobots/lib/libomnithread.so.4 (0x00007f635e4c2000)
    libomniDynamic4.so.2 => /opt/openrobots/lib/libomniDynamic4.so.2 (0x00007f635c9ed000)
    libomniORB4.so.1 => /usr/lib/libomniORB4.so.1 (0x00007f6359e89000)
    libomnithread.so.3 => /usr/lib/libomnithread.so.3 (0x00007f6359c83000)

I find it strange that we didn't get this issue before.

Am I doing anything wrong ? Do we have a better way to do this ?
Otherwise, I think that the easiest workaround would be to use PREFER = robotpkg all the time.

Actions #1

Updated by Anthony Mallet over 3 years ago

Am I doing anything wrong ? Do we have a better way to do this ?

I think that adding the dependency on python in omniORB/depend.mk
might help. This was not added so far because python is actually an
internal dependency and should not be visible to users of omniidl et
al. But it is not so hidden, in practice.

Also, now that python2 is going to vanish, this will be less an issue
(recent ubuntu have omniORB with python3).

Otherwise, I think that the easiest workaround would be to use
PREFER = robotpkg all the time.

This would be the easy fix, but it's really better to use system
packages when they are present. Otherwise the risk is high of having
mixed dependencies (like you have with different versions of
libomniORB).

Actions #2

Updated by Guilhem Saurel over 3 years ago

Oh, right, omniORB/depend.mk has conditions on PYTHON_MAJOR without any inclusion of python.mk… I'll check if this fix my current issue, thanks !

Actions #3

Updated by Guilhem Saurel over 3 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF