OpenWrt Forum Archive

Topic: Please help how to solve?

The content of this topic has been archived on 3 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Makefile:63: recipe for target '/home/test/openwrt/dl/lzo-2.09.tar.gz' failed
make[3]: *** [/home/test/openwrt/dl/lzo-2.09.tar.gz] Error 2
make[3]: Leaving directory '/home/test/openwrt/package/libs/lzo'
package/Makefile:196: recipe for target 'package/libs/lzo/compile' failed
make[2]: *** [package/libs/lzo/compile] Error 2
make[2]: Leaving directory '/home/test/openwrt'
package/Makefile:193: recipe for target '/home/test/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.package_compile' failed
make[1]: *** [/home/test/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/test/openwrt'
/home/test/openwrt/include/toplevel.mk:192: recipe for target 'world' failed
make: *** [world] Error 2

test@sumhero:~/openwrt$ make V=99 2>&1 |tee build.log |grep -i error
2017-05-21 03:47:35 ERROR 404: Not Found.
2017-05-21 03:47:36 ERROR 404: Not Found.
make[3]: *** [/home/test/openwrt/dl/lzo-2.09.tar.gz] Error 2
make[2]: *** [package/libs/lzo/compile] Error 2
make[1]: *** [/home/test/openwrt/staging_dir/target-mips_34kc_musl-1.1.14/stamp/.package_compile] Error 2
make: *** [world] Error 2

Looks like the build is failing due to a 404 error, meaning that the build process cannot find a specific package whose sources it is wanting to download.

Looks like the failed package was lzo-2.0.9.tar.gz. Where was this package supposed to be located according to your buildroot settings? Can you download it by just opening the source tarball's address in a regular browser window?

See https://wiki.openwrt.org/doc/howto/build#updating_feeds for more info on how to download all package sources before starting the build process.

When a build crashes, run V=s and you will need to scroll back about a page to find the real reason for the error.

If the source has been moved you will need to update the package's Makefile in package/feeds/... with the new URL location.

Also run a make download to be sure all sources are downloaded before the final make.  This will allow you to increase the number of jobs (e.g. make -j5) to use all of your CPU cores for compilation.  If you run a multi-job make without downloading first, it is likely to fail because one core will try to compile something that is not yet downloaded.

(Last edited by mk24 on 22 May 2017, 15:39)

Seems that the DNS for oberhumer.com is busted sad

Some googling turned up this mirror:
github.com/nemequ/lzo/tree/3d579ac72b51 … c12444f02c

Usual warning about 3rd party mirrors: use at your own risk - there could be nefarious code afoot!

Here are the steps required to manually use this source in a build:

Create container folder and navigate:

mkdir lzo-2.09 && cd lzo-2.09

Check out the repo (add protocol to repo url - won't let me post full urls?):

git clone github.com/nemequ/lzo.git lzo-2.09

Navigate to the lzo git root:

cd lzo-2.09

Reset to the commit for 2.09

git reset --soft 3d579ac

Remove the .git folder (we don't want the package to contain repo metadata):

rm -fr .git

Archive the folder:

cd .. && tar zcvf ../lzo-2.09.tar.gz lzo-2.09

Copy to the dl folder under your openwrt build root and you should be good to go. File name must be exactly lzo-2.09.tar.gz.

Build openwrt like normal.

Tested and working as of commit 871372c.

There is probably a way to validate this mirror and include it in the build process; however, I am not familiar enough with how the build environment is structured to recommend a change one way or another.

(Last edited by RevisionSeven on 23 May 2017, 02:37)

The discussion might have continued from here.