LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Including lzo compressor library in linux source code. (https://www.linuxquestions.org/questions/linux-general-1/including-lzo-compressor-library-in-linux-source-code-801391/)

paragdas31s 04-11-2010 01:51 PM

Including lzo compressor library in linux source code.
 
I have downloaded lzo-2.00 package and have installed it linux kernel 2.6 version. Now I want to include the lzo library in the source code of linux.
According to the instructions given in the package, I have copied the files (minilzo.c,minilzo.h,lzoconf.h,lzodefs.h)in the source directory(/mm),added minilzo.o to my Makefile and have included(#include minilzo.h) from my program.

But when I compile the kernel,I am getting errors.
Errors:
->limits.h:No such file or directory
->assert.h:No such file or directory

Plz kindly help me in this problem!!!!
Its very urgent....

knudfl 04-12-2010 10:40 AM

Welcome to LQ.

""According to the instructions given in the package..""
Which instructions ? ?
Where did you read about copying files to linux-2.6.xx/mm/ ? ?

Reading this http://www.oberhumer.com/opensource/lzo/ , it seems
that lzo-2.0x is a user space library. The files you mention from
minilzo-2.0: also meant for user space applications, not kernel ?

http://www.oberhumer.com/opensource/lzo/download/
http://www.oberhumer.com/opensource/...zo-2.03.tar.gz
>>> lzo-2.03.tar.gz

http://free-electrons.com/blog/lzo-kernel-compression/ :
"" .. features in Linux 2.6.30 :
new compression options have been recently added to the kernel.""

Example 2.6.32, the files using the lzo algorithm looks like ..
find linux-2.6.32.6/ -name *lzo*
linux-2.6.32.6/fs/jffs2/compr_lzo.c
linux-2.6.32.6/lib/lzo/lzo1x_compress.c ←
linux-2.6.32.6/lib/lzo/lzodefs.h
linux-2.6.32.6/lib/lzo/lzo1x_decompress.c ←
linux-2.6.32.6/crypto/lzo.c
linux-2.6.32.6/include/linux/lzo.h

The headers, you are missing : limits.h, assert.h ..
Please tell, which Linux, you are using. And version please.
http://www.linuxquestions.org/linux/...Ask_a_Question
And also tell which kernel, this is about. Full version please.
.....

paragdas31s 04-12-2010 03:29 PM

I am using Fedora_Core7 and linux kernel version-2.6.21.

The instructions you asked were given in the 'Readme' file of the minilzo package under the lzo package. I am sending you some of the instructions given in the file. Hope this would help you in understanding my problem.

============================================================================
miniLZO -- mini subset of the LZO real-time data compression library
============================================================================

Author : Markus Franz Xaver Johannes Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/opensource/lzo/
Version : 2.00
Date : 30 May 2005

I've created miniLZO for projects where it is inconvenient to
include (or require) the full LZO source code just because you
want to add a little bit of data compression to your application.

miniLZO implements the LZO1X-1 compressor and both the standard and
safe LZO1X decompressor. Apart from fast compression it also useful
for situations where you want to use pre-compressed data files (which
must have been compressed with LZO1X-999).

miniLZO consists of one C source file and three header files:
minilzo.c
minilzo.h, lzoconf.h, lzodefs.h

To use miniLZO just copy these files into your source directory, add
minilzo.c to your Makefile and #include minilzo.h from your program.
Note: you also must distribute this file (`README.LZO') with your project.

paragdas31s 04-12-2010 03:29 PM

I am using Fedora_Core7 and linux kernel version-2.6.21.

The instructions you asked were given in the 'Readme' file of the minilzo package under the lzo package. I am sending you some of the instructions given in the file. Hope this would help you in understanding my problem.

============================================================================
miniLZO -- mini subset of the LZO real-time data compression library
============================================================================

Author : Markus Franz Xaver Johannes Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/opensource/lzo/
Version : 2.00
Date : 30 May 2005

I've created miniLZO for projects where it is inconvenient to
include (or require) the full LZO source code just because you
want to add a little bit of data compression to your application.

miniLZO implements the LZO1X-1 compressor and both the standard and
safe LZO1X decompressor. Apart from fast compression it also useful
for situations where you want to use pre-compressed data files (which
must have been compressed with LZO1X-999).

miniLZO consists of one C source file and three header files:
minilzo.c
minilzo.h, lzoconf.h, lzodefs.h

To use miniLZO just copy these files into your source directory, add
minilzo.c to your Makefile and #include minilzo.h from your program.
Note: you also must distribute this file (`README.LZO') with your project.


All times are GMT -5. The time now is 02:44 AM.