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
405 views 13 comments
by anonymous

Hi everyone. I have a failure building the stock GPL SDK for TRB500 - no config changes, just the stock config. ### ANY SUGGESTIONS WELCOME FOR HOW TO TROUBLESHOOT ### Previous versions build perfectly, but TRB5_R_00.07.03.2 fails (I have attached a ZIP archive of the full "make" build log). I'm using Ubuntu 20.04.5 LTS (Focal Fossa) on a Docker instance (latest version for Windows 11: Docker Desktop 4.16.3 96739). The error highlights from the "make" log are as follows:

1st errors I noticed:
WARNING: Makefile 'package/teltonika/qualcomm/data/Makefile' has a build dependency on 'qti-common-headers', which does not exist
WARNING: Makefile 'package/teltonika/qualcomm/data/Makefile' has a build dependency on 'android-system-core-headers', which does not exist
WARNING: Makefile 'package/teltonika/qualcomm/libcutils/Makefile' has a build dependency on 'android-system-core-headers', which does not exist
WARNING: Makefile 'package/teltonika/qualcomm/libqmi-ex/Makefile' has a build dependency on 'qti-common-headers', which does not exist

2nd error I noticed:
make[6]: Entering directory '/home/user/TRB5_R_GPL_00.07.03.2/rutos-sdxprairie-trb5-gpl/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/Python-3.9.7'
find build -type f -a ! -name '*.gc??' -exec rm -f {} ';'
find: 'build': No such file or directory
make[6]: [Makefile:1890: clean-retain-profile] Error 1

3rd error I noticed:
postinst script ./usr/lib/opkg/info/zerotier.postinst has failed with exit code 127
make[2]: *** [package/Makefile:72: package/install] Error 1

...and the overall final result is reported as this error:
make[1]: *** [package/Makefile:109: /home/user/TRB5_R_GPL_00.07.03.2/rutos-sdxprairie-trb5-gpl/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_install] Error 2

Comments and suggestions invited.....
Thanks, Virgil.

by anonymous

...just to elaborate on the self-help steps I've attempted (but made no difference):

  • Cleared cache and updated source certificates (sudo update-ca-certificates)
  • Ensured that I have all of the Linux packages in the README file
  • Ensured that I have fixed any broken Lnux packages, and have upgraded all packages to latest versions
  • Ran make "dirclean", and also completey removed the directory, downloaded and extracted a fresh copy of the GPL SDK
  • Opened and saved the config file ("make menuconfig")
  • Always ensured that "make" task was run using only 1 CPU ("make -j1")
  • Created a make log file: make -j1 V=sc 2>&1 | tee makelog.log | grep -i -E "^make.*(error|[12345]...Entering dir)"

1 Answer

0 votes
by anonymous
Hello,

Could you post the full makelog somewhere ?

Regards,
by anonymous
Hi. You can't see the file that I attached no? If not, then I have no idea WHY Teltonika allow us to upload file attachments, and I will indeed provide a public URL to the file.

Thanks,

Virgil
by anonymous
Hmm.....I viewed this ticket whilst signed out, and I agree that for some unexplained reason Teltonika hide the file attachments from public view. Here's a link to a public file share: https://we.tl/t-j3HpgJyrI7
by anonymous

The first fatal error is:

postinst script ./usr/lib/opkg/info/zerotier.postinst has failed with exit code 127
make[2]: *** [package/Makefile:72: package/install] Error 1
Something is missing I'll look at the scripts contents to see what.
by anonymous

The ZT postinst script doesn't force the return value, and generates an error when run under docker.

Create a file named package/network/services/zerotier/patches/0900-fix-postinst.patch with the following contents an retry the build.

--- a/debian/postinst	2022-06-28 01:13:57.000000000 +0400
+++ b/debian/postinst	2023-02-06 01:03:27.848984062 +0400
@@ -7,5 +7,6 @@
       fi
       ;;
 esac
+exit 0
 
 #DEBHELPER#
by anonymous

Hi Flebourse, and thanks for such helpful efforts! I created the file and re-ran the build ("Make"):

patch

Error, same as before, in make log:

postinst script ./usr/lib/opkg/info/zerotier.postinst has failed with exit code 127

make[2]: *** [package/Makefile:72: package/install] Error 1

by anonymous

Did the patch apply cleanly ? The #DEBHELPER# line must end with a return.

Just to be sure do a make -j 1 V=sc package/network/services/zerotier/compile | tee ztmake.log and post the ztmake file.

I haven't found any other postinst script with an undetermined exit value in the ZTO sources. The dubious one that appears is generated by the build process and there is no easy way to cope with it.

Two options which may be worth trying:

  1. disable zerotier via make menuconfig if you don't need it, and retry
  2. build via either a native OS or a VM (I use a Fedora 37).

by anonymous

Hi. Here's a link to the ZT network service package "make" log, showing that it builds cleanly: https://we.tl/t-wtAwoLluu9

In the log I highlight the following:

"Applying ./patches/0900-fix-postinst.patch using plaintext:"

...so the patch does appear to have been applied, but the main TRB500 build script still produced the same error "postinst script ./usr/lib/opkg/info/zerotier.postinst has failed with exit code 127"

I will now proceed to spin up a VM and install Fedora 37 as you recommend...and let you know my results...

Virgil

by anonymous

On Fedora37 execute "sudo dnf install lz4", it is not installed by default and it isn't mentioned in the Readme.

Commands:

tar xovfz Downloads/TRB5_R_GPL_00.07.03.2.tar.gz
cd rutos-sdxprairie-trb5-gpl
unset which
./scripts/feeds update -a
time make -k

 

by anonymous

Hi. I installed Fedora 37 as you suggested, but sadly failed to even make it off the starting line!
When I tried to "dnf install" the required packages in the Teltonika README, I get this error:

Error: Unable to find a match: build-essential fastjar java-propose-classpath java-wrappers libelf-dev libffi-dev libncurses5-dev libncursesw5-dev libssl-dev node-gyp libnode-dev python2.7-dev python3-distutils u-boot-tools zlib1g-dev

If I try to update the feeds ("./scripts/feeds update -a") I get this error:

Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.36 /usr/local/share/perl5/5.36 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./scripts/feeds line 3.
BEGIN failed--compilation aborted at ./scripts/feeds line 3.

Clearly I can't expect "free" support from you on this forum, and you've been very helpful so far. I did raise a VIP Ticket with Teltonika on 5-Feb and I await a reply from them.

by anonymous
I'll send you the list of packages I have on my machine tomorrow.
by anonymous

Hi. Just to keep you informed, after going to all of the trouble of: (1) configuring a new VPS instance on VM Ware; (2) Installing your recommended OS Fedora 37; (3) installing your recommended packages; (4) waiting hours for the build to run.

The result is.....exactly the same error:

postinst script ./usr/lib/opkg/info/zerotier.postinst has failed with exit code 127
make[2]: *** [package/Makefile:72: package/install] Error 1

I think we can safely stop wasting our time and admit that this is a problem with Teltonika development scripts that we're not going to solve. I will advise my client to abandon the inclusion of the ZeroTier package for TRB500...which rules out TRB500 as a viable candidate for the time being.

Have a great weekend,

Virgil

by anonymous
Sorry for the bad news. If you are interested I can give you the results of the build (large files but manageable) and even the full build tree.