when building driver with zstd, it generates bad .pc file on windows

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: 4.1.4
    • Component/s: Platform Support
    • None
    • None
    • C Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      if you configure and build with zstd installed and on path, it automatically detects and uses. FINE/GREAT.

      But the .pc file generated on windows (
      mongoc2-static.pc) is bad.
      I fixed/workaround with:
       
          @# FIX:
          @#      Requires: bson2-static
          @#      Libs: ${libdir}/mongoc2.lib -lDnsapi secur32.lib crypt32.lib Bcrypt.lib ncrypt.lib -lC:/Sandbox/Stroika/DevRoot/Builds/Debug/lib/zstd.lib
          @#  to
          @#      Requires: bson2-static, libzstd
          @#      Libs: ${libdir}/mongoc2.lib -lDnsapi secur32.lib crypt32.lib Bcrypt.lib ncrypt.lib
          @#
          @${StroikaRoot}ScriptsLib/PrintProgressLine $$((${MAKE_INDENT_LEVEL}+1)) "mongo-cxx-driver ${MONGOCXXDRIRVER_VERSION_} - Patching: ${PER_CONFIGURATION_BUILDS_DIR_}/lib/pkgconfig/mongoc2-static.pc"
          @if grep -q "-l[^ ]*zstd\.lib" "${PER_CONFIGURATION_BUILDS_DIR_}/lib/pkgconfig/mongoc2-static.pc"; then\
              ${StroikaRoot}ScriptsLib/PrintProgressLine $$((${MAKE_INDENT_LEVEL}1)) '';\
              ${SED} -i "s/-l[^ ]*\/zstd\.lib//" "${PER_CONFIGURATION_BUILDS_DIR_}/lib/pkgconfig/mongoc2-static.pc";\
              ${StroikaRoot}ScriptsLib/PrintProgressLine $$((${MAKE_INDENT_LEVEL}1)) '';\
              ${SED} -i "s/Requires: .*/&, libzstd/" "${PER_CONFIGURATION_BUILDS_DIR_}/lib/pkgconfig/mongoc2-static.pc";\
          fi
       

            Assignee:
            Unassigned
            Reporter:
            Lewis G. Pringle, Jr.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: