Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Static Qt build (Windows) missed some libraries
Qt 6.11 is out! See what's new in the release blog

Static Qt build (Windows) missed some libraries

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
13 Posts 4 Posters 3.9k Views 1 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.
  • JoeCFDJ JoeCFD

    @mzimmers said in Static Qt build missed some libraries:

    fontconfig
    on Ubuntu
    sudo apt-get -y install fontconfig

    mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #3

    @JoeCFD I'm not sure I understand, but this is a Windows 10 build.

    JonBJ 1 Reply Last reply
    0
    • mzimmersM mzimmers

      @JoeCFD I'm not sure I understand, but this is a Windows 10 build.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #4

      @mzimmers
      When you ask a question like this please always state your platform, and in the case of Windows whether you are using MSVC of MinGW, we cannot guess/remember!

      Also please give some context to the error (e.g. from the Build Output pane). I had initially thought this was an error from the linker, indicating it cannot find the libraries. However looking at

      :-1: error: cannot find -lfontconfig
      

      is that actually an error from qmake/the Makefile, indicating that it sees a file/target named -lfontconfig which it cannot find?

      Answer going forward depends on the above....

      mzimmersM 1 Reply Last reply
      0
      • JonBJ JonB

        @mzimmers
        When you ask a question like this please always state your platform, and in the case of Windows whether you are using MSVC of MinGW, we cannot guess/remember!

        Also please give some context to the error (e.g. from the Build Output pane). I had initially thought this was an error from the linker, indicating it cannot find the libraries. However looking at

        :-1: error: cannot find -lfontconfig
        

        is that actually an error from qmake/the Makefile, indicating that it sees a file/target named -lfontconfig which it cannot find?

        Answer going forward depends on the above....

        mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #5

        @JonB sorry about that...platform is now in title.

        My kit is using the MinGW 8.1.0 32-bit compilers.

        The error is indeed coming from the linker. QMake runs fine.

        Thanks...

        JonBJ 1 Reply Last reply
        0
        • mzimmersM mzimmers

          @JonB sorry about that...platform is now in title.

          My kit is using the MinGW 8.1.0 32-bit compilers.

          The error is indeed coming from the linker. QMake runs fine.

          Thanks...

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #6

          @mzimmers
          OK, well, if it is the linker, search your whole disk for libfontconfig.a, there are two possibilities:

          • You have the file(s) somewhere but not being found. Tell it where to find them.
          • You do not have the files anywhere. Check what you have installed/re-install.
          mzimmersM 1 Reply Last reply
          0
          • JonBJ JonB

            @mzimmers
            OK, well, if it is the linker, search your whole disk for libfontconfig.a, there are two possibilities:

            • You have the file(s) somewhere but not being found. Tell it where to find them.
            • You do not have the files anywhere. Check what you have installed/re-install.
            mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by
            #7

            @JonB when you say "reinstall," do you mean I have to perform the entire build again, or is there a mechanism for telling the configure command to perform an incremental operation.

            Does configure have an option to "undo" itself - to return the repo to an unaltered state, or is it OK to just do this with a git reset? (I'm trying to minimize the time taken to perform the configure/build steps, as they're quite long on my system.)

            Oh: the file libfontconfig.a doesn't exist even on my system "A" where the build works. So, it seems like I made some kind of mistake in the configuration.

            Thanks...

            1 Reply Last reply
            0
            • hskoglundH Offline
              hskoglundH Offline
              hskoglund
              wrote on last edited by
              #8

              Hi, don't know if this helps, but I recognize that error message from when building a static Qt 6.3.0 version on Ubuntu 22.04 using gcc 11.2.0. The cure on Ubuntu is:
              sudo apt install libfontconfig-dev
              but that's not applicable on Windows 10 :-(

              Check your configure command line, perhaps there's a
              -fontconfig
              that causes the error? If so try removing it...

              mzimmersM 1 Reply Last reply
              0
              • hskoglundH hskoglund

                Hi, don't know if this helps, but I recognize that error message from when building a static Qt 6.3.0 version on Ubuntu 22.04 using gcc 11.2.0. The cure on Ubuntu is:
                sudo apt install libfontconfig-dev
                but that's not applicable on Windows 10 :-(

                Check your configure command line, perhaps there's a
                -fontconfig
                that causes the error? If so try removing it...

                mzimmersM Offline
                mzimmersM Offline
                mzimmers
                wrote on last edited by
                #9

                @hskoglund my configure command doesn't have anything like that. Here's what I'm currently using:

                $ configure -confirm-license -static -static-runtime -opensource -release -platform win32-g++ -opengl desktop -skip qtwebengine -nomake examples -nomake tests -nomake tools -recheck-all -prefix c:\qt\5.15.2_static
                

                Again, what's really confusing is that my other system (the one that works) doesn't have that library anyway, so somehow, on this system, I'm introducing a false dependency...I just don't know how I'm doing that.

                1 Reply Last reply
                0
                • hskoglundH Offline
                  hskoglundH Offline
                  hskoglund
                  wrote on last edited by
                  #10

                  Do any of your 2 Windows 10 systems have WSL or WSL2 installed? Perhaps those messes with your build somehow...

                  mzimmersM 1 Reply Last reply
                  0
                  • hskoglundH hskoglund

                    Do any of your 2 Windows 10 systems have WSL or WSL2 installed? Perhaps those messes with your build somehow...

                    mzimmersM Offline
                    mzimmersM Offline
                    mzimmers
                    wrote on last edited by
                    #11

                    @hskoglund both of them do. But, how would that be affecting this?

                    1 Reply Last reply
                    0
                    • hskoglundH Offline
                      hskoglundH Offline
                      hskoglund
                      wrote on last edited by
                      #12

                      Just guessing, the font database in Windows 10 is sometimes shared with WSL/WSL2, perhaps the dependency on fontconfig etc. is picked up that way.

                      1 Reply Last reply
                      0
                      • mzimmersM Offline
                        mzimmersM Offline
                        mzimmers
                        wrote on last edited by mzimmers
                        #13

                        I've been playing with this today, and I just discovered that my commands are building a 64-bit Qt library, which 1) isn't what I intended, and 2) might be part of the problem. I've looked at the options for the configure command, and I don't see a way to specify that I want a 32-bit library. Can someone advise me on what to do here?

                        EDIT: I even added these entries in the qt.pro file to:

                        CONFIG -= x86_64
                        CONFIG += x86
                        

                        Somehow, my build still insists on creating a a Qt library with a profile x66-windows-msys-pe-64bit. WHAT am I doing wrong?

                        Thanks...

                        EDIT 2: this question is really a different subject, so I'm going to ask it in a different thread. Leaving this one open for now until I get to the bottom of the missing libraries.

                        1 Reply Last reply
                        0

                        • Login

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