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
510 views 6 comments
by anonymous
Hello,

The TRB2_R_00.07.04 default archive compiles without any problem but when I add any Python package through "make menuconfig" it fails with the following end error message (for example just adding python3-light):

 * print_dependents_warning: Force removal of this package with --force-depends.
 * print_dependents_warning: Force removal of this package and its dependents
 * print_dependents_warning: with --force-removal-of-dependent-packages.
 * pkg_run_script: package "wireguard" prerm script returned status 2.
 * opkg_remove_pkg: not removing package "wireguard", prerm script failed
apiCalling opkg-cleanup for vuci-app-socat-uiCalling opkg-cleanup for vuci-app-strong-swan-apiCalling opkg-cleanup for vuci-app-strong-swan-uiCalling opkg-cleanup for vuci-app-system-info-apiCalling opkg-cleanup for vuci-app-system-info-uiCalling opkg-cleanup for vuci-app-system-status-apiCalling opkg-cleanup for vuci-app-system-status-uiCalling opkg-cleanup for vuci-app-telnet-apiCalling opkg-cleanup for vuci-app-troubleshoot-apiCalling opkg-cleanup for vuci-app-troubleshoot-uiCalling opkg-cleanup for vuci-app-ui-apiCalling opkg-cleanup for vuci-app-ui-uiCalling opkg-cleanup for vuci-app-uscripts-apiCalling opkg-cleanup for vuci-app-uscripts-uiCalling opkg-cleanup for vuci-app-vlan-apiCalling opkg-cleanup for vuci-app-vlan-uimake[2]: *** [package/Makefile:69: package/install] Error 255
make[2]: Leaving directory '/home/ict/Downloads/TRB2_R_GPL_00.07.04/rutos-ath79-trb2-gpl'
make[1]: *** [package/Makefile:109: /home/ict/Downloads/TRB2_R_GPL_00.07.04/rutos-ath79-trb2-gpl/staging_dir/target-mips_24kc_musl/stamp/.package_install] Error 2
make[1]: Leaving directory '/home/ict/Downloads/TRB2_R_GPL_00.07.04/rutos-ath79-trb2-gpl'
make: *** [/home/ict/Downloads/TRB2_R_GPL_00.07.04/rutos-ath79-trb2-gpl/include/toplevel.mk:234: world] Error 2

Tested with Ubuntu 18.04/20.04 and 22.04, through docker or compiling in local.

I can install python3-light through "opkg" command on the device but I would like to compile it as I have not enough space to install both python3/pyserial/pip that I need for my project.

edit: adding debug with attached file

1 Answer

0 votes
by anonymous

Hello,

  

Could you try compiling the firmware using the make -j1 V=s command? This will provide us with some more information on what the issue could be. Please paste the full logs into a .txt file and attach it to the original post.

I can also see from your attached logs that there is a Wireguard-related error. What else is changed in the SDK?

Make sure you have all of the packages installed by running this command:

sudo apt install build-essential ccache ecj fastjar file flex g++ gawk gettext git java-propose-classpath java-wrappers jq libelf-dev libffi-dev libncurses5-dev libncursesw5-dev libssl-dev libtool python python2.7-dev python3 python3-dev python3-distutils python3-setuptools rsync subversion swig time u-boot-tools unzip wget xsltproc zlib1g-dev bison

And once you're in the SDK directory, update the feeds by running this command:

./scripts/feeds update -a

  

Best regards,
DaumantasG

by anonymous
Hello,

I have added the debug to the original post, moreover:

- There are no changes from default except adding python module

- All packages are well present

- Feeds Update was present but did again after the "make menuconfig" => And still the building error after make

And after remove the python module from the "menuconfig" the compilation is ok
by anonymous
Hello,

  

It seems that the compiling fails, as there will not be enough storage on the device. You were able to install the python package using the opkg because the opkg package for python3-light is smaller than ours. We only offer this package for TRB1xx, TRB5xx, and RUTX devices, which have much more Flash storage.

So I'm afraid the only way to have Python is to install it from opkg after the device is flashed.

  

Best regards,
DaumantasG
by anonymous
The problem is that I can install python3-light with "opkg" but there is not get enough space for pyserial and pip then

I read in another thread people using pyserial on TRB245, were the previous SDK version smaller so it was possible to install them ?
by anonymous
Hello,

  

I've sent you an older version of the SDK via private message. If that version also fails, you might need to remove some packages in order to install it. Please keep in mind, that PIP will also not be an option due to storage constraints.

  

Best regards,
DaumantasG
by anonymous
Hello DaumantasG,

Sorry for ma late reply, I was not able to use this older SDK, during compilation the python package says it's version doesn't match the one from repository...

... whatever I found a solution for my project by using a C program that I built through cross compilation and I use mosquitto to publish the messages instead of python-paho-mqtt that doesn't work neither.
by anonymous

Hello,

To publish the messages generated by your custom script you could use Custom Modbus Registers, and then utilize our Data to Server feature.

Best regards,
DaumantasG