Link to home
Start Free TrialLog in
Avatar of Mike Paradis
Mike Paradis

asked on

LEDE on Centos7 / Debian - Compiler breaks broken

I have re-installed everything as far as I know yet keep seeing this problem. Looking on search engines, there are some solutions but they don't relate to my setup which is Centos7. Note that the compiler works just fine when using image generator with the chaos calmer openwrt on the same machine so???
What is going on and how can I get past this as it is only happening when trying to compile openwrt for LEDE.

Checking 'working-make'... ok.
Checking 'case-sensitive-fs'... ok.
Checking 'proper-umask'... ok.
Checking 'gcc'... ok.
Checking 'working-gcc'... failed.
Checking 'g++'... ok.
Checking 'working-g++'... failed.
Checking 'ncurses'... failed.
Checking 'zlib'... failed.
Checking 'perl-thread-queue'... ok.
Checking 'tar'... ok.
Checking 'find'... ok.
Checking 'bash'... ok.
Checking 'patch'... ok.
Checking 'diff'... ok.
Checking 'cp'... ok.
Checking 'seq'... ok.
Checking 'awk'... ok.
Checking 'grep'... ok.
Checking 'getopt'... ok.
Checking 'stat'... ok.
Checking 'unzip'... ok.
Checking 'bzip2'... ok.
Checking 'wget'... ok.
Checking 'perl'... ok.
Checking 'python'... ok.
Checking 'git'... ok.
Checking 'file'... ok.
Checking 'ldconfig-stub'... ok.

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)

Open in new window


I have now moved on to debian since there is only one error on that OS so less likely to break the OS. I can use either.

# make image
bash: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by bash)
bash: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.15' not found (required by bash)
make: *** [image] Error 1
Avatar of arnold
arnold
Flag of United States of America image

Install ncurses, zlib

rpm -qa | egrep -I '(zlib|gcc|ncurses)'

Yum install  ncurses zlib
Avatar of Mike Paradis
Mike Paradis

ASKER

Everything is already installed but I'll go through it just to show you. As mentioned, old openwrt compiles fine, the errors come up when trying to compile lede.

# rpm -qa | egrep -I '(zlib|gcc|ncurses)'
zlib-1.2.7-17.el7.x86_64
ncurses-5.9-14.20130511.el7_4.x86_64
zlib-static-1.2.7-17.el7.x86_64
gcc-c++-4.8.5-16.el7_4.2.x86_64
gcc-4.8.5-16.el7_4.2.x86_64
ncurses-libs-5.9-14.20130511.el7_4.x86_64
ncurses-devel-5.9-14.20130511.el7_4.x86_64
ncurses-base-5.9-14.20130511.el7_4.noarch
zlib-devel-1.2.7-17.el7.x86_64
libgcc-4.8.5-16.el7_4.2.i686
zlib-1.2.7-17.el7.i686
libgcc-4.8.5-16.el7_4.2.x86_64
gcc-gfortran-4.8.5-16.el7_4.2.x86_64

# yum install  ncurses zlib
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.usf.edu
 * epel: mirrors.develooper.com
 * extras: mirror.steadfast.net
 * remi-safe: repo1.ash.innoscale.net
 * rpmforge: mirror.lstn.net
 * updates: mirrors.unifiedlayer.com
Package ncurses-5.9-14.20130511.el7_4.x86_64 already installed and latest version
Package zlib-1.2.7-17.el7.x86_64 already installed and latest version
Nothing to do
Usually, the packages should include a readme, install that detail the dependencies including versions.

The config.log or config.status should include the explanation of the failure.

There are newer zlib, ncurses and gcc.

Whenever installing software from source, the information on requirements are commonly included.
There is no log, it never gets to the point of compiling. It only checks for dependencies and fails. As shown above.
Besides, why does compiling work with the openwrt version and not the lede version. There must be something/s that lede is wrongly looking for.
the process you run, ./configure or the link always writes a log so that the generic check zlib and ncurses could be understood.

Since you have ncurses and zlib installed, either they can not be located ldconf, or the more likely the version you have are not higher than the version LEDE is looking for,

get the two versions compile them with the --prefix=/usr/local as to not overwrite the one you have already installed
add it into the /etc/ld.so.conf.d/LEDE.conf
/usr/local/lib
....
have not installed LEDE specifically, but all prior compilation had a README file and an INSTALL file.
those included what to look out for and what option dependencies...
There is no ./configure with lede.
There is no README file with the image generator.
There is no such file in /etc/ld.so.conf unless you are saying I should add this. However, there is nothing in /usr/local/lib either.
For testing, I simply run 'make image' to see if everything is ready which is how I found these problems.
Look at e Makefile and see what it does when ncurses and zlib are kicked.
CC! CFLAG, LDFLAGS could be used to provide where make should be looking for libraries and includes.
Are you using/setting target and build?
These is no mention of either ncurses or zlib in the Makefile. The only 'FLAG' entries are two, both called MAKEFLAGS.
Not being a dev myself, I'm not sure what else to look at.

Yes, I've tried setting a target to build but as I said, even just 'make image' should run if everything was seen by the compiler but it's not.

I've read where some people are messing with symlinks and other things so eventually breaking their system completely.

Grepping around;

packageinfo:Depends: +libc +SSP_SUPPORT:libssp +USE_GLIBC:librt +USE_GLIBC:libpthread +!USE_MUSL:libthread-db +PACKAGE_zlib:zlib @!arc +libreadline +libncurses +zlib

packageinfo:Source-Makefile: package/libs/ncurses/Makefile
packageinfo:Build-Depends: ncurses/host
packageinfo:Title: Terminal Info Database (ncurses)
packageinfo:Source: ncurses-6.0.tar.gz
packageinfo:Description: Terminal Info Database (ncurses)
packageinfo:http://www.gnu.org/software/ncurses/
packageinfo:Package: libncurses
packageinfo:Provides: libncursesw
packageinfo:Build-Depends: ncurses/host
packageinfo:Source: ncurses-6.0.tar.gz
packageinfo:http://www.gnu.org/software/ncurses/
packageinfo:Depends: +libc +SSP_SUPPORT:libssp +USE_GLIBC:librt +USE_GLIBC:libpthread +libreadline                    


ncurses installed;

Installed Packages
Name        : ncurses
Arch        : x86_64
Version     : 5.9

I don't see a 6.x version for Centos 7.3.
Your suggestion of installing the diff version from source could lead down a wormhole that may not be needed. Remember that there are several packages which are involved.

Checking 'working-gcc'... failed.
Checking 'working-g++'... failed.
Checking 'ncurses'... failed.
Checking 'zlib'... failed.
The g++ and gcc failure could relate on options used to invoke the compilation of a test
Gcc -lzlib -lm4 sonecode,c
If it fails, it reports that you gave a gcc error with m4 and zlib if both....

Looking through the Makefile where this test, report to determine the test and then why it failed.

I.e. In Makefile the ncurses line runs sone........... You could test it your self by using -I and -L I fpotentially CFLAGS, LDFLAGS, CC, TO DETERMINE WHY AND which options when added fix the issue.

Please provide exactly what you downloaded and from where.
You simply need to run 'make image' to see the problem.

This is the package.
https://downloads.openwrt.org/releases/17.01.4/targets/ramips/mt7620/lede-imagebuilder-17.01.4-ramips-mt7620.Linux-x86_64.tar.xz

I tested on Debian and the same problem exists only with less packages. I thought I had posted that but seems I never saved it.

On Debian, same thing. Everything compiles fine with openwrt but I get the following error with lede.

bash: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by bash)
bash: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.15' not found (required by bash)

Oddly, the above shows both 2.14 and 2.15.

Doesn't matter to me which OS I use, but it seems the least disruptive fix would be the Debian one. I can use either one.
On Debian

# apt-get install libc6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6 is already the newest version.
Will have to download and check on what it is trying to do.
ASKER CERTIFIED SOLUTION
Avatar of Mike Paradis
Mike Paradis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Spent a week messing with this and found that the solution was a simple as downloading the newest version.