How to make sure that there is no undefined references to a module
I am trying to develope a little module of my own, the modules compiles fine. But to make sure that my modules has no undefined references, I added this to the Makefile :- RLM_LDFLAGS = -Wl,--no-undefined I tried the idea on one of the simplest module which comes with the sources, rlm_exec, but after that the module then failed to compile, having lots of undefined references. eg :- :273: undefined reference to `radlog' :442: undefined reference to `radius_exec_program' Any advise how should I go about fixing this problem ?
On 09/07/2011 04:48 PM, Ming-Ching Tiew wrote:
I am trying to develope a little module of my own, the modules compiles fine. But to make sure that my modules has no undefined references, I added this to the Makefile :-
RLM_LDFLAGS = -Wl,--no-undefined
I tried the idea on one of the simplest module which comes with the sources, rlm_exec, but after that the module then failed to compile, having lots of undefined references.
eg :- :273: undefined reference to `radlog' :442: undefined reference to `radius_exec_program'
These symbols are in the main executable.
Any advise how should I go about fixing this problem ?
Ha! Good luck with that... You can't, probably. Don't do that.
Ming-Ching Tiew wrote:
I am trying to develope a little module of my own, the modules compiles fine. But to make sure that my modules has no undefined references, I added this to the Makefile :-
RLM_LDFLAGS = -Wl,--no-undefined
The modules all require symbols from the server coe.
I tried the idea on one of the simplest module which comes with the sources, rlm_exec, but after that the module then failed to compile, having lots of undefined references.
eg :- :273: undefined reference to `radlog' :442: undefined reference to `radius_exec_program'
Any advise how should I go about fixing this problem ?
Remove the " -Wl,--no-undefined" change. Or, update the server core so that all of the functions needed by the modules are in a "libfreeradius-server" library. As always, patches are welcome. Alan DeKok.
participants (3)
-
Alan DeKok -
Ming-Ching Tiew -
Phil Mayers