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
Forum Updated to NodeBB v4.3 + New Features

PkgConfig cannot find directfb

Scheduled Pinned Locked Moved Solved Mobile and Embedded
pkgconfigdirectfbcmake5.5.1ubuntu
8 Posts 3 Posters 1.7k Views 2 Watching
  • 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 26 Mar 2021, 22:16 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?

    R 1 Reply Last reply 29 Mar 2021, 14:12
    0
    • J JoeA.B
      29 Mar 2021, 22:10

      @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.

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 30 Mar 2021, 10:45 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 30 Mar 2021, 21:19
      2
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 27 Mar 2021, 19:56 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 29 Mar 2021, 13:42
        0
        • S SGaist
          27 Mar 2021, 19:56

          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 29 Mar 2021, 13:42 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
            26 Mar 2021, 22:16

            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?

            R Offline
            R Offline
            raven-worx
            Moderators
            wrote on 29 Mar 2021, 14:12 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 29 Mar 2021, 22:10
            0
            • R raven-worx
              29 Mar 2021, 14:12

              @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 29 Mar 2021, 22:10 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.

              R 1 Reply Last reply 30 Mar 2021, 10:45
              0
              • J JoeA.B
                29 Mar 2021, 22:10

                @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.

                R Offline
                R Offline
                raven-worx
                Moderators
                wrote on 30 Mar 2021, 10:45 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 30 Mar 2021, 21:19
                2
                • R raven-worx
                  30 Mar 2021, 10:45

                  @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 30 Mar 2021, 21:19 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.

                  R 1 Reply Last reply 31 Mar 2021, 08:43
                  0
                  • J JoeA.B
                    30 Mar 2021, 21:19

                    @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.

                    R Offline
                    R Offline
                    raven-worx
                    Moderators
                    wrote on 31 Mar 2021, 08:43 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

                    5/8

                    29 Mar 2021, 22:10

                    • Login

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