[#4164] trunk kernel build fails at user/mtd-utils.

Document created by Aaronwu Employee on Aug 29, 2013
Version 1Show Document
  • View in full screen mode

[#4164] trunk kernel build fails at user/mtd-utils.

Submitted By: Mingquan Pan

Open Date

2008-06-13 00:32:54     Close Date

2008-06-16 00:07:07


Medium     Assignee:



Closed     Fixed In Release:


Found In Release:

snaps     Release:


N/A     Board:



ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:


Uboot version or rev.:

    Toolchain version or rev.:


App binary format:


Summary: trunk kernel build fails at user/mtd-utils.



trunk kernel build fails at user/mtd-utils now.


make[3]: Leaving directory `/home/test/work/cruise/checkouts/uclinux-dist/user/lrzsz'

[ ! -d "mtd-utils" ] || ( touch mtd-utils/.sgbuilt_user && make -C mtd-utils ) || exit $?

make[3]: Entering directory `/home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils'

unset CC CFLAGS CPPFLAGS CROSS LDFLAGS; make -C 1fd1b5430221b99e05d4f63693ccb0ec11a4af7c WITHOUT_XATTR=1 BUILDDIR=$PWD/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host RAWTARGETS="mkfs.jffs2"

make[4]: Entering directory `/home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/1fd1b5430221b99e05d4f63693ccb0ec11a4af7c'

Makefile:51: no file name for `-include'

mkdir -p /home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host

gcc -I./include -DWITHOUT_XATTR -O2 -Wall -g -c -o /home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host/crc32.o crc32.c -g -Wp,-MD,/home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host/.crc32.c.dep

mkdir -p /home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host

gcc -I./include -DWITHOUT_XATTR -O2 -Wall -g -c -o /home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host/compr_rtime.o compr_rtime.c -g -Wp,-MD,/home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host/.compr_rtime.c.dep

mkdir -p /home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host

gcc -I./include -DWITHOUT_XATTR -O2 -Wall -g -c -o /home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host/mkfs.jffs2.o mkfs.jffs2.c -g -Wp,-MD,/home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host/.mkfs.jffs2.c.dep

mkdir -p /home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host

gcc -I./include -DWITHOUT_XATTR -O2 -Wall -g -c -o /home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host/compr_zlib.o compr_zlib.c -g -Wp,-MD,/home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host/.compr_zlib.c.dep

mkdir -p /home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host

gcc -I./include -DWITHOUT_XATTR -O2 -Wall -g -c -o /home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host/compr_lzo.o compr_lzo.c -g -Wp,-MD,/home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host/.compr_lzo.c.dep

compr_lzo.c:29:23: lzo/lzo1x.h: No such file or directory

compr_lzo.c: In function `jffs2_lzo_cmpr':

compr_lzo.c:54: warning: implicit declaration of function `lzo1x_999_compress'

compr_lzo.c:56: error: `LZO_E_OK' undeclared (first use in this function)

compr_lzo.c:56: error: (Each undeclared identifier is reported only once

compr_lzo.c:56: error: for each function it appears in.)

compr_lzo.c: In function `jffs2_lzo_decompress':

compr_lzo.c:74: warning: implicit declaration of function `lzo1x_decompress_safe'

compr_lzo.c:76: error: `LZO_E_OK' undeclared (first use in this function)

compr_lzo.c: In function `jffs2_lzo_init':

compr_lzo.c:95: error: `LZO1X_999_MEM_COMPRESS' undeclared (first use in this function)

make[4]: *** [/home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/build-1fd1b5430221b99e05d4f63693ccb0ec11a4af7c-host/compr_lzo.o] Error 1

make[4]: Leaving directory `/home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils/1fd1b5430221b99e05d4f63693ccb0ec11a4af7c'

make[3]: *** [all] Error 2

make[3]: Leaving directory `/home/test/work/cruise/checkouts/uclinux-dist/user/mtd-utils'

make[2]: *** [mtd-utils] Error 2

make[2]: Leaving directory `/home/test/work/cruise/checkouts/uclinux-dist/user'

make[1]: *** [all] Error 2

make[1]: Leaving directory `/home/test/work/cruise/checkouts/uclinux-dist/user'

make: *** [subdirs] Error 1




--- Mike Frysinger                                           2008-06-13 01:03:58

you need to install liblzo on your development system


--- Mingquan Pan                                             2008-06-13 03:57:28

but on the regression machine that has this fail,there is liblzo installed:


ls /usr/lib/liblzo.so.1 -l

lrwxrwxrwx  1 root root 15 2005-10-31 20:20 /usr/lib/liblzo.so.1 ->



--- Mike Frysinger                                           2008-06-13 14:58:09

you dont have the *development* package of lzo installed


--- Mingquan Pan                                             2008-06-16 00:07:06

Yeah,after installed lzo-devel, it could build  through now. Close.


--- John Goyette                                             2009-03-16 16:43:56

I have a new Ubuntu 8.10 installation and have liblzo1 and liblzo-dev installed

and I still get this error.  The build error occurs in the 2009 snapshot (Rev.

7745), but not in the 2008R1.5-RC3.


--- Mike Frysinger                                           2009-03-16 17:53:08

then you dont have all the right lzo dev packages installed


--- John Goyette                                             2009-03-17 09:54:40

Then which packages do we need to install for the mtd-utils to compile?  We have

installed everything described on this wiki page:



As I stated, both liblzo1 and liblzo-dev were installed and are current.  The

packaged called "lzo-devel" that Mingquan refers to does not exist. At

least, apt-get reports that it cannot find that package.  the /usr/lib and

/usr/include folders appear to have the correct headers and libraries (see

below).  What are we missing?



prompt$ ls -l /usr/lib/*lzo*

-rw-r--r-- 1 root root 183702 2006-01-13 12:44 /usr/lib/liblzo.a

-rw-r--r-- 1 root root    791 2006-01-13 12:44 /usr/lib/liblzo.la

lrwxrwxrwx 1 root root     15 2009-03-04 14:00 /usr/lib/liblzo.so ->


lrwxrwxrwx 1 root root     15 2009-03-04 14:00 /usr/lib/liblzo.so.1 ->



prompt$ ls -l /usr/include/lzo*

-rw-r--r-- 1 root root  2746 2006-01-13 12:44 /usr/include/lzo16bit.h

-rw-r--r-- 1 root root  2963 2006-01-13 12:44 /usr/include/lzo1a.h

-rw-r--r-- 1 root root  5753 2006-01-13 12:44 /usr/include/lzo1b.h

-rw-r--r-- 1 root root  5748 2006-01-13 12:44 /usr/include/lzo1c.h

-rw-r--r-- 1 root root  3399 2006-01-13 12:44 /usr/include/lzo1f.h

-rw-r--r-- 1 root root  2959 2006-01-13 12:44 /usr/include/lzo1.h

-rw-r--r-- 1 root root  6222 2006-01-13 12:44 /usr/include/lzo1x.h

-rw-r--r-- 1 root root  4998 2006-01-13 12:44 /usr/include/lzo1y.h

-rw-r--r-- 1 root root  5075 2006-01-13 12:44 /usr/include/lzo1z.h

-rw-r--r-- 1 root root  2853 2006-01-13 12:44 /usr/include/lzo2a.h

-rw-r--r-- 1 root root 15110 2006-01-13 12:44 /usr/include/lzoconf.h

-rw-r--r-- 1 root root  2917 2006-01-13 12:44 /usr/include/lzoutil.h



--- Robin Getz                                               2009-03-17 10:15:23

The package "lzo-devel" - is the Suse/Redhat RPM name.


The Ubuntu/Debian name is "liblzo-dev" for 1.08-3 and

"liblzo2-2" / "liblzo2-dev" for 2.02-3.





I'm not sure if 2.x is required for trunk or not.



--- Mike Frysinger                                           2009-03-17 10:50:35

i dont use ubuntu so i have no idea.  you would have to ask someone who actually

uses ubuntu (like on the ubuntu forums).


i imagine you could cheat and make a symlink by doing:

sudo ln -s . /usr/include/lzo


--- John Goyette                                             2009-03-19 13:55:00

Robin's advice to install the v2 packages was the solution for me.  Thanks.  One

difference between the two versions is that the lzo* header files are located in

a subdir /usr/include/lzo/ for the version 2 package.  This is where the current

trunk is looking for them.  Might I suggest that the "Installing

Linux" Wiki page be updated when 2009 RC1 is released.


--- Robin Getz                                               2009-03-20 11:43:56

Docs have been updated - thanks for checking, and letting us know.




--- jeffery palmer                                           2009-08-11 16:49:09

My build fails as well on 2009R1 and worked on 2008R1.


Correct me if I am wrong, but shouldn't mtd-utils be using the header files

from the lib/lzo package and not the host system?


When lib/lzo is built, it copies the header files into the staging/usr/include

directory, but that's obviously not where mtd-utils is looking. Probably a

simple -I staging/usr/include would fix this host dependency issue.


--- Mike Frysinger                                           2009-08-11 16:55:29

no, that is incorrect.  you cannot mix host utils and target utils.  please read

the documentation.












File Name     File Type     File Size     Posted By

No Files Were Found