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
343 views 4 comments
by anonymous

Hi all,

Since a colleague left I have to proceed with adapting his project. However while running 'make' it seems to fail to compile everything.

The instructions I follow are from: https://wiki.teltonika-networks.com/view/Legacy_RUTOS_Software_Development_Kit_instructions

The dependency's are up to date

devscripts is already the newest version (2.20.2ubuntu2).
file is already the newest version (1:5.38-4).
flex is already the newest version (2.6.4-6.2).
gawk is already the newest version (1:5.0.1+dfsg-1).
gcc-multilib is already the newest version (4:9.3.0-1ubuntu2).
gettext is already the newest version (0.19.8.1-10build1).
libncurses5-dev is already the newest version (6.2-0ubuntu2).
unzip is already the newest version (6.0-25ubuntu1).
gengetopt is already the newest version (2.23+dfsg1-1).
groff is already the newest version (1.22.4-4build1).
build-essential is already the newest version (12.8ubuntu1.1).
curl is already the newest version (7.68.0-1ubuntu2.12).
git is already the newest version (1:2.25.1-1ubuntu3.5).
libssl-dev is already the newest version (1.1.1f-1ubuntu2.16).
vim-common is already the newest version (2:8.1.2269-1ubuntu5.7).
wget is already the newest version (1.20.3-1ubuntu2).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu1.3).
python2.7 is already the newest version (2.7.18-1~20.04.1).

The OS is Ubuntu 20.04 (Focal Fossa) running under WSL-2 (this worked for my colleague so that should not be the issue).

running "./scripts/feeds update -a" gives

Updating feed 'luci' from '../custom_feeds/teltonika_luci/contrib/package' ...
Create index file './feeds/luci.index'
Updating feed 'rut_feeds' from '../custom_feeds/rut_feeds' ...
Create index file './feeds/rut_feeds.index'

Finally running "make V=s" ends with

depbase=`echo fclose.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc  -I.   -I/home/[username]/RUTSDK/RUT9XX_R_GPL/staging_dir/host/include  -O2 -I/home/[username]/RUTSDK/RUT9XX_R_GPL/staging_dir/host/include -MT fclose.o -MD -MP -MF $depbase.Tpo -c -o fclose.o fclose.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo fcntl.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc  -I.   -I/home/[username]/RUTSDK/RUT9XX_R_GPL/staging_dir/host/include  -O2 -I/home/[username]/RUTSDK/RUT9XX_R_GPL/staging_dir/host/include -MT fcntl.o -MD -MP -MF $depbase.Tpo -c -o fcntl.o fcntl.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo fflush.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc  -I.   -I/home/[username]/RUTSDK/RUT9XX_R_GPL/staging_dir/host/include  -O2 -I/home/[username]/RUTSDK/RUT9XX_R_GPL/staging_dir/host/include -MT fflush.o -MD -MP -MF $depbase.Tpo -c -o fflush.o fflush.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo fpurge.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc  -I.   -I/home/[username]/RUTSDK/RUT9XX_R_GPL/staging_dir/host/include  -O2 -I/home/[username]/RUTSDK/RUT9XX_R_GPL/staging_dir/host/include -MT fpurge.o -MD -MP -MF $depbase.Tpo -c -o fpurge.o fpurge.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo freadahead.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc  -I.   -I/home/[username]/RUTSDK/RUT9XX_R_GPL/staging_dir/host/include  -O2 -I/home/[username]/RUTSDK/RUT9XX_R_GPL/staging_dir/host/include -MT freadahead.o -MD -MP -MF $depbase.Tpo -c -o freadahead.o freadahead.c &&\

mv -f $depbase.Tpo $depbase.Po

freadahead.c: In function 'freadahead':

freadahead.c:91:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."

   91 |  #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."

      |   ^~~~~

make[8]: *** [Makefile:1837: freadahead.o] Error 1

make[8]: Leaving directory '/home/[username]/RUTSDK/RUT9XX_R_GPL/build_dir/host/m4-1.4.17/lib'

make[7]: *** [Makefile:1602: all] Error 2

make[7]: Leaving directory '/home/[username]/RUTSDK/RUT9XX_R_GPL/build_dir/host/m4-1.4.17/lib'

make[6]: *** [Makefile:1506: all-recursive] Error 1

make[6]: Leaving directory '/home/[username]/RUTSDK/RUT9XX_R_GPL/build_dir/host/m4-1.4.17'

make[5]: *** [Makefile:1461: all] Error 2

make[5]: Leaving directory '/home/[username]/RUTSDK/RUT9XX_R_GPL/build_dir/host/m4-1.4.17'

make[4]: *** [Makefile:31: /home/[username]/RUTSDK/RUT9XX_R_GPL/build_dir/host/m4-1.4.17/.built] Error 2

make[4]: Leaving directory '/home/[username]/RUTSDK/RUT9XX_R_GPL/tools/m4'

make[3]: *** [tools/Makefile:160: tools/m4/compile] Error 2

make[3]: Leaving directory '/home/[username]/RUTSDK/RUT9XX_R_GPL'

make[2]: *** [tools/Makefile:158: /home/[username]/RUTSDK/RUT9XX_R_GPL/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.tools_install_yynyynynynyyyyyyyyyyyyyyyyyyyyynyyyynnyyynyyyynnynyyyy] Error 2

make[2]: Leaving directory '/home/[username]/RUTSDK/RUT9XX_R_GPL'

make[1]: *** [Makefile:95: world] Error 2

make[1]: Leaving directory '/home/[username]/RUTSDK/RUT9XX_R_GPL'

make: *** [/home/[username]/RUTSDK/RUT9XX_R_GPL/include/toplevel.mk:171: world] Error 2

(note: my username has been replaced with [username] for privacy reasons)

Any suggestions of how to fix this? 

1 Answer

0 votes
by anonymous
Hello,

Could you execute:

make -j 1 V=sc 2>&1 | tee makelog.txt

and post the makelog.txt file somewhere ?

Regards,
by anonymous
Hi,

As requested, the log can be found on https://pastebin.com/hnQEqrmz

Hope this helps.
by anonymous

You might try the following:

sudo apt-get update
sudo apt-get install -y build-essential curl devscripts gawk gcc-multilib gengetopt gettext git groff file flex libncurses5-dev libssl-dev python2.7 subversion unzip vim-common zlib1g-dev wget
./scripts/feeds update -a

and restart the make. No guarantee it is an old version it would be better to use Ubuntu 16.04

by anonymous
Nope, same result.

So, according to you the best I can do now is to grab the ubuntu 16.04 installer and install that (in a VM) on my machine and try from there.

I'll make an update if that was successful (could take a while).
by anonymous
For anyone else reading this. On ubuntu 16.04 the compilation was successful.

So if you have issues: Grab a VM (virtualbox worked for me). Grab the latest installer of ubuntu 16.04. Give it a disk of at least 16GB (25GB is recommended) since the build folder will be 8.2GB.

Start building (and waiting...)