LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-11-2010, 01:51 PM   #1
paragdas31s
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Rep: Reputation: 0
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....
 
Old 04-12-2010, 10:40 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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.
.....
 
Old 04-12-2010, 03:29 PM   #3
paragdas31s
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 04-12-2010, 03:29 PM   #4
paragdas31s
LQ Newbie
 
Registered: Apr 2010
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile a code in gcc, linux by using self-created library??? payu21 Linux - Newbie 9 05-22-2009 01:40 AM
compile cpp code including iostream ufmale Programming 1 09-13-2008 01:30 AM
source code library app for Subversion climbingmerlin Programming 2 03-20-2007 03:52 AM
LXer: Oracle Leverages Itself into Major Open Source Components including Sendmail, Apache, Linux LXer Syndicated Linux News 0 02-15-2006 10:31 AM
K Develop- including a library nhanitvn Programming 1 08-16-2003 02:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration