Understanding constraint graph cycles

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Understanding constraint graph cycles

James Turner-2
Hi,

Since upgrading to a recent CMake, the FLightGear build system is now reporting this:

==========
        CMake Warning at utils/fgai/CMakeLists.txt:1 (add_executable):
  Cannot generate a safe runtime search path for target fgai because there is
  a cycle in the constraint graph:

    dir 0 is [/home/jenkins/workspace/FlightGear/dist/lib64]
      dir 1 must precede it due to runtime library [libosgText.so.130]
    dir 1 is [/home/jenkins/workspace/SimGear/dist/lib64]
      dir 0 must precede it due to runtime library [libosgText.so.130]

  Some of these libraries may not be found correctly.
==============


I can guess various dumb things I might have done to cause this, but can anyone give me some context? This is about rpath setting in the executables?

SimGear is a helper library for FlightGear, build as static libs, and imported into FlightGear directly. SimGear and FlightGear both depend on OpenSceneGraph, and on our buiuld server (but not commonly in real life) Simgear and FlightGear are being configured with different install prefixes (that’s the /home/jenkins/workspace/<project>dist/lib64 part)

Again rather than making ad-hoc changes to fix this, I’d like a bit more understanding about what is intended here, if anyone can suggest it.

All this code is publicly visible on SourceForge BTW:

        https://sourceforge.net/p/flightgear/_list/git?source=navbar

Kind regards,
James
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Understanding constraint graph cycles

Robert Maynard
Hi,

Yes you are correct the issue is related to rpath. When CMake constructs the rpath for the library linking it will have two paths ( /home/jenkins/workspace/FlightGear/dist/lib64, /home/jenkins/workspace/SimGear/dist/lib64) each that contain a copy of libosgText.so.130. CMake is warning that which version of libosgText is undefined.

On Thu, Aug 24, 2017 at 10:08 AM, James Turner <[hidden email]> wrote:
Hi,

Since upgrading to a recent CMake, the FLightGear build system is now reporting this:

==========
        CMake Warning at utils/fgai/CMakeLists.txt:1 (add_executable):
  Cannot generate a safe runtime search path for target fgai because there is
  a cycle in the constraint graph:

    dir 0 is [/home/jenkins/workspace/FlightGear/dist/lib64]
      dir 1 must precede it due to runtime library [libosgText.so.130]
    dir 1 is [/home/jenkins/workspace/SimGear/dist/lib64]
      dir 0 must precede it due to runtime library [libosgText.so.130]

  Some of these libraries may not be found correctly.
==============


I can guess various dumb things I might have done to cause this, but can anyone give me some context? This is about rpath setting in the executables?

SimGear is a helper library for FlightGear, build as static libs, and imported into FlightGear directly. SimGear and FlightGear both depend on OpenSceneGraph, and on our buiuld server (but not commonly in real life) Simgear and FlightGear are being configured with different install prefixes (that’s the /home/jenkins/workspace/<project>dist/lib64 part)

Again rather than making ad-hoc changes to fix this, I’d like a bit more understanding about what is intended here, if anyone can suggest it.

All this code is publicly visible on SourceForge BTW:

        https://sourceforge.net/p/flightgear/_list/git?source=navbar

Kind regards,
James
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Understanding constraint graph cycles

James Turner-2

On 4 Sep 2017, at 18:37, Robert Maynard <[hidden email]> wrote:

Yes you are correct the issue is related to rpath. When CMake constructs the rpath for the library linking it will have two paths ( /home/jenkins/workspace/FlightGear/dist/lib64, /home/jenkins/workspace/SimGear/dist/lib64) each that contain a copy of libosgText.so.130. CMake is warning that which version of libosgText is undefined.

Can I control whether CMake includes the rpath flags for a static library like SimGear? Normally the default behaviour is correct but for this particular config it would be easier to disable the rpath for OSG inside SimGear, than adjust the build setup to use a common dist dir, I think.

Kind regards,
James


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Understanding constraint graph cycles

Robert Maynard
Yes,

You most likely want to look at BUILD_RPATH or INSTALL_RPATH depending
on if these libraries are located in your build directory or install
directory.

On Mon, Sep 4, 2017 at 4:39 PM, James Turner <[hidden email]> wrote:

>
> On 4 Sep 2017, at 18:37, Robert Maynard <[hidden email]> wrote:
>
> Yes you are correct the issue is related to rpath. When CMake constructs the
> rpath for the library linking it will have two paths (
> /home/jenkins/workspace/FlightGear/dist/lib64,
> /home/jenkins/workspace/SimGear/dist/lib64) each that contain a copy of
> libosgText.so.130. CMake is warning that which version of libosgText is
> undefined.
>
>
> Can I control whether CMake includes the rpath flags for a static library
> like SimGear? Normally the default behaviour is correct but for this
> particular config it would be easier to disable the rpath for OSG inside
> SimGear, than adjust the build setup to use a common dist dir, I think.
>
> Kind regards,
> James
>
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake