ZLIB FreeBSD 9.1 version + deflateInit_ Symbol not found
John-Mark Gurney
jmg at funkthat.com
Mon Nov 3 19:15:21 UTC 2014
Nagesh Akula wrote this message on Mon, Nov 03, 2014 at 06:28 +0000:
> I am trying to add compression algorithm within the kernel module.
>
> For this, I have included <net/zlib.h> library calls.
>
> With this getting an linker error,
> in FreeBSD 9.1 OS version, getting kldload linker error on deflateInit_ symbol.
>
> link_elf_obj: symbol deflateInit_ undefined
> linker_load_file: Unsupported file type
>
> But, in FreeBSD 10.0 version, the zlib library is able to link properly, and module is working fine.
>
> Please let me know, if there is any way to link ZLIB with our module in FreeBSD 9.1 ?
This is probably because zlib is only compiled when using one of the
following device/options in FreeBSD: crypto, geom_uzip, ipsec, mxge,
netgraph_deflate, ddb_ctf, gzio, or geom_uncompress...
Are you trying to compile you're code as a module or as a static part
of the kernel?
If you're doing it as a part of the kernel, then you need to update
sys/conf/files to include your device/option on the line that has
net/zlib.c on it...
As for why it works on 10, but not 9, is that DDB_CTF was added to
GENERIC, and DDB_CTF forces the inclusion of zlib... So, you could
possibly load a module that uses zlib, or if that doesn't work, recomile
your kernel to include such a device...
Let me know if you have any more questions..
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
More information about the freebsd-drivers
mailing list