[CDRIVER-171] Makefile created libmongoc.so but it doesnot contains any symbols Created: 01/Oct/12 Updated: 11/Sep/19 Resolved: 22/Jan/13 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | 0.5.1 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | ahmed talha khan | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | Makefile, compilation, linking | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux 2.6.35.14-97.fc14.x86_64, GCC 4.6.1,GNU Make 3.82 |
||
| Attachments: |
|
| Description |
|
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) 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. |
| Comments |
| Comment by Gary Murakami [ 22/Jan/13 ] |
|
Fix in the following commmit https://github.com/mongodb/mongo-c-driver/commit/ea89d8fa966ccf601a67e1507e67e829775f6bcb Please comment/reopen if there is any remaining issue. |
| Comment by Gary Murakami [ 07/Jan/13 ] |
|
Please retry with the latest 0.7 package. Because of recent changes at github, you may have to clone from github until a new archive file is available. I'm pretty sure that this package addresses your issue. I will be working on the archive file ASAP. |