0

Is there someone who ever built new version mtd-utils 2.0.0.1? The latest mtd-utils uses autotools to configure. But when I used following configure parameter, configure failed.

export PREFIX=/home/ubuntu/source/

./configure --host=arm-linux CC=/home/ubuntu/crosstools/bin/arm-xilinx-linux-gnueabi-gcc --prefix=$PREFIX  ZLIB_CFLAGS=-I$PREFIX/include ZLIB_LIBS=-L$PREFIX/lib LZO_CFLAGS=-I$PREFIX/include/lzo LZO_LIBS=-L$PREFIX/lib

checking for lzo1x_1_15_compress in -llzo2... no
checking for lzo1x_1_15_compress in -llzo... no
configure: error: lzo missing
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.

/home/ubuntu/source/ folder has lzo library and include file, but it still shows lzo missing. Who knows what is wrong with my configure?

osgx
  • 90,338
  • 53
  • 357
  • 513
jackyard
  • 31
  • 2
  • 7
  • Please run `sudo apt-get build-dep mtd-utils`. It will download all packages neede to build the mtd-utils package including lzo and dev libs/headers (in native build). For cross build, do check that lzo library is compiled for ARM and installed into the PREFIX folder (you may also check `config.log`, find exact failed test and its full compilation line and rerun it by hand, checking all required libs and their search paths). Or just download mtd-utils from recent ubuntu for ARM: https://packages.ubuntu.com/artful/mtd-utils mtd-utils (1:2.0.0-1) arm64 170.9 kB 947.0 kB – osgx Jun 24 '17 at 02:17

2 Answers2

1

this sure helps,

sudo apt-get install libssl-dev liblzo2-dev libpam0g-dev
Arun Panneerselvam
  • 2,263
  • 1
  • 17
  • 24
0

Maybe you can try to install dependencies by system, like:

sudo apt install zlib1g-dev liblzo2-dev uuid-dev

Then run command:

./configure --host=arm-linux CC=/home/ubuntu/crosstools/bin/arm-xilinx-linux-gnueabi-gcc --prefix=$PREFIX

The reason I guess is the lzo lib is not correct.

Further reading

Fly
  • 21
  • 3
  • I am fully sure that I installed all lib that mtd-utils required. when I use these configure options, it works now. ./configure --host=arm-xilinx-linux-gnueabi CC=/home/ubuntu/crosstools/zynq_tools/source/bin/arm-xilinx-linux-gnueabi-gcc --prefix=$ PREFIX WITHOUT_XATTR=1 LDFLAGS=-L${MTD_LIB}/lib CFLAGS='-I${MTD_LIB}/include -I${MTD_LIB}/include/lzo -g -O2 -static' LZO_CFLAGS= -I${MTD_LIB}/include/ ZLIB_CFLAGS=-I${MTD_LIB}/include --enable-static=yes – jackyard Jan 15 '18 at 16:14