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

Makefile created libmongoc.so but it doesnot contains any symbols

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 0.5.1
    • Component/s: None
    • Environment:
      Linux 2.6.35.14-97.fc14.x86_64, GCC 4.6.1,GNU Make 3.82

      I am trying to use the c driver but getting problems linking with it. The compile process for the driver created libmongoc.so and libmongoc.a. I am trying to link dynamically to the .so object by the giving the "-lmongo" to the linker line for my application. This gave me run-time errors related to undefined symbol in my final application. Running objdump and readelf on libmongoc.so shows that NONE of these symbols are present in it. It effectively has no symbol at all in it. All these symbols are only present in the libmongoc.a(static archive). Looking the the related portions in Makefile i found that:

      MONGO_DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(MONGO_DYLIB_MINOR_NAME) -o $(MONGO_DYLIBNAME) $(ALL_LDFLAGS)

      (MONGO_DYLIBNAME): $(MONGO_OBJECTS)
      $(MONGO_DYLIB_MAKE_CMD)

      There are no objects being passed to the last make command which effectivly means theres is nothing in the .so file. Is this a bug or i am looking at the problem wrongly?

      Also kindly tell HOW TO link properly to the .so object. I am attaching the output of readelf on the almost empty .so file.

            Assignee:
            Unassigned Unassigned
            Reporter:
            auny ahmed talha khan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: