LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-28-2018, 09:44 PM   #1
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Rep: Reputation: Disabled
funkiness with bc: libmath errors


I'm trying to work through an LFS install. Everything has worked up to chapter 6 of book version 8.2. I'm inside the chroot environment. I extract bc-1.07.1. I issue the fix-libmath_h as directed. I issue the various sed commands. I run configure as directed with the recommended switches. When I run make though, it fails:
Code:
libmath.h:1:1: error: stray '@' in program
 @iK20:s2:p@r
 ^
libmath.h:1:2: error: 'iK20' undeclared here (not in a function)
 @iK20:s2:p@r
  ^~~~
libmath.h:1:6: error: expected ',' or ';' before ':' token
 @iK20:s2:p@r
      ^
libmath.h:1:11: error: stray '@' in program
 @iK20:s2:p@r
           ^
libmath.h:2:1: error: stray '@' in program
 @iF1,5.6,7,8,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C1,0:
 ^
libmath.h:2:40: error: stray '#' in program
 @iF1,5.6,7,8,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C1,0:
                                        ^
libmath.h:3:29: error: invalid suffix "s12" on integer constant
 s14:pl7:s0:pl14:RN1:l5:0<Z2:1s12:pl5:ns5:pN2:l2:s15:pK6:l15:+
                             ^~~~
libmath.h:5:54: error: invalid suffix "B7" on integer constant
 1+s2:pJ3:N4:l13:s2:p1l5:+s14:pl5:s6:p1s8:pK2:s11:pN6:1B7:J5:N8:
                                                      ^~~
libmath.h:7:55: error: invalid suffix "l14" on integer constant
 l10:d10:Z12:l14:l14:*s14:pJ11:N12:N10:l15:s2:pl12:Z13:1l14:/R
                                                       ^~~~
libmath.h:8:37: error: stray '@' in program
 N13:l14:1/RN9:l14:l9:+s14:pJ8:N5:0R]@r
                                     ^
libmath.h:9:1: error: stray '@' in program
 @iF2,5.7,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C2,0:
 ^
libmath.h:9:36: error: stray '#' in program
 @iF2,5.7,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C2,0:
                                    ^
libmath.h:10:29: error: invalid suffix "K10" on integer constant
 s14:pl7:s0:pl14:RN1:l5:0{Z2:1K10:l2:^-1/RN2:l2:s15:pK6:l2:+s2:
                             ^~~~
libmath.h:11:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
 pK2:s10:p0s11:pN3:l5:K2:}Z4:l10:K2:*s10:pl5:cRs5:pJ3:N4:N5:l5:
                            ^
libmath.h:13:18: error: invalid suffix "B9" on integer constant
 *s12:pK3:s11:pN8:1B9:J7:N10:l11:K2:+s11:pJ8:N9:l13:l12:*s13:l11:
                  ^~~
libmath.h:15:4: error: stray '@' in program
 0R]@r
    ^
libmath.h:16:1: error: stray '@' in program
 @iF3,5.7,9,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C3,0:
 ^
libmath.h:16:36: error: stray '#' in program
 @iF3,5.7,9,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C3,0:
                                    ^
libmath.h:18:5: error: invalid suffix "s12" on integer constant
 <Z2:1s12:pl5:ns5:pN2:0s2:pl5:l14:/K2:+K4:/s13:pl5:K4:l13:*l14:
     ^~~~
libmath.h:18:22: error: invalid suffix "s2" on integer constant
 <Z2:1s12:pl5:ns5:pN2:0s2:pl5:l14:/K2:+K4:/s13:pl5:K4:l13:*l14:
                      ^~~
libmath.h:20:13: error: invalid suffix "B6" on integer constant
 pK3:s11:pN5:1B6:J4:N7:l11:K2:+s11:pJ5:N6:l9:l16:l11:l11:1-*/*
             ^~~
libmath.h:20:60: error: unterminated comment
 pK3:s11:pN5:1B6:J4:N7:l11:K2:+s11:pJ5:N6:l9:l16:l11:l11:1-*/*
In the first part of 6.15 we create the bc/fix-libmath_h file. We never actually USE it. Should we? I tried to run exec bc/fix_libmath_h and it actually kicked me out of the chroot environment, so maybe not. Is there another fix for this problem?
 
Old 03-29-2018, 09:47 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
just finished building 8.2 and not had this problem, you may have made a typo, try deleting the source and start over with bc, also just check the md4sum for the downloaded bc archive it may have got corrupted.
 
Old 03-29-2018, 10:52 AM   #3
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
I checked the md5sum, and it is correct. I re-extracted the bc files. I went through 6.15 again. That's twice I've gone through this page. I guess we'll try this again a third time.

Code:
(lfs chroot) root:/sources/bc-1.07.1$ ./configure --prefix=/usr \
> --with-readline \
> --mandir=/usr/share/man \
> --infodir=/usr/share/info
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /tools/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /tools/bin/grep
checking for egrep... /tools/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for flex... no
checking for lex... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking for bison... bison -y
checking for ranlib... ranlib
checking whether make sets $(MAKE)... (cached) yes
checking for stdarg.h... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for errno.h... yes
checking for limits.h... yes
checking for unistd.h... (cached) yes
checking for lib.h... no
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for ptrdiff_t... yes
checking for vprintf... yes
checking for _doprnt... no
checking for isgraph... yes
checking for setvbuf... yes
checking for fstat... yes
checking for strtol... yes
checking for tparm in -lncurses... no
checking for tgetent in -ltermcap... no
checking for readline in -lreadline... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
Using the readline library.
Adding GCC specific compile flags.
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bc/Makefile
config.status: creating dc/Makefile
config.status: creating lib/Makefile
config.status: creating doc/Makefile
config.status: creating doc/texi-ver.incl
config.status: creating config.h
config.status: executing depfiles commands

(lfs chroot) root:/sources/bc-1.07.1$ make
make  all-recursive
make[1]: Entering directory '/sources/bc-1.07.1'
Making all in lib
make[2]: Entering directory '/sources/bc-1.07.1/lib'
gcc -DHAVE_CONFIG_H  -I. -I..  -I. -I.. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT getopt.o -MD -MP -MF .deps/getopt.Tpo -c -o getopt.o getopt.c
mv -f .deps/getopt.Tpo .deps/getopt.Po
gcc -DHAVE_CONFIG_H  -I. -I..  -I. -I.. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT getopt1.o -MD -MP -MF .deps/getopt1.Tpo -c -o getopt1.o getopt1.c
mv -f .deps/getopt1.Tpo .deps/getopt1.Po
gcc -DHAVE_CONFIG_H  -I. -I..  -I. -I.. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT vfprintf.o -MD -MP -MF .deps/vfprintf.Tpo -c -o vfprintf.o vfprintf.c
mv -f .deps/vfprintf.Tpo .deps/vfprintf.Po
gcc -DHAVE_CONFIG_H  -I. -I..  -I. -I.. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT number.o -MD -MP -MF .deps/number.Tpo -c -o number.o number.c
mv -f .deps/number.Tpo .deps/number.Po
rm -f libbc.a
ar cru libbc.a getopt.o getopt1.o vfprintf.o number.o 
ranlib libbc.a
make[2]: Leaving directory '/sources/bc-1.07.1/lib'
Making all in bc
make[2]: Entering directory '/sources/bc-1.07.1/bc'
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT bc.o -MD -MP -MF .deps/bc.Tpo -c -o bc.o bc.c
mv -f .deps/bc.Tpo .deps/bc.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT scan.o -MD -MP -MF .deps/scan.Tpo -c -o scan.o scan.c
mv -f .deps/scan.Tpo .deps/scan.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT execute.o -MD -MP -MF .deps/execute.Tpo -c -o execute.o execute.c
mv -f .deps/execute.Tpo .deps/execute.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT load.o -MD -MP -MF .deps/load.Tpo -c -o load.o load.c
mv -f .deps/load.Tpo .deps/load.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT storage.o -MD -MP -MF .deps/storage.Tpo -c -o storage.o storage.c
mv -f .deps/storage.Tpo .deps/storage.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT warranty.o -MD -MP -MF .deps/warranty.Tpo -c -o warranty.o warranty.c
mv -f .deps/warranty.Tpo .deps/warranty.Po
echo '{0}' > libmath.h
make global.o
make[3]: Entering directory '/sources/bc-1.07.1/bc'
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT global.o -MD -MP -MF .deps/global.Tpo -c -o global.o global.c
mv -f .deps/global.Tpo .deps/global.Po
make[3]: Leaving directory '/sources/bc-1.07.1/bc'
gcc -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char   -o libmath.h -o fbc main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o global.o ../lib/libbc.a  -lreadline  
./fbc -c ./libmath.b </dev/null >libmath.h
./fix-libmath_h
sed: -e expression #1, char 2: unknown command: `
'
./fix-libmath_h: line 6: s/$/",/: No such file or directory
./fix-libmath_h: line 8: $ d: command not found
./fix-libmath_h: line 10: -i: command not found
rm -f ./fbc ./global.o
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT global.o -MD -MP -MF .deps/global.Tpo -c -o global.o global.c
In file included from global.c:37:0:
libmath.h:1:1: error: stray '@' in program
 @iK20:s2:p@r
 ^
libmath.h:1:2: error: 'iK20' undeclared here (not in a function)
 @iK20:s2:p@r
  ^~~~
libmath.h:1:6: error: expected ',' or ';' before ':' token
 @iK20:s2:p@r
      ^
libmath.h:1:11: error: stray '@' in program
 @iK20:s2:p@r
           ^
libmath.h:2:1: error: stray '@' in program
 @iF1,5.6,7,8,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C1,0:
 ^
libmath.h:2:40: error: stray '#' in program
 @iF1,5.6,7,8,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C1,0:
                                        ^
libmath.h:3:29: error: invalid suffix "s12" on integer constant
 s14:pl7:s0:pl14:RN1:l5:0<Z2:1s12:pl5:ns5:pN2:l2:s15:pK6:l15:+
                             ^~~~
libmath.h:5:54: error: invalid suffix "B7" on integer constant
 1+s2:pJ3:N4:l13:s2:p1l5:+s14:pl5:s6:p1s8:pK2:s11:pN6:1B7:J5:N8:
                                                      ^~~
libmath.h:7:55: error: invalid suffix "l14" on integer constant
 l10:d10:Z12:l14:l14:*s14:pJ11:N12:N10:l15:s2:pl12:Z13:1l14:/R
                                                       ^~~~
libmath.h:8:37: error: stray '@' in program
 N13:l14:1/RN9:l14:l9:+s14:pJ8:N5:0R]@r
                                     ^
libmath.h:9:1: error: stray '@' in program
 @iF2,5.7,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C2,0:
 ^
libmath.h:9:36: error: stray '#' in program
 @iF2,5.7,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C2,0:
                                    ^
libmath.h:10:29: error: invalid suffix "K10" on integer constant
 s14:pl7:s0:pl14:RN1:l5:0{Z2:1K10:l2:^-1/RN2:l2:s15:pK6:l2:+s2:
                             ^~~~
libmath.h:11:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
 pK2:s10:p0s11:pN3:l5:K2:}Z4:l10:K2:*s10:pl5:cRs5:pJ3:N4:N5:l5:
                            ^
libmath.h:13:18: error: invalid suffix "B9" on integer constant
 *s12:pK3:s11:pN8:1B9:J7:N10:l11:K2:+s11:pJ8:N9:l13:l12:*s13:l11:
                  ^~~
libmath.h:15:4: error: stray '@' in program
 0R]@r
    ^
libmath.h:16:1: error: stray '@' in program
 @iF3,5.7,9,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C3,0:
 ^
libmath.h:16:36: error: stray '#' in program
 @iF3,5.7,9,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C3,0:
                                    ^
libmath.h:18:5: error: invalid suffix "s12" on integer constant
 <Z2:1s12:pl5:ns5:pN2:0s2:pl5:l14:/K2:+K4:/s13:pl5:K4:l13:*l14:
     ^~~~
libmath.h:18:22: error: invalid suffix "s2" on integer constant
 <Z2:1s12:pl5:ns5:pN2:0s2:pl5:l14:/K2:+K4:/s13:pl5:K4:l13:*l14:
                      ^~~
libmath.h:20:13: error: invalid suffix "B6" on integer constant
 pK3:s11:pN5:1B6:J4:N7:l11:K2:+s11:pJ5:N6:l9:l16:l11:l11:1-*/*
             ^~~
libmath.h:20:60: error: unterminated comment
 pK3:s11:pN5:1B6:J4:N7:l11:K2:+s11:pJ5:N6:l9:l16:l11:l11:1-*/*
                                                            ^
make[2]: *** [Makefile:393: global.o] Error 1
make[2]: Leaving directory '/sources/bc-1.07.1/bc'
make[1]: *** [Makefile:357: all-recursive] Error 1
make[1]: Leaving directory '/sources/bc-1.07.1'
make: *** [Makefile:297: all] Error 2
(lfs chroot) root:/sources/bc-1.07.1$
What now?

Last edited by maschelsea; 03-29-2018 at 10:55 AM.
 
Old 03-29-2018, 11:05 AM   #4
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
Do I need to go back further in the process? Do I need to (God forbid!) start over from the beginning? Do I even NEED bc at this point (or at all?)
 
Old 03-29-2018, 02:56 PM   #5
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by maschelsea View Post
...
./fix-libmath_h
sed: -e expression #1, char 2: unknown command: `
'
./fix-libmath_h: line 6: s/$/",/: No such file or directory
./fix-libmath_h: line 8: $ d: command not found
./fix-libmath_h: line 10: -i: command not found
rm -f ./fbc ./global.o
...
This seems to be the problem check the bc/fix-libmath_h you created and post it here ( opy and paste please so we get exactly what you've got )
 
Old 03-29-2018, 03:16 PM   #6
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
Code:
(lfs chroot) root:/sources/bc-1.07.1$ cat bc/fix-libmath_h 
#! /bin/bash
sed -e '1
s/^/{"/' \
-e
's/$/",/' \
-e '2,$ s/^/"/' \
-e
'$ d'
\
-i libmath.h
sed -e '$ s/$/0}/' \
-i libmath.h
(lfs chroot) root:/sources/bc-1.07.1$
 
Old 03-29-2018, 03:37 PM   #7
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
I have altered it to this:

Code:
(lfs chroot) root:/sources/bc-1.07.1$ cat bc/fix-libmath_h
#! /bin/bash
sed -e '1 s/^/{"/' \
    -e 's/$/",/' \
    -e '2,$ s/^/"/' \
    -e '$ d' \
    -i libmath.h
sed -e '$ s/$/0}/' \
    -i libmath.h
(lfs chroot) root:/sources/bc-1.07.1$
I don't speak sed. I have always heard that whitespace doesn't matter much in Linux terminal environments. Guess I heard wrong. It still doesn't work though:
Code:
(lfs chroot) root:/sources/bc-1.07.1$ make
make  all-recursive
make[1]: Entering directory '/sources/bc-1.07.1'
Making all in lib
make[2]: Entering directory '/sources/bc-1.07.1/lib'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/sources/bc-1.07.1/lib'
Making all in bc
make[2]: Entering directory '/sources/bc-1.07.1/bc'
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I./../h  -g -O2 -Wall -funsigned-char -g -O2 -Wall -funsigned-char -MT global.o -MD -MP -MF .deps/global.Tpo -c -o global.o global.c
In file included from global.c:37:0:
libmath.h:1:1: error: stray '@' in program
 @iK20:s2:p@r
 ^
libmath.h:1:2: error: 'iK20' undeclared here (not in a function)
 @iK20:s2:p@r
  ^~~~
libmath.h:1:6: error: expected ',' or ';' before ':' token
 @iK20:s2:p@r
      ^
libmath.h:1:11: error: stray '@' in program
 @iK20:s2:p@r
           ^
libmath.h:2:1: error: stray '@' in program
 @iF1,5.6,7,8,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C1,0:
 ^
libmath.h:2:40: error: stray '#' in program
 @iF1,5.6,7,8,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C1,0:
                                        ^
libmath.h:3:29: error: invalid suffix "s12" on integer constant
 s14:pl7:s0:pl14:RN1:l5:0<Z2:1s12:pl5:ns5:pN2:l2:s15:pK6:l15:+
                             ^~~~
libmath.h:5:54: error: invalid suffix "B7" on integer constant
 1+s2:pJ3:N4:l13:s2:p1l5:+s14:pl5:s6:p1s8:pK2:s11:pN6:1B7:J5:N8:
                                                      ^~~
libmath.h:7:55: error: invalid suffix "l14" on integer constant
 l10:d10:Z12:l14:l14:*s14:pJ11:N12:N10:l15:s2:pl12:Z13:1l14:/R
                                                       ^~~~
libmath.h:8:37: error: stray '@' in program
 N13:l14:1/RN9:l14:l9:+s14:pJ8:N5:0R]@r
                                     ^
libmath.h:9:1: error: stray '@' in program
 @iF2,5.7,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C2,0:
 ^
libmath.h:9:36: error: stray '#' in program
 @iF2,5.7,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C2,0:
                                    ^
libmath.h:10:29: error: invalid suffix "K10" on integer constant
 s14:pl7:s0:pl14:RN1:l5:0{Z2:1K10:l2:^-1/RN2:l2:s15:pK6:l2:+s2:
                             ^~~~
libmath.h:11:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
 pK2:s10:p0s11:pN3:l5:K2:}Z4:l10:K2:*s10:pl5:cRs5:pJ3:N4:N5:l5:
                            ^
libmath.h:13:18: error: invalid suffix "B9" on integer constant
 *s12:pK3:s11:pN8:1B9:J7:N10:l11:K2:+s11:pJ8:N9:l13:l12:*s13:l11:
                  ^~~
libmath.h:15:4: error: stray '@' in program
 0R]@r
    ^
libmath.h:16:1: error: stray '@' in program
 @iF3,5.7,9,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C3,0:
 ^
libmath.h:16:36: error: stray '#' in program
 @iF3,5.7,9,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C3,0:
                                    ^
libmath.h:18:5: error: invalid suffix "s12" on integer constant
 <Z2:1s12:pl5:ns5:pN2:0s2:pl5:l14:/K2:+K4:/s13:pl5:K4:l13:*l14:
     ^~~~
libmath.h:18:22: error: invalid suffix "s2" on integer constant
 <Z2:1s12:pl5:ns5:pN2:0s2:pl5:l14:/K2:+K4:/s13:pl5:K4:l13:*l14:
                      ^~~
libmath.h:20:13: error: invalid suffix "B6" on integer constant
 pK3:s11:pN5:1B6:J4:N7:l11:K2:+s11:pJ5:N6:l9:l16:l11:l11:1-*/*
             ^~~
libmath.h:20:60: error: unterminated comment
 pK3:s11:pN5:1B6:J4:N7:l11:K2:+s11:pJ5:N6:l9:l16:l11:l11:1-*/*
                                                            ^
make[2]: *** [Makefile:393: global.o] Error 1
make[2]: Leaving directory '/sources/bc-1.07.1/bc'
make[1]: *** [Makefile:357: all-recursive] Error 1
make[1]: Leaving directory '/sources/bc-1.07.1'
make: *** [Makefile:297: all] Error 2
(lfs chroot) root:/sources/bc-1.07.1$ cat bc/fix-libmath_h
#! /bin/bash
sed -e '1 s/^/{"/' \
    -e 's/$/",/' \
    -e '2,$ s/^/"/' \
    -e '$ d' \
    -i libmath.h
sed -e '$ s/$/0}/' \
    -i libmath.h
(lfs chroot) root:/sources/bc-1.07.1$
 
Old 03-30-2018, 08:09 AM   #8
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
well i can't duplicate this problem, so i'm guessing you mucked something up earlier on, post your version.sh o/p, though it's probably OK as you are using slackware, if you saved your tool chain at the end of chap 5, just go back to there, delete everything you've done in chap 6, make sure you do the essential checks ( glibc etc).
check every stage before you carry on to the next. let us know what happens
 
Old 03-30-2018, 08:20 AM   #9
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
UPDATE:
This:
Quote:
Originally Posted by maschelsea View Post
Code:
(lfs chroot) root:/sources/bc-1.07.1$ cat bc/fix-libmath_h 
#! /bin/bash
sed -e '1
s/^/{"/' \
-e
's/$/",/' \
-e '2,$ s/^/"/' \
-e
'$ d'
\
-i libmath.h
sed -e '$ s/$/0}/' \
-i libmath.h
(lfs chroot) root:/sources/bc-1.07.1$
Causes the error, even after correcting the fix-libmath_h file you will get the error you need to do
Code:
make distclean
replace the file with the correct one
Code:
#! /bin/bash
sed -e '1   s/^/{"/' \
-e     's/$/",/' \
-e '2,$ s/^/"/'  \
-e   '$ d'       \
-i libmath.h

sed -e '$ s/$/0}/' \
-i libmath.h
then redo configure/make
Code:
./configure --prefix=/usr --with-readline --mandir=/usr/share/man --infodir=/usr/share/info
make
Repeat after me - "The BOOK is ALWAYS right, I will NOT stray from the BOOK"
 
Old 03-30-2018, 10:24 AM   #10
maschelsea
Member
 
Registered: Dec 2016
Distribution: Slackware 64bit 14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
I didn't know that I'd have to issue a make distclean. Doing that fixed the problem I have having. I am now finished with 6.15. Thank you for all your help!
 
  


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
Are these error harmful? -.sd1 Soft Errors: 0 Hard Errors: 6 Transport Errors: 0 manalisharmabe Solaris / OpenSolaris 2 10-04-2013 11:55 AM
repeatable disk read/write errors with no errors logged by kernel or SMART mxl2 Linux - Hardware 9 04-02-2011 09:27 AM
Errors, Errors, and more Errors (KDE 3.4.x GUI Errors) Dralnu Linux - Software 2 05-13-2006 08:30 AM
SB Live! Value 24 capture duplex funkiness hcgernhardt Linux - Hardware 0 05-26-2005 07:09 AM
Gnome Term funkiness zhenwu Linux - General 2 11-29-2001 05:35 PM

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

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