in last 10 minutes
Warning: modload: could not find Ns_ModuleInit in /usr/local/aolserver/bin/nssha1.soon Ubuntu (12.04 LTS, 14.04 LTS) the Error
Warning: modload: could not find Ns_ModuleInit in /usr/local/aolserver/bin/nssha1.so
The same problem appears when trying to load other optional modules like nscache.so. 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.
The Flag is set in the File
CFLAGS_EXTRA = -fPIC -pipe -fvisibility=hidden
can be changed to
CFLAGS_EXTRA = -fPIC -pipe
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 http://www.clever-devel.com/file/35054/nssha1-visibility-0.1.1.patch
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)