Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3339

Hardcoded libdir in src/libmongoc/CMakeLists.txt

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.16.0
    • Affects Version/s: None
    • Component/s: Build, cmake, packaging
    • Labels:
      None
    • Environment:
      Fedora 29

      The libdir variable is hardcoded in src/libmongoc/CMakeLists.txt and cannot be change using cmake parameter, it is used in the *.pc.in files and as a result on distributions that have different libdir for 64bit like Redhat/Fedora/... pkg-config add a wrong library directory to LDFLAGS.

      $ rpm -q mongo-c-driver-devel
      mongo-c-driver-devel-1.13.1-1.fc29.x86_64

      $ rpm -ql mongo-c-driver-develĀ  | grep libmongoc-1.0.so
      /usr/lib64/libmongoc-1.0.so

      $ pkg-config --libs libmongoc-1.0
      -L/usr/lib -lmongoc-1.0 -lbson-1.0

      $ pkg-config --libs libmongoc-ssl-1.0
      -L/usr/lib -lmongoc-1.0 -lbson-1.0

            Assignee:
            Unassigned Unassigned
            Reporter:
            vvvelichkov Vasil Velichkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: