[Click] Trouble linking MD5 hash functions against Linux kernel module

Daniel Pall dpall at princeton.edu
Thu Dec 6 00:19:09 EST 2007


I'm trying to compile the Linux kernel module with an additional
element included.  That element uses MD5 hashing, so it uses function
calls like MD5_Init, MD5_Update, and MD5_Final as defined in
openssl/md5.h.  I'm #include'ing this file in my code, and I'm also
trying to link with the -lssl flag in the Makefile, but it does not
appear to be working.  Check out this failed compilation:

[root at sw0.dan11.chang.emulab.net:/proj/Chang/tmp/click-1.6.0/linuxmodule
107 ]make
make -C /lib/modules/2.6.19.2-1.2944.fc6.emulab-1/build
M=/proj/Chang/tmp/click-1.6.0/linuxmodule modules
make[1]: Entering directory `/usr/src/linux-2.6.19.2'
  Building modules, stage 2.
  MODPOST 2 modules
WARNING: "MD5_Update"
[/proj/Chang/tmp/click-1.6.0/linuxmodule/click.ko] undefined!
WARNING: "MD5_Final"
[/proj/Chang/tmp/click-1.6.0/linuxmodule/click.ko] undefined!
WARNING: "MD5_Init" [/proj/Chang/tmp/click-1.6.0/linuxmodule/click.ko]
undefined!
make[1]: Leaving directory `/usr/src/linux-2.6.19.2'
[root at sw0.dan11.chang.emulab.net:/proj/Chang/tmp/click-1.6.0/linuxmodule 108 ]

So, this does make a click.ko kernel module, but it's incomplete and I
can't insert it into the kernel, because it can't resolve these MD5
functions (it complains about the MD5* functions as unknown symbols).

Some details: I'm running Linux kernel 2.6.19.2, and on my machine,
libssl.a is contained in /usr/lib.  I noticed in the FAQ there was a
question that seems close to what I want to know:
One of my elements must be linked against another library. How can I
make userlevel Click link with that library?

Basically, I want to know the answer to that question, but for the
Linux kernel module instead of userlevel Click.  Any suggestions?

Thanks for your time,
Dan


More information about the click mailing list