No rule to make target '../../src/liblzma/liblzma.la',

Good morning,

I'm trying to build openwrt for the first time for a RTL838X device. I'm building on a Debian 12 (bookworm) amd64 system and believe I've installed all the prerequisites that are needed. Every time I try things go well until it tries to do the host compile xzdec where it fails claiming:

/usr/bin/env bash ../../libtool  --tag=CC   --mode=link /home/schallee/openwrt/staging_dir/host/bin/gcc -pthread -fvisibility=hidden -Wall -Wextra -Wvla -Wc99-c11-compat -Wformat=2 -Winit-self -Wmissing-include-dirs -Wshift-overflow=2 -Wstrict-overflow=3 -Walloc-zero -Wduplicated-cond -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wdate-time -Wsign-conversion -Wfloat-conversion -Wlogical-op -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -O2 -I/home/schallee/openwrt/staging_dir/host/include  -no-undefined -version-info 9:6:4    -L/home/schallee/openwrt/staging_dir/host/lib  -o liblzma.la -rpath /home/schallee/openwrt/staging_dir/host/lib liblzma_la-tuklib_physmem.lo liblzma_la-tuklib_cpucores.lo liblzma_la-common.lo liblzma_la-block_util.lo liblzma_la-easy_preset.lo liblzma_la-filter_common.lo liblzma_la-hardware_physmem.lo liblzma_la-index.lo liblzma_la-stream_flags_common.lo liblzma_la-string_conversion.lo liblzma_la-vli_size.lo liblzma_la-hardware_cputhreads.lo liblzma_la-outqueue.lo liblzma_la-alone_encoder.lo liblzma_la-block_buffer_encoder.lo liblzma_la-block_encoder.lo liblzma_la-block_header_encoder.lo liblzma_la-easy_buffer_encoder.lo liblzma_la-easy_encoder.lo liblzma_la-easy_encoder_memusage.lo liblzma_la-filter_buffer_encoder.lo liblzma_la-filter_encoder.lo liblzma_la-filter_flags_encoder.lo liblzma_la-index_encoder.lo liblzma_la-stream_buffer_encoder.lo liblzma_la-stream_encoder.lo liblzma_la-stream_flags_encoder.lo liblzma_la-vli_encoder.lo liblzma_la-stream_encoder_mt.lo liblzma_la-microlzma_encoder.lo liblzma_la-alone_decoder.lo liblzma_la-auto_decoder.lo liblzma_la-block_buffer_decoder.lo liblzma_la-block_decoder.lo liblzma_la-block_header_decoder.lo liblzma_la-easy_decoder_memusage.lo liblzma_la-file_info.lo liblzma_la-filter_buffer_decoder.lo liblzma_la-filter_decoder.lo liblzma_la-filter_flags_decoder.lo liblzma_la-index_decoder.lo liblzma_la-index_hash.lo liblzma_la-stream_buffer_decoder.lo liblzma_la-stream_decoder.lo liblzma_la-stream_flags_decoder.lo liblzma_la-vli_decoder.lo liblzma_la-stream_decoder_mt.lo liblzma_la-microlzma_decoder.lo liblzma_la-lzip_decoder.lo liblzma_la-check.lo  liblzma_la-crc32_table.lo  liblzma_la-crc32_fast.lo  liblzma_la-crc64_table.lo  liblzma_la-crc64_fast.lo liblzma_la-sha256.lo liblzma_la-lz_encoder.lo liblzma_la-lz_encoder_mf.lo liblzma_la-lz_decoder.lo liblzma_la-lzma_encoder_presets.lo liblzma_la-lzma_encoder.lo liblzma_la-lzma_encoder_optimum_fast.lo liblzma_la-lzma_encoder_optimum_normal.lo liblzma_la-fastpos_table.lo liblzma_la-lzma_decoder.lo liblzma_la-lzma2_encoder.lo liblzma_la-lzma2_decoder.lo  liblzma_la-price_table.lo  liblzma_la-delta_common.lo liblzma_la-delta_encoder.lo liblzma_la-delta_decoder.lo liblzma_la-simple_coder.lo liblzma_la-simple_encoder.lo liblzma_la-simple_decoder.lo liblzma_la-x86.lo liblzma_la-powerpc.lo liblzma_la-ia64.lo liblzma_la-arm.lo liblzma_la-armthumb.lo liblzma_la-arm64.lo liblzma_la-sparc.lo   -lpthread
make[8]: Leaving directory '/home/schallee/openwrt/build_dir/host/xz-5.4.6/src/liblzma'
make[7]: Leaving directory '/home/schallee/openwrt/build_dir/host/xz-5.4.6/src/liblzma'
Making all in xzdec
make[7]: Entering directory '/home/schallee/openwrt/build_dir/host/xz-5.4.6/src/xzdec'
make[7]: *** No rule to make target '../../src/liblzma/liblzma.la', needed by 'xzdec'.  Stop.
make[7]: Leaving directory '/home/schallee/openwrt/build_dir/host/xz-5.4.6/src/xzdec'
make[6]: *** [Makefile:426: all-recursive] Error 1
make[6]: Leaving directory '/home/schallee/openwrt/build_dir/host/xz-5.4.6/src'
make[5]: *** [Makefile:621: all-recursive] Error 1
make[5]: Leaving directory '/home/schallee/openwrt/build_dir/host/xz-5.4.6'
make[4]: *** [Makefile:490: all] Error 2
make[4]: Leaving directory '/home/schallee/openwrt/build_dir/host/xz-5.4.6'
make[3]: *** [Makefile:41: /home/schallee/openwrt/build_dir/host/xz-5.4.6/.built] Error 2
make[3]: Leaving directory '/home/schallee/openwrt/tools/xz'
time: tools/xz/compile#0.24#0.14#0.38
    ERROR: tools/xz failed to build.
make[2]: *** [tools/Makefile:232: tools/xz/compile] Error 1
make[2]: Leaving directory '/home/schallee/openwrt'
make[1]: *** [tools/Makefile:228: /home/schallee/openwrt/staging_dir/host/stamp/.tools_compile_yyyynyynnnyyynynyyyyyyynyyynynyynnynnyyyyyynyyyyyyyyyyynynnyyyyynyyy] Error 2
make[1]: Leaving directory '/home/schallee/openwrt'
make: *** [/home/schallee/openwrt/include/toplevel.mk:233: world] Error 2

I feel like I'm missing something obvious but I haven't found it yet. Any help would be appreciated.

Thanks!

What target device you are envisioning? ubus call system board
xz version means snapshot between 23.x and 24.x , try stable 24.x first?

Thanks for the response.

Sorry I forgot to include the commit. I'm using the current 24.10 git branch which is presently e876f7bc62

The target is the netgear gs108t-v3. It works great with the release but I need to modify initial packages as this device doesn't have much space.

I appreciate the help.

Very strange, try to build in a single thread, either it passes or shows some additional detail.
Does firmware-selector cover your package changing needs? and owut?

If you are short on space adapt this for your device. If it works a pull request is appreciated.

lzma patch 1

lzma patch 2

1 Like

Thanks for the info. I'll have to take a closer look at firmware-selector and/or owut.

The results are with a single thread/job so it's not a concurrency issue. I started looking at the makefiles some but it has been a while since I've dealt with that advanced a gnumake makefile templating rules.

In general, my hope was to remove the web gui and install the minimal python packages needed to manage it with ansible. The list of packages I have from the last time I did this won't fit on the distributed firmware. It may be pushing it but it should be significantly smaller on the squashfs side vs. the jffs2 side.

For what it's worth, xz configures and builds just fine outside of the openwrt build system.

Thanks!

There is earlier error leading to some file not getting compiled and that breakage is found tjust later when dependent tool is used / package is packaged.