Issue building with OpenWrt 22.03 SDK

I was alerted to it by this: https://github.com/stangri/source.openwrt.melmac.net/issues/177

and indeed I couldn't find the luci-lua-runtime ipk in OpenWrt 22.03.

The source is available for master https://github.com/openwrt/luci/blob/39d722e00a05e9792d35770eb43810603e39e6c4/modules/luci-lua-runtime/Makefile but not OpenWrt 22.03.

Does anyone have an idea about what's going on?

There is no luci-lua-runtime package in 22.03.

List of packages depending on luci-lua-runtime: https://github.com/openwrt/luci/search?q=luci-lua-runtime. That includes luci-compat.

Not in 22.03

So it's a new package for snapshots only and luci-compat is packaged differently in 22.03?

for master only.

(there are continuously built snapshots also from 21.02 and 22.03. Saying just "snapshot" means nothing (except "not release"), although 95% of time the user means snapshots from master.)

Based on source code, yes.
Only the LuCI master has been converted to the ucode based approach by @jow and 22.03 is unlikely to change.

1 Like

Thanks, I'll follow up with the user who created the bug to confirm how is the lua-luci-runtime required on 22.03 then.

@hnyman I'm sure this issue will pop up, the IPKs requiring luci-compat built with the 22.03.3 SDK fail to install (on a fresh OpenWrt 22.03.3) because of unsatisfied dependency on luci-lua-runtime and incompatible architecture, while if I rebuild the IPK using the 22.03.2 SDK everything works just fine as before.

Sounds strange, as to my knowledge, there is no luci-lua-runtime in 22.03. So none of the 22.03 package sources should contain a reference to it.

My first guess would be that you are accidentally pulling master Luci feed into your 22.03.3 SDK, which then causes strange dependencies.

You should check your repo once more that you are really pulling the 22.03 branch for feeds, and that your package database in tmp/ is cleared when switching branches. (I keep totally separate buildroots for master and 22.03 to avoid any mishaps.)

If you can't figure out an explanation, @jow might be the only one to help.

Dependency on master only luci-lua-runtime and incompatible architecture really hints at a completely wrong SDK being used or wrong .ipk being installed...

There definitely is no luci-lua-runtime in the openwrt-22.03 branch:

jow@j7:~$ cd /tmp/
jow@j7:/tmp$ wget https://downloads.openwrt.org/releases/22.03.3/targets/x86/64/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz
--2023-01-10 09:06:45--  https://downloads.openwrt.org/releases/22.03.3/targets/x86/64/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz
Resolving downloads.openwrt.org (downloads.openwrt.org)... 168.119.138.211, 2a01:4f8:251:321::2
Connecting to downloads.openwrt.org (downloads.openwrt.org)|168.119.138.211|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 166549660 (159M) [application/octet-stream]
Saving to: ‘openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz’

openwrt-sdk-22.03.3-x86-64_gcc-11 100%[============================================================>] 158.83M  32.7MB/s    in 32s     

2023-01-10 09:07:17 (4.95 MB/s) - ‘openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz’ saved [166549660/166549660]

jow@j7:/tmp$ tar -xf openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz 
jow@j7:/tmp$ cd openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64/
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ ./scripts/feeds update luci
Updating feed 'luci' from 'https://git.openwrt.org/project/luci.git^396f4048bd1f4cae7cb6f085d360081d81ad2d9a' ...
Cloning into './feeds/luci'...
remote: Enumerating objects: 36646, done.
remote: Counting objects: 100% (36646/36646), done.
remote: Compressing objects: 100% (7565/7565), done.
remote: Total 361854 (delta 32687), reused 29667 (delta 27131), pack-reused 325208
Receiving objects: 100% (361854/361854), 147.70 MiB | 12.95 MiB/s, done.
Resolving deltas: 100% (210594/210594), done.
Switched to a new branch '396f4048bd1f4cae7cb6f085d360081d81ad2d9a'
/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64
Create index file './feeds/luci.index' 
Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... ok.
Checking 'g++'... ok.
Checking 'working-g++'... ok.
Checking 'ncurses'... ok.
Checking 'perl-data-dumper'... ok.
Checking 'perl-findbin'... ok.
Checking 'perl-file-copy'... ok.
Checking 'perl-file-compare'... ok.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'xargs'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'egrep'... ok.
Checking 'getopt'... ok.
Checking 'realpath'... ok.
Checking 'stat'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'install'... ok.
Checking 'perl'... ok.
Checking 'python2-cleanup'... ok.
Checking 'python'... ok.
Checking 'python3'... ok.
Checking 'python3-distutils'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Checking 'rsync'... ok.
Checking 'which'... ok.
Checking 'ldconfig-stub'... ok.
Collecting package info: done
Collecting target info: done
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ grep -r luci-lua-runtime feeds/luci/
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ 

@jow, thank you for replying.

~/development/Builder/SDK_x86-64_22.03.3 
$ grep -r luci-lua-runtime feeds/luci/
~/development/Builder/SDK_x86-64_22.03.3
$ cat feeds.conf.default
src-git base https://git.openwrt.org/openwrt/openwrt.git;v22.03.3
src-git-full packages https://git.openwrt.org/feed/packages.git^2048c5bbf6c482e45b080eef4c1c531936f7f41b
src-git-full luci https://git.openwrt.org/project/luci.git^396f4048bd1f4cae7cb6f085d360081d81ad2d9a
src-git-full routing https://git.openwrt.org/feed/routing.git^1a87333f268bcf0a11e3a665a357cb0d4ec2d680
src-git-full telephony https://git.openwrt.org/feed/telephony.git^49abbb97e113ce7a35fe632acf6a8fff48dba5ec
~/development/Builder/SDK_x86-64_22.03.3 
$

I'm building this with the architecture LUCI_PKGARCH:=all.

As per https://github.com/stangri/source.openwrt.melmac.net/issues/177 there were issues installing it when built with 22.03.3 SDK, when I rebuilt the package with a copy of 22.03.2 SDK I still had from before the problem went away.

I've just rebuilt that specific package with 22.03.3 SDK (specifically, x86_64 SDK) and the IPK is available here.

When downloading it to /tmp/ and running opkg update to make opkg aware of the principal package I get:

SG-135 in /tmp # opkg install --force-depends /tmp/luci-app-wireshark-helper_0.0.1-5_all.ipk
Unknown package 'luci-app-wireshark-helper'.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency luci-lua-runtime for luci-app-wireshark-helper
 * pkg_hash_fetch_best_installation_candidate: Packages for luci-app-wireshark-helper found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package luci-app-wireshark-helper.
SG-135 in /tmp #

The 22.03.2-built package installs just fine. The 22.03.3 SDK was downloaded and unpacked yesterday.

I would try using a different platform SDK, not sure if I'd have time on Tuesday, so I'm alerting you in case it's really not my fault.

Well how are you adding your custom feed to the SDK? Your feeds.conf.default does not appear to contain it. Do you have a customized feeds.conf?

Edit: just tried, simply adding your repo as feed will fail due to missing luci.mk:

jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ cp feeds.conf.default feeds.conf
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ echo 'src-git-full melmac https://github.com/stangri/source.openwrt.melmac.net.git' >> feeds.conf
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ ./scripts/feeds update melmac
Updating feed 'melmac' from 'https://github.com/stangri/source.openwrt.melmac.net.git' ...
Cloning into './feeds/melmac'...
remote: Enumerating objects: 13737, done.
remote: Counting objects: 100% (4374/4374), done.
remote: Compressing objects: 100% (1883/1883), done.
remote: Total 13737 (delta 1858), reused 4314 (delta 1800), pack-reused 9363
Receiving objects: 100% (13737/13737), 6.11 MiB | 20.25 MiB/s, done.
Resolving deltas: 100% (6083/6083), done.
Create index file './feeds/melmac.index' 
ERROR: please fix feeds/melmac/luci-app-easyflash/Makefile - see logs/feeds/melmac/luci-app-easyflash/dump.txt for details
ERROR: please fix feeds/melmac/luci-app-fakeinternet/Makefile - see logs/feeds/melmac/luci-app-fakeinternet/dump.txt for details
ERROR: please fix feeds/melmac/luci-app-https-dns-proxy/Makefile - see logs/feeds/melmac/luci-app-https-dns-proxy/dump.txt for details
ERROR: please fix feeds/melmac/luci-app-https-dns-proxy-js/Makefile - see logs/feeds/melmac/luci-app-https-dns-proxy-js/dump.txt for details
ERROR: please fix feeds/melmac/luci-app-template/Makefile - see logs/feeds/melmac/luci-app-template/dump.txt for details
ERROR: please fix feeds/melmac/luci-app-wireshark-helper/Makefile - see logs/feeds/melmac/luci-app-wireshark-helper/dump.txt for details
ERROR: please fix feeds/melmac/luci-app-wlanblinker/Makefile - see logs/feeds/melmac/luci-app-wlanblinker/dump.txt for details
ERROR: please fix feeds/melmac/luci-proto-nebula/Makefile - see logs/feeds/melmac/luci-proto-nebula/dump.txt for details
ERROR: please fix feeds/melmac/nebula/Makefile - see logs/feeds/melmac/nebula/dump.txt for details
ERROR: please fix feeds/melmac/webui.lua/luci-app-advanced-reboot/Makefile - see logs/feeds/melmac/webui.lua/luci-app-advanced-reboot/dump.txt for details
ERROR: please fix feeds/melmac/webui.lua/luci-app-pbr/Makefile - see logs/feeds/melmac/webui.lua/luci-app-pbr/dump.txt for details
ERROR: please fix feeds/melmac/webui.lua/luci-app-simple-adblock/Makefile - see logs/feeds/melmac/webui.lua/luci-app-simple-adblock/dump.txt for details
ERROR: please fix feeds/melmac/webui.lua/luci-app-vpnbypass/Makefile - see logs/feeds/melmac/webui.lua/luci-app-vpnbypass/dump.txt for details
Collecting package info: done
Collecting target info: done
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ tail logs/feeds/melmac/luci-app-easyflash/dump.txt
Makefile:22: ../../luci.mk: No such file or directory
gmake[1]: *** No rule to make target '../../luci.mk'.  Stop.
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$

No, I'm copying the source to package/luci/applications/luci-app-wireshark-helper/ (and the principal package to package/wireshark-helper/) of the SDK directory. My source repo is not a proper feed for OpenWrt.

PS. I do disable CONFIG_SIGNED_PACKAGES via:

sed -i 's/^CONFIG_SIGNED_PACKAGES=y/# CONFIG_SIGNED_PACKAGES is not set/' .config

But it worked fine until 22.03.3, could that be the culprit or can you reproduce the issue without it?

Same problem:

jow@j7:/tmp$ rm -rf openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64
jow@j7:/tmp$ tar -xf openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz 
jow@j7:/tmp$ cd openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64/
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ ./scripts/feeds update
Updating feed 'base' from 'https://git.openwrt.org/openwrt/openwrt.git;v22.03.3' ...
Cloning into './feeds/base'...
remote: Enumerating objects: 9232, done.
[...]
Collecting package info: done
Collecting target info: done
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ ./scripts/feeds install -a -p luci
Collecting package info: done
Collecting target info: done
[...]
Installing package 'luci-theme-material' from luci
Installing package 'luci-theme-openwrt-2020' from luci
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ (cd /tmp; git clone https://github.com/stangri/source.openwrt.melmac.net.git)
Cloning into 'source.openwrt.melmac.net'...
remote: Enumerating objects: 13737, done.
remote: Counting objects: 100% (4374/4374), done.
remote: Compressing objects: 100% (1861/1861), done.
remote: Total 13737 (delta 1858), reused 4336 (delta 1822), pack-reused 9363
Receiving objects: 100% (13737/13737), 6.11 MiB | 4.89 MiB/s, done.
Resolving deltas: 100% (6083/6083), done.
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ mkdir -p package/luci/applications
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ cp -a /tmp/source.openwrt.melmac.net/wireshark-helper/ package/luci/applications/
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ cp -a /tmp/source.openwrt.melmac.net/luci-app-wireshark-helper/ feeds/luci/applications/
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ make package/luci-app-wireshark/compile
ERROR: please fix package/luci/applications/luci-app-wireshark-helper/Makefile - see logs/package/luci/applications/luci-app-wireshark-helper/dump.txt for details
Collecting package info: done
[...]
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ tail logs/package/luci/applications/luci-app-wireshark-helper/dump.txt
Makefile:15: ../../luci.mk: No such file or directory
make[3]: *** No rule to make target '../../luci.mk'.  Stop.
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$

Are you copying luci.mk from somewhere by any chance? The luci.mk version from LuCI master will inject a dependency to luci-lua-runtime for any LuCI package containing Lua files. The version from 22.03 won't.

jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ cp -a /tmp/source.openwrt.melmac.net/wireshark-helper/ package/luci/applications/
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ cp -a /tmp/source.openwrt.melmac.net/luci-app-wireshark-helper/ feeds/luci/applications/

to:

jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ cp -a /tmp/source.openwrt.melmac.net/wireshark-helper/ package/
jow@j7:/tmp/openwrt-sdk-22.03.3-x86-64_gcc-11.2.0_musl.Linux-x86_64$ cp -a /tmp/source.openwrt.melmac.net/luci-app-wireshark-helper/ package/luci/applications/

I do git -C package/luci pull before copying the code.

@jow, sorry, my bad, I did pull master luci into the SDK directory!

git -C package clone --depth 1 git@github.com:openwrt/luci.git

That would explain the problem then! Simply pull from the openwrt-22.03 branch of LuCI instead, then it should work.

1 Like

Like initially suspected :wink:

Good that you found the reason.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.