1

Topic: OpenWRT build error with GCC and ncurses (broken)

Hello,

I'm trying to setup the OpenWRT build system on my hyperbola system.
Unfortunately, it stops.. early.

Those errors appears when updating the packages feeds after cloning the openwrt repo and switching to 18.06.1 branch :

./scripts/feeds update && ./scripts/feeds install -a

Build dependency: \nPlease reinstall the GNU C Compiler (4.8 or later) - it appears to be broken
Build dependency: \nPlease reinstall the GNU C++ Compiler (4.8 or later) - it appears to be broken
Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h)

Even though they are installed.
gcc 6.3.0-1.hyperbola1
ncurses 6.0+20170429-1

Any help please ?

2

Re: OpenWRT build error with GCC and ncurses (broken)

aether wrote:

Hello,

I'm trying to setup the OpenWRT build system on my hyperbola system.
Unfortunately, it stops.. early.

Those errors appears when updating the packages feeds after cloning the openwrt repo and switching to 18.06.1 branch :

./scripts/feeds update && ./scripts/feeds install -a

Build dependency: \nPlease reinstall the GNU C Compiler (4.8 or later) - it appears to be broken
Build dependency: \nPlease reinstall the GNU C++ Compiler (4.8 or later) - it appears to be broken
Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h)

Even though they are installed.
gcc 6.3.0-1.hyperbola1
ncurses 6.0+20170429-1

Any help please ?

I haven't done this before, but hopefully me replying will send help to you. 

PS, why not librecmc?  It is a fork of openwrt that removes the non-free stuff from openwrt. Just wondering...

HyperbolaBSD: The Future of Secure Libre Lightweight Operating Systems!

3 (edited by aether 2018-09-28 07:58:37)

Re: OpenWRT build error with GCC and ncurses (broken)

zapper wrote:

I haven't done this before, but hopefully me replying will send help to you. 

PS, why not librecmc?  It is a fork of openwrt that removes the non-free stuff from openwrt. Just wondering...

In fact, I'm using LibreCMC already but wanted to try something with OpenWRT. Anyway, the build system is broken as well :

Build dependency: Please reinstall the GNU C Compiler - it appears to be broken
Build dependency: Please reinstall the GNU C++ Compiler - it appears to be broken
Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h)
Build dependency: Please install a static zlib. (Missing libz.a or zlib.h)

PS : coreboot crossgcc compilation is also not working with current GCC on Hyperbola. I'm not sure how to solve this. For now I've built the whole toolchain with Debian SID and use that.

4

Re: OpenWRT build error with GCC and ncurses (broken)

aether wrote:
zapper wrote:

I haven't done this before, but hopefully me replying will send help to you. 

PS, why not librecmc?  It is a fork of openwrt that removes the non-free stuff from openwrt. Just wondering...

In fact, I'm using LibreCMC already but wanted to try something with OpenWRT. Anyway, the build system is broken as well :

Build dependency: Please reinstall the GNU C Compiler - it appears to be broken
Build dependency: Please reinstall the GNU C++ Compiler - it appears to be broken
Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h)
Build dependency: Please install a static zlib. (Missing libz.a or zlib.h)

Okay, I am curious of what you were trying to do.  Nevertheless, last reply for now, but hopefully someone can help you.

HyperbolaBSD: The Future of Secure Libre Lightweight Operating Systems!

5 (edited by aether 2018-09-28 08:29:26)

Re: OpenWRT build error with GCC and ncurses (broken)

You can replicate by yourself if you want :

https://openwrt.org/docs/guide-develope … uildsystem
https://openwrt.org/docs/guide-develope … uildsystem

Dependencies :

pacman -S --needed subversion asciidoc bash bc binutils bzip2 fastjar flex git gcc util-linux gawk intltool zlib make cdrkit ncurses openssl patch perl-extutils-makemaker rsync unzip wget gettext libxslt boost libusb bin86 sharutils b43-fwcutter findutils time

Cloning the openwrt repo :

git clone https://git.openwrt.org/openwrt/openwrt.git

Switching to latest stable branch :

cd openwrt && git checkout tags/v18.06.1

Updating feeds :

./scripts/feeds update -a && ./scripts/feeds install -a

(this is where it complains about broken GCC and ncurses..)

----

What I don't understand is I'm able to build the whole thing without issue with Debian stable, testing or sid. What is causing the issue with hyperbola GCC and ncurses version ? Hopefully, Emulatorman will see this message smile

6 (edited by aloniv 2018-10-04 13:54:14)

Re: OpenWRT build error with GCC and ncurses (broken)

aether wrote:

PS : coreboot crossgcc compilation is also not working with current GCC on Hyperbola. I'm not sure how to solve this. For now I've built the whole toolchain with Debian SID and use that.

I actually ran "make crossgcc" last night in my coreboot directory and it built just fine on my hyperbola machine after several hours. I installed iasl and gcc-ada-multilib beforehand. Here is the log:

http://dpaste.com/07RNT1A

I think you might need gcc-multilib instead of regular gcc. On arch the newer gcc (from November of last year) includes support for multilib but hyperbola still uses the old version which is probably why in the instructions you copied the regular gcc package appears:

https://git.archlinux.org/svntogit/pack … 656515ebac

7 (edited by aether 2018-10-04 23:00:26)

Re: OpenWRT build error with GCC and ncurses (broken)

Thanks.
This is strange, I'm using gcc-multilib (& gcc-ada-multilib) as well and this is the error I get :

https://paste.debian.net/plainh/e6578d10

It compiled fine previously (few months ago).. So I don't know where to look.

8

Re: OpenWRT build error with GCC and ncurses (broken)

Try a fresh build using the commands from the log I provided and post the regular terminal output please.

9

Re: OpenWRT build error with GCC and ncurses (broken)

aloniv wrote:

Try a fresh build using the commands from the log I provided and post the regular terminal output please.

I did. This is the output I got.

10 (edited by aloniv 2018-10-05 13:56:43)

Re: OpenWRT build error with GCC and ncurses (broken)

It isn't the full output as it starts from the middle of a file. It needs to start with "git clone...". Also, please paste on dpaste as it's easier for me to read from there.

11

Re: OpenWRT build error with GCC and ncurses (broken)

http://dpaste.com/1F8D4RV

12

Re: OpenWRT build error with GCC and ncurses (broken)

what is the command you ran before the cloning line (the first line)?

Also, make sure you have enough RAM and try to do it when the computer is not in use (if you are killing off processes when RAM is full then it might kill the compilation - this happened to me once).

Maybe we should try debugging this on #hyperbola channel...

13

Re: OpenWRT build error with GCC and ncurses (broken)

git clone http://review.coreboot.org/p/coreboot
cd coreboot
git submodule update --init --checkout
make crossgcc

My computer is perfectly fine. It builds without any error with Debian (stable & testing) or Parabola. So..

14

Re: OpenWRT build error with GCC and ncurses (broken)

Problem solved.

The following package was causing the issue : hardening-wrapper

After uninstall, I can successfully build the toolchain.