Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Building Qt 5.7 on Linux: snprintf_l and sscanf_l not declared

    Installation and Deployment
    5
    5
    1346
    Loading More Posts
    • 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.
    • T
      tostiheld last edited by

      I'm trying to build Qt 5.7 with debug symbols on my local machine. Steps I have followed up to now:

      • install Qt using the unified setup
      • also select sources of Qt 5.7 when given the option
      • cd to the sources directory
      • run ./configure -debug -opensource -platform linux-g++ -opengl desktop -nomake examples -nomake tests
      • run make -j 6

      Building starts, but after a few seconds it stops with the following message:

      In file included from tools/qlocale_tools.cpp:42:0:
      tools/qdoublescanprint_p.h: In function ‘int qDoubleSscanf(const char*, locale_t, const char*, double*, int*)’:
      tools/qdoublescanprint_p.h:141:54: error: ‘sscanf_l’ was not declared in this scope
           return sscanf_l(buf, locale, format, d, processed);
                                                            ^
      tools/qdoublescanprint_p.h: In function ‘int qDoubleSnprintf(char*, size_t, locale_t, const char*, double)’:
      tools/qdoublescanprint_p.h:145:53: error: ‘snprintf_l’ was not declared in this scope
           return snprintf_l(buf, buflen, locale, format, d);
      

      I don't know how to solve this, since I believe that function is part of stdlib, which is of course installed on my machine.

      1 Reply Last reply Reply Quote 1
      • hskoglund
        hskoglund last edited by

        Hmm googling snprintf_l looks like it's available on Windows and on the Mac, but not on Linux :-( Maybe it's a bug...

        1 Reply Last reply Reply Quote 0
        • A
          Anon last edited by

          I'm having the same issue, i'm not able to build despite following this guide and update all dependencies https://wiki.qt.io/Building_Qt_5_from_Git

          kshegunov 1 Reply Last reply Reply Quote 0
          • kshegunov
            kshegunov Moderators @Anon last edited by

            I build Qt from sources regularly and haven't had a care in the world (following the same wiki you posted). Are you sure you have all the dependencies? For example libc-dev?

            Read and abide by the Qt Code of Conduct

            1 Reply Last reply Reply Quote 3
            • H
              Hana A.Aziz last edited by

              Did you manage to fix this problem?
              I face the exact issue and i cannot find a solution.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post