0

I am trying to build GCC6.3.0 on Ubuntu20.04 and can't seem to understand/fix the errors.

I downloaded the tar file(tried from multiple mirrors, always same error), untarred it, within this untarred directory ran

./contrib/download_prerequisites

it downloads and creates the required shortcuts. Then I get out of this directory, create a new directory "gccbuild",within this directory, I run

$PWD/../gcc-6.3.0/configure --prefix=$HOME/GCC-6.3.0 --enable-languages=c,c++,fortran,go

I can add the full output if required, a lot of no's but I don't think if that's the issue. Last lines of output:

checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile

Then, I run make, and the following are few last lines of the output:

 /home/m/GCC-6.3.0/x86_64-pc-linux-gnu/include -isystem /home/m/GCC-6.3.0/x86_64-pc-linux-gnu/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -DUSE_ELF_SYMVER -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -DUSE_ELF_SYMVER -I. -I. -I../.././gcc -I/home/m/gccbuild/../gcc-6.3.0/libgcc -I/home/m/gccbuild/../gcc-6.3.0/libgcc/. -I/home/m/gccbuild/../gcc-6.3.0/libgcc/../gcc -I/home/m/gccbuild/../gcc-6.3.0/libgcc/../include -I/home/m/gccbuild/../gcc-6.3.0/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _fixunssfsi.o -MT _fixunssfsi.o -MD -MP -MF _fixunssfsi.dep -DL_fixunssfsi -c /home/m/gccbuild/../gcc-6.3.0/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS

make[5]: Leaving directory '/home/m/gccbuild/x86_64-pc-linux-gnu/32/libgcc'

make[4]: *** [Makefile:1161: multi-do] Error 1

make[4]: Leaving directory '/home/m/gccbuild/x86_64-pc-linux-gnu/libgcc'

make[3]: *** [Makefile:120: all-multi] Error 2

make[3]: *** Waiting for unfinished jobs....

make[3]: Leaving directory '/home/m/gccbuild/x86_64-pc-linux-gnu/libgcc'

make[2]: *** [Makefile:20436: all-stage1-target-libgcc] Error 2

make[2]: Leaving directory '/home/m/gccbuild'

make[1]: *** [Makefile:25715: stage1-bubble] Error 2

Any leads will be highly appreciated!

EDIT

I missed out on the actual error part (thanks to Stefan Ring at the gcc-help mailing list):

In file included from ../../../../gcc-6.3.0/libgcc/unwind-dw2.c:401:0:
./md-unwind-support.h: In function 'x86_fallback_frame_state':
./md-unwind-support.h:141:18: error: field 'uc' has incomplete type
  struct ucontext uc;
              ^~

1 Answer 1

0

According to Jonathan Wakely via the gcc-help mailing list,

"This GCC code was actually not following the relevant standards and was broken by a change in glibc when glibc got stricter.

You can fix it by replacing "struct ucontext" with "ucontext_t" in the relevant files."

So as noted in this stackoverflow answer I fixed it by replacing ucontext with ucontext_t in lines 61 and 141 of the file builddir/libgcc/config/i386/linux_unwind.h.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .