Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1423

Android ndk18 not working with static c++ runtime

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 1.13.0, 1.12.2
    • Fix Version/s: 1.13.0
    • Component/s: Toolchains: Clang/LLVM
    • Labels:
      None

      Description

      When linking application with Android.ndk.appStl: "c+_static"  i have many "undefined reference" errors for libc+_static.a library (log is in attachment).

      Seems like those symbols are located in ndk-bundle/sources/cxx-stl/llvm-libc+/libs/arm64-v8a/libc+abi.a.

      But I can not link it from my application code because qbs orders libraries in wrong way in this case, and error does not go away.

      as a quick fix I have patched android-gcc.qbs file like this

      staticLibraries: {
       var libs = ["gcc"];
       if (staticStlFilePath)
           //libs.push(staticStlFilePath);
             libs.push(staticStlFilePath, FileInfo.joinPaths(stlLibsDir, staticLibraryPrefix + "c++abi" + staticLibrarySuffix));
             return libs;
       }
      

      with such fix it links successfully.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            nsk Mikhail Fedotov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes