Unable to compile LEDE

Hi all.
I'm having issue even following the build guide at https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem

Upon make -j $(nproc) kernel_menuconfig
or even other make commands I get this error (happening at m4 package compile or just next after it)

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."

I tried with Debian 11 now with Debian 10 is the same. I guess LEDE can't be compiled with newer libc versions ? I should try to compile way back to Debian 9 or there's something that I'm missing.
I'm also using the older advice for openwrt prerequisites as

sudo apt update
sudo apt install build-essential ccache ecj fastjar file g++ gawk \
gettext git java-propose-classpath libelf-dev libncurses5-dev \
libncursesw5-dev libssl-dev python python2.7-dev python3 unzip wget \
python3-distutils python3-setuptools python3-dev rsync subversion \
swig time xsltproc zlib1g-dev

because it includes python2.7 which I guess is needed for LEDE (newer ones are ok with python3).

Soo can actually someone indeed build LEDE on Debian and how does he escapes this situation.
I'm also saving the .config without touching the defaults when make menuconfig.


I would look at the docker images:

Everything is precompiled and you then run the 17.01 buildroot for example to build your Openwrt firmware image.

Thanks but Docker isn't an option at the moment.
There must be some kind of explanation of the libc error and how to avoid it. I don't know how to downgrade libc to suitable version and don't know actually which version works.

Why on earth would you go for LEDE ?

Please don't tell that I have to buy a new router / upgrade equipment. I have carefully calculated my needs and LEDE is what I have to deal with. I'm just asking if somebody can help in the situation.

How would we know, you haven't told us what equipment you've got.

Problem is LEDE is at least 5 years old, and you're asking for support with something that's (pretty much) abandonware.

  • You should try a linux distro from that time or maybe a little older.
  • You could try to see if image builder works. You can't compile anything new with it, but you can include any of the pre-built packages and kernel modules into your firmware image.
  • If you need something new, try to see if the toolchain works. Build static and include binaries into the firmware image with image builder.

Debian 9, Ubuntu 16.04.

Virtual machine?

Nobody knows what your needs are to try building a 6 years old release.

Why so sure? Are you aware of some kind of limitation that you can share ?
I'm now trying with Debian 9..
I need to edit serveral packages and compile .ipk

Works on Debian 9. Thanks all :slight_smile:

1 Like

I'm really curious, what device is this for?

1 Like

Long story short - Lede is the "golden" middle version.
Like by building my own ipks they will work for both routers supported until LEDE as well as the newest routers supported from LEDE until now.
So whatever I do must be installable on most routers (new & old) and all of them will be on LEDE.
The drawbacks aren't an issue.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.