Can't build LEDE under Linux
Can't build LEDE for cross-compilation.
As mentioned at http://community.onion.io/topic/1671/compiling-lede-on-windows-10 I can't build LEDE using the WIndows Linux ubsystem.
But, I also can't build it under Linux, following the offical Onion documentation .
Following https://docs.onion.io/omega2-docs/cross-compiling.html I get an error - a different one. I think I have to use Raspberry Pi now :-( even though the Omega2 is a far better board
gcc -I. -I/home/me/source/staging_dir/host/include -I/home/me/source/staging_dir/host/usr/include -O2 -I/home/me/source/staging_dir/host/include -I/home/me/source/staging_dir/host/usr/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."
#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."
I fought with this issue for days. Finally my solution was to build on Ubuntu 17.x. Then you can upgrade to Ubuntu 18LTS.
Thanx a 1,000,000.
I will try this when I get home this evening.
This got me wondering why it is so difficult to develop for the Omega2, and why Onion - or some kind volunteer - don't provide a VM or Docker container.
@mawg I agree, getting set up on C/C++ frustrated the hell out of me. But fortunately I run Linux under VMWare so it is easy to switch between the various versions or roll back to previous functioning installations.
It seems that most are using the Docker image but I find Docker horribly slow on my Surface Pro Win10Pro x64,16GB RAM on i7. VMWare performs flawlessly and outperforms Docker 100:1.
Once I had everything compiled on Ubuntu 17, I just upgraded to 18LTS and have been developing on 18LTS for the last month or so without any issues. From what I have gleaned from googling, this is not an Omega issue, the errors relate to some changes to the GNU libs.