Begin main content
Search · Index
No registered users in community xowiki
in last 10 minutes

Warning: modload: could not find Ns_ModuleInit in /usr/local/aolserver/bin/

on Ubuntu (12.04 LTS, 14.04 LTS) the Error

Warning: modload: could not find Ns_ModuleInit in /usr/local/aolserver/bin/

The same problem appears when trying to load other optional modules like There are several threads that recommend to add -Wl,no-as-needed to the CFLAGS in each Modules Makefile, which is required. If this still does not fix the Problem, check the output of make, if the Flag '-fvisibility=hidden' is passed to gcc. It will hide all Symbols, unless explicitly specified as public within the source code. The option is "just" an optimization and can be removed from the ns.mak file without greater harm (on Suse it is not set in first place), this is the first solution. The second and better solution is to patch the source code, and add required attributes to the Function Ns_ModuleInit and the Variable Ns_ModuleVersion, which advise gcc to export this symbols and make them access able from outside the module (public), but this has to be done for each Module. Below you find links to patches for the most common Aolserver modules including a description on how to apply them.

First Solution:
The Flag is set in the File

The Line
CFLAGS_EXTRA = -fPIC -pipe -fvisibility=hidden
can be changed to

Second Solution:
First download the patches to the /tmp directory. Then apply the patches by changing into the modules source directory and run the patch command.

root#> cd /tmp
root#> wget
root#> cd /usr/local/src/aolserver-src-dir/nssha1/
root#> patch -p0 < /tmp/nssha1-visibility-0.1.1.patch

Now compile the Module as usual.
The procedure for the patches below is the same, just the patch name and the source directory needs to be changed for the current module.

nsopenssl-visibility-0.1.4.patch (path flag -p1 instead of -p0 to the patch command)