SDKs for RUTX and RUT2 fail to build

I had a previous post about the TSW2 SDK failing to build, so I thought I’d try building the SDKs for other devices we use, the RUTX11 and the RUT240. Once again I’ve found myself struggling to get a build to complete.

Using RUT2_R_GPL_00.07.06.1.tar.gz and RUTX_R_GPL_00.07.06.1.tar.gz, both initially failed on a simple fix: PKG_SOURCE_URL=git://git.osmocom.org/libsmpp34.git
needing a change to PKG_SOURCE_URL=http://git.osmocom.org/libsmpp34.git

but then hitting another roadblock where they both fail at:

pkg_run_script: package "wireguard" prerm script returned status 127.

I’m using the dockerbuild instructions in the readme file (which aren’t actually precise and should be modified according to how the tar files are actually structured). No changes were made other than the libsmpp34 fix above.

The full build logs are available here:
./scripts/dockerbuild make -j1 V=s 2>&1 | tee rutx_build_log.txt
./scripts/dockerbuild make -j1 V=s 2>&1 | tee rut2_build_log.txt

Are there steps missing from the readme? Any insights appreciated. Thanks.

Hello,

The cause of the error is not the wireguard’s prerm script returning 127, before that you have:

Package installation encountered an error, removing previously installed packages.

The most probable cause is a (subtle ?) failure in:

		$ ./scripts/dockerbuild ./scripts/feeds update -a

Re-execute this command, check for any error.

I have successfully build the SDK in native mode under Centos9, a few workarounds were needed.

Regards,

Re-running the feed update doesn’t seem to do anything:

bob@M15R7:~/rutos-ath79-rut2-gpl$ ./scripts/dockerbuild ./scripts/feeds update -a
/usr/bin/docker
Updating feed 'packages' from 'https://github.com/openwrt/packages.git^65057dcbb5de371503c9159de3d45824bec482e0' ...
Create index file './feeds/packages.index' 
Updating feed 'luci' from 'https://github.com/openwrt/luci.git^3b3c2e5f9f82372df8ff01ac65668be47690dcd5' ...
Create index file './feeds/luci.index' 
Updating feed 'routing' from 'https://github.com/openwrt/routing.git^c30c9ffc93702365439a7647244a052531f2e957' ...
Create index file './feeds/routing.index' 
Updating feed 'telephony' from 'https://github.com/openwrt/telephony.git^7f73a9ad19269dcddcb7fc26e03a9823717587bb' ...
Create index file './feeds/telephony.index'

Are you thinking this is the source of the issue?

mkdir -p /home/bob/rutos-ath79-rut2-gpl/staging_dir/packages/ath79
ln -s /home/bob/rutos-ath79-rut2-gpl/bin/targets/ath79/24kc/packages/*.ipk /home/bob/rutos-ath79-rut2-gpl/staging_dir/packages/ath79; ln -s /home/bob/rutos-ath79-rut2-gpl/bin/packages/mips_24kc/base/*.ipk /home/bob/rutos-ath79-rut2-gpl/staging_dir/packages/ath79;  ln -s /home/bob/rutos-ath79-rut2-gpl/bin/packages/mips_24kc/packages/*.ipk /home/bob/rutos-ath79-rut2-gpl/staging_dir/packages/ath79;   ln -s /home/bob/rutos-ath79-rut2-gpl/bin/packages/mips_24kc/vuci/*.ipk /home/bob/rutos-ath79-rut2-gpl/staging_dir/packages/ath79;
ln: failed to create symbolic link '/home/bob/rutos-ath79-rut2-gpl/staging_dir/packages/ath79/__.ipk': File exists
make[2]: [package/Makefile:56: package/merge] Error 1 (ignored)

Any idea what other tweaks were necessary?

I don’t know for sure what the cause of the error could be. In previous version there was a permission issue due to bad tar extract options.
Two things to try:

  • reset the permissions on the tree with “sudo chown -R your-user:your-group .” and rerun the make,
  • or restart from scratch, use “tar -xovfz …” instead of “tar -xzf …”

Just out of curiosity, I have started a build using docker. Results later …

No.

Edit: docker build completed successfully in ~85 mn instead of ~15 mn in native mode. Same machine.

Re-running the builds from scratch natively now. Any chance you can diff your code against what is in the archive to determine what tweaks you had to do to get it to build?

1 - the osmocom edit,
2 - comment out the “select AUDIO_SUPPORT” in target/Config.in (two occurrences),
3 - enable ‘Advanced configuration options’, set the “Download folder” option to a common value I use for all the different builds (set an absolute path there else there will be errors).

Success - Thank you very much!

-rw-r--r-- 1 bob bob 11469244 Jan  6 16:38 RUT2_R_GPL_00.07.06.1_WEBUI.bin

edit: For those wondering, the Advanced configuration option isn’t needed. Native (ubuntu 22.04) and dockerbuild complies using ‘make -j18’ both work. On a i9-12900H Windows 11/WSL they both took about 16-18 minutes.

This topic was automatically closed after 15 days. New replies are no longer allowed.