Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. PkgConfig cannot find directfb
QtWS25 Last Chance

PkgConfig cannot find directfb

Scheduled Pinned Locked Moved Solved Mobile and Embedded
pkgconfigdirectfbcmake5.5.1ubuntu
8 Posts 3 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JoeA.B
    wrote on last edited by
    #1

    The project uses CMake to build an embedded Linux environment.
    The initial development runs on a Linux desktop. It was working. I renamed a parent folder to avoid scripting issues between two development environments.
    I am building on Ubuntu 16.04 inside of VS-Code It generates the output:
    [cmake] Qt version: 5.5.1
    [cmake] -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
    [cmake] -- Checking for module 'directfb'
    [cmake] -- No package 'directfb' found
    [cmake] -- Configuring incomplete, errors occurred!

    When I ran sudo apt-get install -y libdirectfb-1.2-9 it showed
    libdirectfb-1.2-9 is already the newest version (1.2.10.0-5.1).
    It is installed in /usr/lib/x86_64-linux-gnu/directfb-1.2-9/

    How do I tell my environment (env or VS-Code) how to find the directfb library?

    raven-worxR 1 Reply Last reply
    0
    • J JoeA.B

      @raven-worx I do not understand. Both pkgconf and pkg-config show directfb DirectFB. I do not know how to create a custom .pc file and cannot do a direct link.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #6

      @JoeA-B said in PkgConfig cannot find directfb:

      Both pkgconf and pkg-config show directfb DirectFB. I do not know how to create a custom .pc file

      then does your CMAKE project even use pkgconfig to look for the directfb lib?
      e.g. with https://cmake.org/cmake/help/latest/module/FindPkgConfig.html
      If so try adding the path /usr/lib/x86_64-linux-gnu/pkgconfig to the PKG_CONFIG_PATH env variable

      and cannot do a direct link.

      why not? pkgconfig simply provides the flags used for linking, like you would do when linking against it "manually"

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      J 1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        Your version of DirectFB may possibly not provide a pkg-config file. Do you have a directfb.pc file somewhere in your machine ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        J 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Your version of DirectFB may possibly not provide a pkg-config file. Do you have a directfb.pc file somewhere in your machine ?

          J Offline
          J Offline
          JoeA.B
          wrote on last edited by
          #3

          @SGaist I found the file: /usr/lib/x86_64-linux-gnu/pkgconfig/directfb.pc. My interface project built today but my OS image failed to build. Neither mentioned directfb.

          1 Reply Last reply
          0
          • J JoeA.B

            The project uses CMake to build an embedded Linux environment.
            The initial development runs on a Linux desktop. It was working. I renamed a parent folder to avoid scripting issues between two development environments.
            I am building on Ubuntu 16.04 inside of VS-Code It generates the output:
            [cmake] Qt version: 5.5.1
            [cmake] -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
            [cmake] -- Checking for module 'directfb'
            [cmake] -- No package 'directfb' found
            [cmake] -- Configuring incomplete, errors occurred!

            When I ran sudo apt-get install -y libdirectfb-1.2-9 it showed
            libdirectfb-1.2-9 is already the newest version (1.2.10.0-5.1).
            It is installed in /usr/lib/x86_64-linux-gnu/directfb-1.2-9/

            How do I tell my environment (env or VS-Code) how to find the directfb library?

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #4

            @JoeA-B
            this package doesn't contain a pc file: https://packages.ubuntu.com/xenial/amd64/libdirectfb-1.2-9/filelist

            To make pkgconf find this library you can create a custom .pc file (in one of pkgconf's search paths) or simply link against it directly like you would do with any other library.

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            J 1 Reply Last reply
            0
            • raven-worxR raven-worx

              @JoeA-B
              this package doesn't contain a pc file: https://packages.ubuntu.com/xenial/amd64/libdirectfb-1.2-9/filelist

              To make pkgconf find this library you can create a custom .pc file (in one of pkgconf's search paths) or simply link against it directly like you would do with any other library.

              J Offline
              J Offline
              JoeA.B
              wrote on last edited by
              #5

              @raven-worx I do not understand. Both pkgconf and pkg-config show directfb DirectFB. I do not know how to create a custom .pc file and cannot do a direct link.

              raven-worxR 1 Reply Last reply
              0
              • J JoeA.B

                @raven-worx I do not understand. Both pkgconf and pkg-config show directfb DirectFB. I do not know how to create a custom .pc file and cannot do a direct link.

                raven-worxR Offline
                raven-worxR Offline
                raven-worx
                Moderators
                wrote on last edited by raven-worx
                #6

                @JoeA-B said in PkgConfig cannot find directfb:

                Both pkgconf and pkg-config show directfb DirectFB. I do not know how to create a custom .pc file

                then does your CMAKE project even use pkgconfig to look for the directfb lib?
                e.g. with https://cmake.org/cmake/help/latest/module/FindPkgConfig.html
                If so try adding the path /usr/lib/x86_64-linux-gnu/pkgconfig to the PKG_CONFIG_PATH env variable

                and cannot do a direct link.

                why not? pkgconfig simply provides the flags used for linking, like you would do when linking against it "manually"

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                J 1 Reply Last reply
                2
                • raven-worxR raven-worx

                  @JoeA-B said in PkgConfig cannot find directfb:

                  Both pkgconf and pkg-config show directfb DirectFB. I do not know how to create a custom .pc file

                  then does your CMAKE project even use pkgconfig to look for the directfb lib?
                  e.g. with https://cmake.org/cmake/help/latest/module/FindPkgConfig.html
                  If so try adding the path /usr/lib/x86_64-linux-gnu/pkgconfig to the PKG_CONFIG_PATH env variable

                  and cannot do a direct link.

                  why not? pkgconfig simply provides the flags used for linking, like you would do when linking against it "manually"

                  J Offline
                  J Offline
                  JoeA.B
                  wrote on last edited by
                  #7

                  @raven-worx I got it to work but am still not sure how setting PKG_CONFIG_PATH helped.

                  Why not link? I am adding a module to a full operating system and cannot control the rest of the configuration.

                  raven-worxR 1 Reply Last reply
                  0
                  • J JoeA.B

                    @raven-worx I got it to work but am still not sure how setting PKG_CONFIG_PATH helped.

                    Why not link? I am adding a module to a full operating system and cannot control the rest of the configuration.

                    raven-worxR Offline
                    raven-worxR Offline
                    raven-worx
                    Moderators
                    wrote on last edited by raven-worx
                    #8

                    @JoeA-B said in PkgConfig cannot find directfb:

                    Why not link? I am adding a module to a full operating system and cannot control the rest of the configuration

                    still a simple -ldirectfb parameter should work on all systems, when the plugin is in a default lib directory (which /usr/lib/x86_64-linux-gnu is btw for example on Debian/Ubuntu)

                    --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                    If you have a question please use the forum so others can benefit from the solution in the future

                    1 Reply Last reply
                    2

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved