OpenWrt Forum Archive

Topic: Setup Build Environment on OpenWRT

The content of this topic has been archived on 7 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi;

I've installed OpenWRT on a Raspberry Pi 3 and I am trying to setup the build environment on that (Not cross-compiling). Apparently, some of the required packages like `build-essential` don't exist on opkg. Any idea?

Thanks in advance.

Vahid

build-essential is a meta package anyway with the following depends on Ubuntu 16.04 (which I use): ibc6-dev | libc-dev, gcc (>= 4:5.2), g++ (>= 4:5.2), make, dpkg-dev (>
= 1.17.11).

Try the following two packages in openwrt: gcc, make

OpenWrt isn't really made for that, if you do want to do actual development and native compiling, you'd be better suited with a general purpose desktop distribution (e.g., in alphabetical order, arch, debian, fedora, gentoo, OpenSuSE, ubuntu). By now all of them should provide ARMv7/ ARMv8 support, which should cover the RPi to varying degrees (maybe in the form of specialized derived distributions, like raspbian/ armbian).

(Last edited by slh on 16 Feb 2018, 00:08)

@mikma,

Thanks a lot for your response. I have already installed `gcc` and `make` on the OpenWRT. I didn't expect them to be sufficient to build complex codes on OpenWRT. I'll give it a try.

@slh,

Many thanks for your reply. You're right. I know cross-compiling is a better choice. I want to compile WebRTC for OpenWRT and then build another application which uses WebRTC libraries. I've already done that for ARM, but not for OpenWRT. Do you know any straightforward cross-compiling instructions?

Thanks in advance.

Bests,
Vahid

slh wrote:

OpenWrt isn't really made for that, if you do want to do actual development and native compiling, you'd be better suited with a general purpose desktop distribution (e.g., in alphabetical order, arch, debian, fedora, gentoo, OpenSuSE, ubuntu). By now all of them should provide ARMv7/ ARMv8 support, which should cover the RPi to varying degrees (maybe in the form of specialized derived distributions, like raspbian/ armbian).

Agreed. If you dont want to create a linux partition on the PC, use a VM (VirtualBox will do)

The discussion might have continued from here.