LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-22-2014, 04:28 AM   #1
thegreatstudio
LQ Newbie
 
Registered: Aug 2013
Posts: 7

Rep: Reputation: Disabled
Post yacc is not a command.. error while building bash


Code:
lfs@Microknoppix:/mnt/lfs/sources/bash-4.2$ make -j26
yacc -d ./parse.y
make: yacc: Command not found
rm -f mksyntax
make: *** [y.tab.c] Error 127
make: *** Waiting for unfinished jobs....
gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"i686"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"i686-pc-linux-gnu"' -DCONF_VENDOR='"pc"' -DLOCALEDIR='"/tools/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -g  -o mksyntax ./mksyntax.c 
lfs@Microknoppix:/mnt/lfs/sources/bash-4.2$ make -j26 tests
yacc -d ./parse.y
make: yacc: Command not found
rm -f syntax.c
make: *** [y.tab.c] Error 127
make: *** Waiting for unfinished jobs....
./mksyntax -o syntax.c
lfs@Microknoppix:/mnt/lfs/sources/bash-4.2$
Can you please help me please..
 
Old 08-22-2014, 04:30 AM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Which chapter are you at, and what is your build system as host,?

Last edited by ReaperX7; 08-22-2014 at 04:31 AM.
 
Old 08-22-2014, 04:32 AM   #3
thegreatstudio
LQ Newbie
 
Registered: Aug 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ReaperX7 View Post
Which chapter are you at, and what is your build system as host,?
I am at Chapter 5.16. Bash 4.2, My current build system as host is Knoppix 7.1 .
 
Old 08-22-2014, 04:35 AM   #4
thegreatstudio
LQ Newbie
 
Registered: Aug 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Oops.. I think I forgot to install Bison.. Ok, My fault.. I installed Bison then it worked! But I think Bash is the only one needs bison right?
 
Old 08-22-2014, 05:17 AM   #5
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
A few packages do.

Did you run this:

Code:
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
echo "/bin/sh -> `readlink -f /bin/sh`"
echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
bison --version | head -n1
if [ -e /usr/bin/yacc ];
  then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
  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 [ -e /usr/bin/awk ];
  then echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
  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
xz --version | head -n1

echo '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

bash version-check.sh
And this utility?

Code:
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

bash library-check.sh
All tests should pass from those scripts. If not, you won't be able to build LFS correctly.

Last edited by ReaperX7; 08-22-2014 at 05:26 AM.
 
  


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] YACC syntax error MTK358 Programming 5 02-05-2010 04:54 PM
Bash build fails (yacc error) merchtemeagle Linux From Scratch 0 07-04-2007 10:58 AM
yacc error during installation of xmgr betrussell23 Linux - Software 1 02-27-2007 02:39 AM
Make: Yacc: Command Not Found, about mak flex singying304 Mandriva 1 06-06-2006 02:02 AM
Error in Makefile for Lex and Yacc oulevon Programming 2 10-24-2005 12:52 AM

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

All times are GMT -5. The time now is 07:38 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