LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 08-27-2016, 11:52 AM   #16
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled

here is the output:

Code:
sudo -i
[sudo] password for zoe: 
root@zoe-MacBookPro:~# cat > version-check.sh << "EOF"
> #!/bin/bash
> # Simple script to list version numbers of critical development tools
> export LC_ALL=C
> bash --version | head -n1 | cut -d" " -f2-4
> MYSH=$(readlink -f /bin/sh)
> echo "/bin/sh -> $MYSH"
> echo $MYSH | grep -q bash || echo "ERROR: /bin/sh does not point to bash"
> unset MYSH
> 
> echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
> bison --version | head -n1
> 
> if [ -h /usr/bin/yacc ]; then
>   echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
> elif [ -x /usr/bin/yacc ]; then
>   echo yacc is `/usr/bin/yacc --version | head -n1`
> else
>   echo "yacc not found" 
> fi
> 
> bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
> echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
> diff --version | head -n1
> find --version | head -n1
> gawk --version | head -n1
> 
> if [ -h /usr/bin/awk ]; then
>   echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
> elif [ -x /usr/bin/awk ]; then
>   echo awk is `/usr/bin/awk --version | head -n1`
> else 
>   echo "awk not found" 
> fi
> 
> gcc --version | head -n1
> g++ --version | head -n1
> ldd --version | head -n1 | cut -d" " -f2-  # glibc version
> grep --version | head -n1
> gzip --version | head -n1
> cat /proc/version
> m4 --version | head -n1
> make --version | head -n1
> patch --version | head -n1
> echo Perl `perl -V:version`
> sed --version | head -n1
> tar --version | head -n1
> makeinfo --version | head -n1
> xz --version | head -n1
> 
> echo 'int main(){}' > dummy.c && g++ -o dummy dummy.c
> if [ -x dummy ]
>   then echo "g++ compilation OK";
>   else echo "g++ compilation failed"; fi
> rm -f dummy.c dummy
> EOF
root@zoe-MacBookPro:~# 
root@zoe-MacBookPro:~# bash version-check.sh
bash, version 4.3.46(1)-release
/bin/sh -> /bin/dash
ERROR: /bin/sh does not point to bash
Binutils: (GNU Binutils for Ubuntu) 2.26.1
version-check.sh: line 11: bison: command not found
yacc not found
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.25
diff (GNU diffutils) 3.3
find (GNU findutils) 4.7.0-git
GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.4, GNU MP 6.1.0)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609
(Ubuntu GLIBC 2.23-0ubuntu3) 2.23
grep (GNU grep) 2.25
gzip 1.6
Linux version 4.4.0-34-generic (buildd@lgw01-20) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1) ) #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016
version-check.sh: line 41: m4: command not found
GNU Make 4.1
GNU patch 2.7.5
Perl version='5.22.1';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.28
version-check.sh: line 47: makeinfo: command not found
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
root@zoe-MacBookPro:~#
thanks
 
Old 08-27-2016, 11:54 AM   #17
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
also here is the output of the second script:

Code:
root@zoe-MacBookPro:~# cat > library-check.sh << "EOF"
> #!/bin/bash
> for lib in lib{gmp,mpfr,mpc}.la; do
>   echo $lib: $(if find /usr/lib* -name $lib|
>                grep -q $lib;then :;else echo not;fi) found
> done
> unset lib
> EOF
root@zoe-MacBookPro:~# 
root@zoe-MacBookPro:~# bash library-check.sh
libgmp.la: not found
libmpfr.la: not found
libmpc.la: not found
root@zoe-MacBookPro:~#
however it said that it is ok if they are all absent.
 
Old 08-27-2016, 12:06 PM   #18
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,151

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
fix the errots from the version script, then start again, dont reuse the tools from chap 5 start completly from fresh, if your host is not complient you will not be able to build LFS

Last edited by Keith Hedger; 08-27-2016 at 12:08 PM. Reason: wish i culd tpye
 
Old 08-27-2016, 12:08 PM   #19
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
Ok thank you so much!
 
Old 09-27-2018, 04:51 PM   #20
maxlndn
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Rep: Reputation: Disabled
None of these errors but same problem: gawk too old or missing

Hello,

I have the same problem (gawk too old or missing) at the same step (Chapter 6.9). However, I don't have any of these errors in the version-check.sh script. Here is the output of it:

root@desktop-mkc5ii4:/home/para# bash version-check.sh
bash, version 4.4.18(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Debian) 2.30
bison (GNU Bison) 3.0.4
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.28
diff (GNU diffutils) 3.6
find (GNU findutils) 4.7.0-git
GNU Awk 4.1.4, API: 1.1 (GNU MPFR 4.0.1-rc1, GNU MP 6.1.2)
/usr/bin/awk -> /usr/bin/gawk
gcc (Debian 7.3.0-5) 7.3.0
g++ (Debian 7.3.0-5) 7.3.0
(Debian GLIBC 2.27-2) 2.27
grep (GNU grep) 3.1
gzip 1.6
Linux version 4.14.0-kali3-amd64 (devel@kali.org) (gcc version 7.3.0 (Debian 7.3.0-3)) #1 SMP Debian 4.14.17-1kali1 (2018-02-16)
m4 (GNU M4) 1.4.18
GNU Make 4.1
GNU patch 2.7.6
Perl version='5.26.1';
sed (GNU sed) 4.4
tar (GNU tar) 1.29
version-check.sh: line 47: makeinfo: command not found
xz (XZ Utils) 5.2.2
g++ compilation OK


Here is the output of the ../configure for glibc:

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include -isystem /usr/include
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include -isystem /usr/include accepts -g... yes
checking for readelf... readelf
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ can link programs... yes
checking for sysdeps preconfigure fragments... aarch64 alpha arm hppa i386 m68k microblaze mips nios2 powerpc riscv s390 sh sparc x86_64 checking whether gcc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/includ
e -isystem /usr/include compiles in -mx32 mode by default... no
checking for use of fpu sysdeps directories... yes
checking for -fstack-protector... yes
checking for -fstack-protector-strong... yes
checking for -fstack-protector-all... yes
checking for assembler and linker STT_GNU_IFUNC support... yes
checking for gcc attribute ifunc support... yes
checking if compiler warns about alias for function with incompatible types... yes
checking sysdep dirs... sysdeps/unix/sysv/linux/x86_64/64 sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/x86 sysdeps/x86/nptl sysdeps/unix/sysv/linux/wordsize-64 sysdeps/x86_64/nptl sysdeps/unix/sysv/linu
x sysdeps/nptl sysdeps/pthread sysdeps/gnu sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/x86_64 sysdeps/unix sysdeps/posix sysdeps/x86_64/64 sysdeps/x86_64/fpu/multiarch sysdeps/x86_64/fpu sysdeps/x86/fpu sysd
eps/x86_64/multiarch sysdeps/x86_64 sysdeps/x86 sysdeps/ieee754/float128 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64/wordsize-64 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/wordsize-64 sysdeps/ieee75
4 sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether /tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/as is GNU as... yes
checking whether /tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld is GNU ld... yes
checking for /tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/as... /tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/as
checking version of /tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/as... 2.31.1, ok
checking for /tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld... /tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld
checking version of /tools/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/bin/ld... 2.31.1, ok
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 4.2.1, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... msgfmt
checking version of msgfmt... 0.19.8.1, ok
checking for makeinfo... makeinfo
checking version of makeinfo... 6.5, ok
checking for sed... sed
checking version of sed... 4.5, ok
checking for gawk... no
checking for bison... bison
checking version of bison... 3.0.5, ok
checking if gcc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include -isystem /usr/include is sufficient to build libc... yes
checking for nm... nm
checking for python3... no
checking for python... no
configure: error:
*** These critical programs are missing or too old: gawk
*** Check the INSTALL file for required versions.


I would be grateful for any help
Thanks a lot.

Max
 
Old 09-27-2018, 05:07 PM   #21
sr_ls_boy
Member
 
Registered: Apr 2015
Posts: 105

Rep: Reputation: Disabled
You could try to skip to § 6.59 and install gawk before glibc. If that doesn't work than
back out of your chroot and install it to /tmp from § 5.23. Do not adjust the toolchain
in the next section or you'll end up with a nonviable temp tool chain.

+++

You don't have makeinfo. You'll need that.

Last edited by sr_ls_boy; 09-27-2018 at 05:08 PM.
 
Old 09-27-2018, 05:29 PM   #22
maxlndn
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Rep: Reputation: Disabled
Hello,

Thanks for the answer. Two points:

- I tried to install Gawk before glibc. It doesn't work. Another error appears:
"./config.status: line 1172: awk: command not found.

I don't know how to install Makeinfo. Maybe I'm wrong, but there is no package with this name in the sources directory. Do you know how to install it ? And from the host or in the chroot environment ?

Thanks a lot for your answer.
 
Old 09-27-2018, 05:35 PM   #23
sr_ls_boy
Member
 
Registered: Apr 2015
Posts: 105

Rep: Reputation: Disabled
makeinfo is given by the texinfo package.

Quote:
./config.status: line 1172: awk: command not found.
Is this issued by the configure script for glibc in §6.9 ?

Where ever you have awk or gawk, try manually copying it to /tmp/bin.
 
Old 09-27-2018, 05:45 PM   #24
maxlndn
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Rep: Reputation: Disabled
No it is given by the configure script of Gawk
 
Old 09-27-2018, 05:46 PM   #25
maxlndn
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Rep: Reputation: Disabled
Ok so do you think I can install texinfo before glibc as well ?
 
Old 09-27-2018, 06:25 PM   #26
sr_ls_boy
Member
 
Registered: Apr 2015
Posts: 105

Rep: Reputation: Disabled
It's strange that gawk is complaining that you don't have
awk. I suggest backing out of the chroot and installing
both texinfo and gawk to your host. And, I don't mean /tmp.
After you used your package manager, rerun § 5.23. That
will give you gawk in /tmp. chroot and try glibc again.
 
Old 09-27-2018, 06:28 PM   #27
sr_ls_boy
Member
 
Registered: Apr 2015
Posts: 105

Rep: Reputation: Disabled
Quote:
Originally Posted by maxlndn View Post
Ok so do you think I can install texinfo before glibc as well ?
texinfo is needed to to build viable temp tool chain.
If you were using Ubuntu as your host I would ask
you to run:
Code:
sudo apt install texinfo
The host requirement is not to be confused with § 5.32.
 
Old 09-27-2018, 06:38 PM   #28
maxlndn
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Rep: Reputation: Disabled
Ok I'll try this, but what is weird is that Gawk is actually installed on the host .
 
Old 09-27-2018, 06:39 PM   #29
maxlndn
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Rep: Reputation: Disabled
By the way the other strange thing is that texinfo is also installed in temporary toolchain
 
Old 09-27-2018, 08:32 PM   #30
maxlndn
LQ Newbie
 
Registered: Sep 2018
Posts: 14

Rep: Reputation: Disabled
Okay so texinfo is installed on the host, and the version-check.sh script is successful.
However Gawk is already installed and up to date.

- Installing gawk before glibc still doesn't work, awk is not detected.

- Also, in the /tmp/bin directory (when out of chroot) is already filled with awk and gawk. I also tried to install it as said in 5.23 with --prefix=/tmp.
Therefore my /tmp/bin is filled with :
awk gawk gawk-4.2.1


Obviously, installing glibc still doesn't work as well.

A few suggestions/theories on my part:
- If for the temporary system the installation of both glibc and gawk worked (in this precise order), then is it possible that there is a problem with the PATH, or with the way the OS is looking up programs ? However I don't believe this too much given both awk and gawk binaries are in /usr/bin/ and that this path is in the PATH given to the chroot command.

- The test for detecting gawk is buggy. (I tried to look it up a bit, but I'm not an advanced user of bash, and I could not really understand the few parts I found about testing gawk.

Last edited by maxlndn; 09-27-2018 at 08:43 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Glibc not compiling in Chapter 6.9 corbis_demon Linux From Scratch 4 08-06-2010 08:44 AM
Yet another glibc, chapter 6.9 problem... gViscardi Linux From Scratch 4 10-25-2008 12:10 PM
glibc chapter 6.9 error jol123 Linux From Scratch 1 03-28-2007 04:03 PM
Problem with Glibc-2.3.4 chapter 6.11 adancoco Linux From Scratch 1 02-14-2005 12:04 PM
glibc-2.3.3 in chapter 6 error znif Linux From Scratch 11 06-28-2004 07:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration