View Issue Details

IDProjectCategoryView StatusLast Update
0004182unrealircdpublic2013-04-05 15:37
ReporterDE_Glen Assigned Tosyzop  
Status resolvedResolutionfixed 
Platformx64OSLinuxOS Version3.2.0-39-generic
Product Version3.2.10 
Fixed in Version3.2.10.1 
Summary0004182: custom modules have difficulty linking additional shared libraries
DescriptionI made a module that needed to link to another shared lib. Eg:
make custommodule MODULEFILE=m_evolution EXLIBS=-lmongoc

Problem was linker order in Makefile put EXLIBS before the c file so the deps were not declared in time and the linker optimized away the lib ref; putting -lmongoc after the input C file in the Makefile fixes it.

Patch to fix follows:

diff -r 1672141ba571 -r 3a6ee5b44d73 src/modules/
--- a/src/modules/ Mon Jan 14 02:12:43 2013 -0600
+++ b/src/modules/ Wed Apr 03 10:38:50 2013 -0400
@@ -91,8 +91,8 @@
 build: $(MODULES)
 custommodule: $(MODULEFILE).c
+ -o $(MODULEFILE).so $(MODULEFILE).c $(EXLIBS) l_commands.c $(COMMANDS) $(INCLUDES)
        $(CC) $(CFLAGS) $(MODULEFLAGS) -o l_commands.c \
TagsNo tags attached.
3rd party modules



2013-04-05 15:37

administrator   ~0017472

Thanks for the patch.

- Custom modules: move EXLIBS= so shared libraries are always linked.
  Reported by DE_Glen (0004182).


Issue History

Date Modified Username Field Change
2013-04-03 16:50 DE_Glen New Issue
2013-04-05 15:37 syzop Note Added: 0017472
2013-04-05 15:37 syzop Status new => resolved
2013-04-05 15:37 syzop Fixed in Version =>
2013-04-05 15:37 syzop Resolution open => fixed
2013-04-05 15:37 syzop Assigned To => syzop