Hey guys i tried building gcc with Linux from Scratch 10.2.0.
I followed the instructions exactly, but the make
command throws following Error:
checking whether gcc understands -c and -o together... Global symbol "$lineWnr" requires explicit package name (did you forget to declare "my $lineWnr"?) at /usr/share/texinfo/Texinfo/ParserNonXS.pm line 5205.
Compilation failed in require at /usr/bin/makeinfo line 997.
make[2]: *** [Makefile:3318: doc/gccinstall.info] Error 255
make[2]: *** Waiting for unfinished jobs....
Global symbol "$lineWnr" requires explicit package name (did you forget to declare "my $lineWnr"?) at /usr/share/texinfo/Texinfo/ParserNonXS.pm line 5205.
Compilation failed in require at /usr/bin/makeinfo line 997.
make[2]: *** [Makefile:3311: doc/cpp.info] Error 255
yes
checking how to run the C preprocessor... Global symbol "$lineWnr" requires explicit package name (did you forget to declare "my $lineWnr"?) at /usr/share/texinfo/Texinfo/ParserNonXS.pm line 5205.
Compilation failed in require at /usr/bin/makeinfo line 997.
make[2]: *** [Makefile:3311: doc/gcc.info] Error 255
Global symbol "$lineWnr" requires explicit package name (did you forget to declare "my $lineWnr"?) at /usr/share/texinfo/Texinfo/ParserNonXS.pm line 5205.
Compilation failed in require at /usr/bin/makeinfo line 997.
gcc -E
make[2]: *** [Makefile:3311: doc/cppinternals.info] Error 255
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/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... /bin/sh ../../gcc/../move-if-change tmp-optionlist optionlist
echo timestamp > s-options
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 a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... ld
checking if the linker (ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... nm
checking the name lister (nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for ld option to reload object files... -r
checking for x86_64-pc-linux-gnu-objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for x86_64-pc-linux-gnu-ar... ar
checking for x86_64-pc-linux-gnu-strip... no
checking for strip... strip
checking for x86_64-pc-linux-gnu-ranlib... ranlib
checking command to parse nm output from gcc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... ld -m elf_x86_64
checking if the linker (ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether basename is declared... yes
checking whether gcc supports -W... rm gcc.pod
make[2]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build/gcc'
make[1]: *** [Makefile:4382: all-gcc] Error 2
make[1]: *** Waiting for unfinished jobs....
yes
checking whether gcc supports -Wall... yes
checking for socket libraries... checking for connect... yes
checking for gethostbyname... yes
checking for exported symbols... yes
checking for -rdynamic... yes
checking for library containing dlopen... -ldl
checking for -fPIC -shared... yes
checking for socketpair... yes
checking for select... yes
checking for fork... yes
configure: updating cache ./config.cache
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating cc1plugin-config.h
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Leaving directory '/mnt/lfs/sources/gcc-10.2.0/build'
make: *** [Makefile:945: all] Error 2
Maybe somebody can help me. If you need any aditional information dont hestitate to ask.
It seems like the package you are trying to build (ahem configure) is broken.
That happens sometime because it's almost impossible to check all possible dependencies are building correctly. Bad luck!
So, the compiler is telling you that it can't understand the file /usr/share/texinfo/Texinfo/ParserNonXS.pm
You have two options here:
./configure blablabla --disable-texinfo
)/usr/share/texinfo/Texinfo/ParserNonXS.pm
by manually editting it and adding the missing line my $lineWnr
at line 5205. This is likely a Perl script so a bit of perl knowledge is required here no to break the file.Since you're doing a LFS build, I guess your Texinfo package should match the one expected by your GCC package. Old GCC require an old texinfo package and newer GCC requires a newer texinfo package. If you don't have texinfo, you should install this first.