FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
578 views 19 comments
by anonymous

when compiling on Ubuntu 18.04.6 LTS I get this error:

Collected errors:
 * pkg_run_script: package "tinc" preinst script returned status 127.
 * preinst_configure: Aborting installation of tinc.
 * opkg_install_cmd: Cannot install package tinc.
package/Makefile:66: recipe for target 'package/install' failed
make[2]: *** [package/install] Error 255
make[2]: Leaving directory '/mnt/d/rutos-ath79-rut9-gpl'
package/Makefile:109: recipe for target '/mnt/d/rutos-ath79-rut9-gpl/staging_dir/target-mips_24kc_musl/stamp/.package_install' failed
make[1]: *** [/mnt/d/rutos-ath79-rut9-gpl/staging_dir/target-mips_24kc_musl/stamp/.package_install] Error 2

make[1]: Leaving directory '/mnt/d/rutos-ath79-rut9-gpl'
/mnt/d/rutos-ath79-rut9-gpl/include/toplevel.mk:232: recipe for target 'world' failed
make: *** [world] Error 2
 

additional info

when i tried inatall tinc package on "clean" FW RUT9_R_GPL_00.07.02.7 I get this error

Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-tun

Please help.

by anonymous
A README file within SDK recommends using Ubuntu 20.04 LTS. I have successfully managed to compile the same firmware on 20.04.5 version.

1 Answer

0 votes
by anonymous

Hello,

Ubuntu 18.04.6 is an old distribution, use a more recent one (a Fedora 37 will work fine).

And use tar -xozf ~/Downloads/RUT9_R_GPL_00.07.02.7.tar.gz -C RUT9_R_GPL_00.07.02.7 to avoid permission issues within the tree.

Regards,

by anonymous

Hi

Thank you for the advice, I followed it and after unpacking with the tar -xozf option, I compiled the FW on Ubuntu 20.04, but unfortunately I still get the same error:

Configuring strongswan-mod-md5.

Configuring call_utilities.

Collected errors:

 * pkg_run_script: package tinc preinst script returned status 127.

 * preinst_configure: Aborting installation of tinc.

 * opkg_install_cmd: Cannot install package tinc.

make[2]: *** [package/Makefile:69: package/install] Error 255

make[2]: Leaving directory '/mnt/d/rutos-ath79-rut9-gpl'

make[1]: *** [package/Makefile:109: /mnt/d/rutos-ath79-rut9-gpl/staging_dir/target-mips_24kc_musl/stamp/.package_install] Error 2

make[1]: Leaving directory '/mnt/d/rutos-ath79-rut9-gpl'

make: *** [/mnt/d/rutos-ath79-rut9-gpl/include/toplevel.mk:234: world] Error 2

Any other ideas, please

by anonymous
I think there is something wrong with package tinc, but no idea what
by anonymous

I have successfully compiled the SDK on a Fedora 37 workstation distribution after installing a few missing packages and a "unset which" cause the alias was not parsed correctly.

After the full build:

[fl@in7 rutos-ath79-rut9-gpl]$ find . -name tinc -print
./package/network/services/tinc
./feeds/packages/net/tinc
./staging_dir/target-mips_24kc_musl/root-ath79/lib/upgrade/keep.d/tinc
./staging_dir/target-mips_24kc_musl/root-ath79/etc/config/tinc
./staging_dir/target-mips_24kc_musl/root-ath79/etc/init.d/tinc
./staging_dir/target-mips_24kc_musl/root-ath79/etc/tinc
./logs/package/network/services/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/.pkgdir/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/.pkgdir/tinc/etc/init.d/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/.pkgdir/tinc/etc/config/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/.pkgdir/tinc/etc/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/.pkgdir/tinc/lib/upgrade/keep.d/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/ipkg-mips_24kc/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/ipkg-mips_24kc/tinc/etc/init.d/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/ipkg-mips_24kc/tinc/etc/config/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/ipkg-mips_24kc/tinc/etc/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/ipkg-mips_24kc/tinc/lib/upgrade/keep.d/tinc
by anonymous
my output is exactly the same as yours, the only difference is that my build stopped with an error
st@s5u:~/d/rutos-ath79-rut9-gpl$ find . -name tinc -print
./package/network/services/tinc
./feeds/packages/net/tinc
./staging_dir/target-mips_24kc_musl/root-ath79/etc/tinc
./staging_dir/target-mips_24kc_musl/root-ath79/etc/init.d/tinc
./staging_dir/target-mips_24kc_musl/root-ath79/etc/config/tinc
./staging_dir/target-mips_24kc_musl/root-ath79/lib/upgrade/keep.d/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/ipkg-mips_24kc/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/ipkg-mips_24kc/tinc/etc/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/ipkg-mips_24kc/tinc/etc/init.d/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/ipkg-mips_24kc/tinc/etc/config/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/ipkg-mips_24kc/tinc/lib/upgrade/keep.d/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/.pkgdir/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/.pkgdir/tinc/etc/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/.pkgdir/tinc/etc/init.d/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/.pkgdir/tinc/etc/config/tinc
./build_dir/target-mips_24kc_musl/tinc-1.0.36/.pkgdir/tinc/lib/upgrade/keep.d/tinc
./logs/package/network/services/tinc
I will try on Fedora 37
Thanks
by anonymous
Could you do a:

make -k | tee makelog.txt

and post the makelog somewhere ?
by anonymous
and here there is a link to makelog made with V=sc option

https://drive.google.com/file/d/1GFdLJdn5QuQaU5ebme87qsO3v1odUFbh/view?usp=share_link
by anonymous
Looks like the make -j 1 V=sc worked. Could you check the contents of bin/targets/ath79/generic and bin/targets/ath79/generic/tltFws ?

Is your 20.04 distribution up to date ? What is the output of make --version ?
by anonymous

thank you very much for your help

my Ubuntu 20.04.05 LTS is up to date, was updated and upgraded before I started compilation

make version is GNU Make 4.2.1

content of the directory:

st@s5u:~/d/rutos-ath79-rut9-gpl/bin/targets/ath79/generic$ ls

config.buildinfo

u-boot_tlt-rut9xx-vboot-64k_webui.bin  

u-boot_tlt-rut9xx_webui.bin

feeds.buildinfo                  

u-boot_tlt-rut9xx-vboot.bin            

u-boot_version

packages

u-boot_tlt-rut9xx-vboot_webui.bin      

version.buildinfo

u-boot_tlt-rut9xx-vboot-64k.bin  

u-boot_tlt-rut9xx.bin

by anonymous
Still missing: openwrt-ath79-generic-teltonika_rut9xx-squashfs-sysupgrade.bin in bin/targets/ath79/generic, and the tltFws subdir.

I can't see anything obviously wrong in makelog2.txt, nor any indication about the cause of the premature end. Please retry with:

make -j 1 V=sc | tee makelog3.txt

No need to restart from scratch the current state of the tree looks clean.
by anonymous

when I change in menuconfig {*} tinc to {M} tinc the compilation goes well and I get the firmware RUT9_R_GPL_00.07.02.7_WEBUI.bin

it's hard to figure out to me why tinc package marked with {*} stops the compilation

by anonymous

this makelog3

https://drive.google.com/file/d/1wwl_HW3zwQkwcrf7TYy03O30GYIw-cLa/view?usp=share_link

but when I execute command make -j 1 V=sc > makelog4.txt, I get on the screen

st@s5u:~/d/rutos-ath79-rut9-gpl$ make -j1 V=sc >  makelog4.txt

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 4: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 5: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 6: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 7: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 8: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 9: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 10: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 14: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 15: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 16: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 17: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 18: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 19: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 24: uci: not found

/mnt/d/rutos-ath79-rut9-gpl/build_dir/target-mips_24kc_musl/root-ath79/tmp/opkg-4ndJCi/tinc-KdNEog/preinst: 25: /etc/init.d/firewall: not found

Collected errors:

 * pkg_run_script: package tinc preinst script returned status 127.

 * preinst_configure: Aborting installation of tinc.

 * opkg_install_cmd: Cannot install package tinc.

make[2]: *** [package/Makefile:69: package/install] Error 255

make[1]: *** [package/Makefile:109: /mnt/d/rutos-ath79-rut9-gpl/staging_dir/target-mips_24kc_musl/stamp/.package_install] Error 2

make: *** [/mnt/d/rutos-ath79-rut9-gpl/include/toplevel.mk:234: world] Error 2

by anonymous

Out of curiosity I have tried to build the SDK with tinc set to {*}, it failed with:

 * pkg_run_script: package "tinc" preinst script returned status 127.

?!?
by anonymous
this is exactly my problem :)
by anonymous

pkg_run_script tries to run a script intended to be executed on the target system itself not by the build process. This is obviously a bug in the package.

 

by anonymous
I get it.

I really need the FW with embedded tinc package

What's your advice then?
by anonymous

Apply the following patch: https://drive.google.com/file/d/1vKIxG5aQEX-n3BmjAJGevJ5KDiav9TwZ/view?usp=sharing

Use patch -p1 < tinc-Makefile.patch in the base folder.

Those formatting issues are new ...

by anonymous

It works!

Your advice is invaluable, thank you very muchsmiley