public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Building gcc6.3.0 on Ubuntu-20.04
@ 2020-08-17 12:05 Mohana
  2020-08-18  8:27 ` Stefan Ring
  0 siblings, 1 reply; 10+ messages in thread
From: Mohana @ 2020-08-17 12:05 UTC (permalink / raw)
  To: gcc-help

Hello,

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

the output is as follows, a lot of no's but I don't think if that's the
issue.

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... no
checking for mawk... mawk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for libmpx support... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16
$$f1 $$f2
checking for objdir... .libs
configure: WARNING: using in-tree isl, disabling version check
 'c++' language required by 'go' in stage 1; enabling
*** This configuration is not supported in the following subdirectories:
     gnattools target-libada target-zlib target-libjava target-libobjc
target-liboffloadmic target-boehm-gc
    (Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
checking for bison... no
checking for byacc... no
checking for yacc... no
checking for bison... no
checking for gm4... no
checking for gnum4... no
checking for m4... no
checking for flex... no
checking for lex... no
checking for flex... no
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for readelf... readelf
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... no
checking for gccgo... no
checking for ar... no
checking for ar... ar
checking for as... no
checking for as... as
checking for dlltool... no
checking for dlltool... no
checking for ld... no
checking for ld... ld
checking for lipo... no
checking for lipo... no
checking for nm... no
checking for nm... nm
checking for objcopy... no
checking for objcopy... objcopy
checking for objdump... no
checking for objdump... objdump
checking for ranlib... no
checking for ranlib... ranlib
checking for readelf... no
checking for readelf... readelf
checking for strip... no
checking for strip... strip
checking for windres... no
checking for windres... no
checking for windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... just compiled
checking where to find the target gccgo... just compiled
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objcopy... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
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/mohana/GCC-6.3.0/x86_64-pc-linux-gnu/include -isystem
/home/mohana/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/mohana/gccbuild/../gcc-6.3.0/libgcc
-I/home/mohana/gccbuild/../gcc-6.3.0/libgcc/.
-I/home/mohana/gccbuild/../gcc-6.3.0/libgcc/../gcc
-I/home/mohana/gccbuild/../gcc-6.3.0/libgcc/../include
-I/home/mohana/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/mohana/gccbuild/../gcc-6.3.0/libgcc/libgcc2.c -fvisibility=hidden
-DHIDE_EXPORTS

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

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

make[4]: Leaving directory
'/home/mohana/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/mohana/gccbuild/x86_64-pc-linux-gnu/libgcc'

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

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

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

Any leads will be highly appreciated!

Thank you,
Mohana

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Building gcc6.3.0 on Ubuntu-20.04
  2020-08-17 12:05 Building gcc6.3.0 on Ubuntu-20.04 Mohana
@ 2020-08-18  8:27 ` Stefan Ring
  2020-08-18  9:01   ` Jonathan Wakely
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Ring @ 2020-08-18  8:27 UTC (permalink / raw)
  To: Mohana; +Cc: gcc-help

On Mon, Aug 17, 2020 at 2:08 PM Mohana <s18002@students.iitmandi.ac.in> wrote:
>
> Hello,
>
> make[5]: Leaving directory
> '/home/mohana/gccbuild/x86_64-pc-linux-gnu/32/libgcc'
>
> make[4]: *** [Makefile:1161: multi-do] Error 1
>
> make[4]: Leaving directory
> '/home/mohana/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/mohana/gccbuild/x86_64-pc-linux-gnu/libgcc'
>
> make[2]: *** [Makefile:20436: all-stage1-target-libgcc] Error 2
>
> make[2]: Leaving directory '/home/mohana/gccbuild'
>
> make[1]: *** [Makefile:25715: stage1-bubble] Error 2
>
> Any leads will be highly appreciated!

You should show the actual error, which seems to be this:

make[5]: Entering directory '/home/build/gcbuild/x86_64-pc-linux-gnu/32/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
/home/build/gcbuild/./gcc/xgcc -B/home/build/gcbuild/./gcc/
-B/home/build/gcc6/x86_64-pc-linux-gnu/bin/
-B/home/build/gcc6/x86_64-pc-linux-gnu/lib/ -isystem
/home/build/gcc6/x86_64-pc-linux-gnu/include -isystem
/home/build/gcc6/x86_64-pc-linux-gnu/sys-include    -g -O2 -m32 -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../../../../gcc-6.3.0/libgcc
-I../../../../gcc-6.3.0/libgcc/. -I../../../../gcc-6.3.0/libgcc/../gcc
-I../../../../gcc-6.3.0/libgcc/../include
-I../../../../gcc-6.3.0/libgcc/config/libbid
-DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o unwind-dw2.o
-MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c
../../../../gcc-6.3.0/libgcc/unwind-dw2.c -fvisibility=hidden
-DHIDE_EXPORTS
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;
                  ^~
make[5]: *** [../../../../gcc-6.3.0/libgcc/shared-object.mk:14:
unwind-dw2.o] Error 1
make[5]: Leaving directory '/home/build/gcbuild/x86_64-pc-linux-gnu/32/libgcc'
make[4]: *** [Makefile:1161: multi-do] Error 1
make[4]: Leaving directory '/home/build/gcbuild/x86_64-pc-linux-gnu/libgcc'
make[3]: *** [Makefile:120: all-multi] Error 2
make[3]: Leaving directory '/home/build/gcbuild/x86_64-pc-linux-gnu/libgcc'
make[2]: *** [Makefile:20436: all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/home/build/gcbuild'
make[1]: *** [Makefile:25715: stage1-bubble] Error 2
make[1]: Leaving directory '/home/build/gcbuild'
make: *** [Makefile:922: all] Error 2

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Building gcc6.3.0 on Ubuntu-20.04
  2020-08-18  8:27 ` Stefan Ring
@ 2020-08-18  9:01   ` Jonathan Wakely
  2020-08-18 11:05     ` Mohana
  0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Wakely @ 2020-08-18  9:01 UTC (permalink / raw)
  To: Stefan Ring; +Cc: Mohana, gcc-help

On Tue, 18 Aug 2020 at 09:29, Stefan Ring via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> On Mon, Aug 17, 2020 at 2:08 PM Mohana <s18002@students.iitmandi.ac.in> wrote:
> >
> > Hello,
> >
> > make[5]: Leaving directory
> > '/home/mohana/gccbuild/x86_64-pc-linux-gnu/32/libgcc'
> >
> > make[4]: *** [Makefile:1161: multi-do] Error 1
> >
> > make[4]: Leaving directory
> > '/home/mohana/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/mohana/gccbuild/x86_64-pc-linux-gnu/libgcc'
> >
> > make[2]: *** [Makefile:20436: all-stage1-target-libgcc] Error 2
> >
> > make[2]: Leaving directory '/home/mohana/gccbuild'
> >
> > make[1]: *** [Makefile:25715: stage1-bubble] Error 2
> >
> > Any leads will be highly appreciated!
>
> You should show the actual error, which seems to be this:
>
> make[5]: Entering directory '/home/build/gcbuild/x86_64-pc-linux-gnu/32/libgcc'
> # If this is the top-level multilib, build all the other
> # multilibs.
> /home/build/gcbuild/./gcc/xgcc -B/home/build/gcbuild/./gcc/
> -B/home/build/gcc6/x86_64-pc-linux-gnu/bin/
> -B/home/build/gcc6/x86_64-pc-linux-gnu/lib/ -isystem
> /home/build/gcc6/x86_64-pc-linux-gnu/include -isystem
> /home/build/gcc6/x86_64-pc-linux-gnu/sys-include    -g -O2 -m32 -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../../../../gcc-6.3.0/libgcc
> -I../../../../gcc-6.3.0/libgcc/. -I../../../../gcc-6.3.0/libgcc/../gcc
> -I../../../../gcc-6.3.0/libgcc/../include
> -I../../../../gcc-6.3.0/libgcc/config/libbid
> -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS  -DUSE_TLS -o unwind-dw2.o
> -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c
> ../../../../gcc-6.3.0/libgcc/unwind-dw2.c -fvisibility=hidden
> -DHIDE_EXPORTS
> 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;
>                   ^~
> make[5]: *** [../../../../gcc-6.3.0/libgcc/shared-object.mk:14:

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Building gcc6.3.0 on Ubuntu-20.04
  2020-08-18  9:01   ` Jonathan Wakely
@ 2020-08-18 11:05     ` Mohana
  2020-08-18 13:15       ` Jonathan Wakely
  0 siblings, 1 reply; 10+ messages in thread
From: Mohana @ 2020-08-18 11:05 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Stefan Ring, gcc-help

I made the changes and this error doesn't occur anymore, but the following
happens now:

/home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:158:23:
fatal error: sys/ustat.h: No such file or directory
 #include <sys/ustat.h>
                       ^
compilation terminated.
make[4]: *** [Makefile:477: sanitizer_platform_limits_posix.lo] Error 1
make[4]: *** Waiting for unfinished jobs....

It seems ustat is deprecated. How can this be fixed?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Building gcc6.3.0 on Ubuntu-20.04
  2020-08-18 11:05     ` Mohana
@ 2020-08-18 13:15       ` Jonathan Wakely
  2020-08-18 15:31         ` Mohana
  0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Wakely @ 2020-08-18 13:15 UTC (permalink / raw)
  To: Mohana; +Cc: Stefan Ring, gcc-help

On Tue, 18 Aug 2020 at 12:07, Mohana <s18002@students.iitmandi.ac.in> wrote:
>
> I made the changes and this error doesn't occur anymore, but the following happens now:
>
> /home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:158:23: fatal error: sys/ustat.h: No such file or directory
>  #include <sys/ustat.h>
>                        ^
> compilation terminated.
> make[4]: *** [Makefile:477: sanitizer_platform_limits_posix.lo] Error 1
> make[4]: *** Waiting for unfinished jobs....
>
> It seems ustat is deprecated. How can this be fixed?

Why are you building gcc 6.3.0 and not 6.5.0, which already has the
fix for both these problems?

The patch for this error was
https://gcc.gnu.org/g:2cd244789bc75ecdf65824f831986969049a1647
specifically https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc;h=98825b584d24912df76f9982c2319419c7815bf8;hp=6992f2cd8ac56bcd5102f7440d71137b4458871d;hb=2cd244789bc75ecdf65824f831986969049a1647;hpb=6376168efb4c45d621fbec6472f8c9e84a24e940

But you should just use gcc-6.5.0 instead.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Building gcc6.3.0 on Ubuntu-20.04
  2020-08-18 13:15       ` Jonathan Wakely
@ 2020-08-18 15:31         ` Mohana
  2020-08-18 15:58           ` Jonathan Wakely
  2020-08-18 16:19           ` Dan Kegel
  0 siblings, 2 replies; 10+ messages in thread
From: Mohana @ 2020-08-18 15:31 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Stefan Ring, gcc-help

MATLAB can only work with GCC6.3.0 (
https://in.mathworks.com/matlabcentral/answers/407502-incompatible-gcc-version-with-mex),
so I hope to get this working, if possible. I applied the changes to file
sanitizer_platform_limits_posix.cc as per the patch, and now the error is:

In file included from
/home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:192:0:
/home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:254:72:
error: size of array ‘assertion_failed__1142’ is negative
     typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
                                                                        ^
/home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:248:30:
note: in expansion of macro ‘IMPL_COMPILER_ASSERT’
 #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
                              ^~~~~~~~~~~~~~~~~~~~
/home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1410:3:
note: in expansion of macro ‘COMPILER_CHECK’
   COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \
   ^~~~~~~~~~~~~~
/home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1142:1:
note: in expansion of macro ‘CHECK_SIZE_AND_OFFSET’
 CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
 ^~~~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:477: sanitizer_platform_limits_posix.lo] Error 1
make[4]: Leaving directory
'/home/mohana/gccbuild/x86_64-pc-linux-gnu/libsanitizer/sanitizer_common'
libtool: link: (cd ".libs" && rm -f "libatomic.so" && ln -s
"libatomic.so.1.2.0" "libatomic.so")
make[3]: *** [Makefile:466: all-recursive] Error 1

I hope I applied the patch correctly, just removed the lines with (-) and
added ones with (+).

On Tue, Aug 18, 2020 at 6:45 PM Jonathan Wakely <jwakely.gcc@gmail.com>
wrote:

> On Tue, 18 Aug 2020 at 12:07, Mohana <s18002@students.iitmandi.ac.in>
> wrote:
> >
> > I made the changes and this error doesn't occur anymore, but the
> following happens now:
> >
> >
> /home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:158:23:
> fatal error: sys/ustat.h: No such file or directory
> >  #include <sys/ustat.h>
> >                        ^
> > compilation terminated.
> > make[4]: *** [Makefile:477: sanitizer_platform_limits_posix.lo] Error 1
> > make[4]: *** Waiting for unfinished jobs....
> >
> > It seems ustat is deprecated. How can this be fixed?
>
> Why are you building gcc 6.3.0 and not 6.5.0, which already has the
> fix for both these problems?
>
> The patch for this error was
> https://gcc.gnu.org/g:2cd244789bc75ecdf65824f831986969049a1647
> specifically
> https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc;h=98825b584d24912df76f9982c2319419c7815bf8;hp=6992f2cd8ac56bcd5102f7440d71137b4458871d;hb=2cd244789bc75ecdf65824f831986969049a1647;hpb=6376168efb4c45d621fbec6472f8c9e84a24e940
>
> But you should just use gcc-6.5.0 instead.
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Building gcc6.3.0 on Ubuntu-20.04
  2020-08-18 15:31         ` Mohana
@ 2020-08-18 15:58           ` Jonathan Wakely
  2020-08-18 16:19           ` Dan Kegel
  1 sibling, 0 replies; 10+ messages in thread
From: Jonathan Wakely @ 2020-08-18 15:58 UTC (permalink / raw)
  To: Mohana; +Cc: Stefan Ring, gcc-help

On Tue, 18 Aug 2020 at 16:33, Mohana <s18002@students.iitmandi.ac.in> wrote:
>
> MATLAB can only work with GCC6.3.0 (https://in.mathworks.com/matlabcentral/answers/407502-incompatible-gcc-version-with-mex),

That's idiotic. Have you considered using GNU Octave instead of MATLAB?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Building gcc6.3.0 on Ubuntu-20.04
  2020-08-18 15:31         ` Mohana
  2020-08-18 15:58           ` Jonathan Wakely
@ 2020-08-18 16:19           ` Dan Kegel
  2020-08-19  4:35             ` Mohana
  1 sibling, 1 reply; 10+ messages in thread
From: Dan Kegel @ 2020-08-18 16:19 UTC (permalink / raw)
  To: Mohana; +Cc: Jonathan Wakely, gcc-help

Adding --disable-libsanitizer to the configure command might work past that
problem.

Also, if you're not using golang, you might save some time by removing the
,go
from the list of supported languages.


On Tue, Aug 18, 2020 at 8:33 AM Mohana <s18002@students.iitmandi.ac.in>
wrote:

> MATLAB can only work with GCC6.3.0 (
>
> https://in.mathworks.com/matlabcentral/answers/407502-incompatible-gcc-version-with-mex
> ),
> so I hope to get this working, if possible. I applied the changes to file
> sanitizer_platform_limits_posix.cc as per the patch, and now the error is:
>
> In file included from
>
> /home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:192:0:
>
> /home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:254:72:
> error: size of array ‘assertion_failed__1142’ is negative
>      typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
>                                                                         ^
>
> /home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:248:30:
> note: in expansion of macro ‘IMPL_COMPILER_ASSERT’
>  #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
>                               ^~~~~~~~~~~~~~~~~~~~
>
> /home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1410:3:
> note: in expansion of macro ‘COMPILER_CHECK’
>    COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \
>    ^~~~~~~~~~~~~~
>
> /home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1142:1:
> note: in expansion of macro ‘CHECK_SIZE_AND_OFFSET’
>  CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
>  ^~~~~~~~~~~~~~~~~~~~~
> make[4]: *** [Makefile:477: sanitizer_platform_limits_posix.lo] Error 1
> make[4]: Leaving directory
> '/home/mohana/gccbuild/x86_64-pc-linux-gnu/libsanitizer/sanitizer_common'
> libtool: link: (cd ".libs" && rm -f "libatomic.so" && ln -s
> "libatomic.so.1.2.0" "libatomic.so")
> make[3]: *** [Makefile:466: all-recursive] Error 1
>
> I hope I applied the patch correctly, just removed the lines with (-) and
> added ones with (+).
>
> On Tue, Aug 18, 2020 at 6:45 PM Jonathan Wakely <jwakely.gcc@gmail.com>
> wrote:
>
> > On Tue, 18 Aug 2020 at 12:07, Mohana <s18002@students.iitmandi.ac.in>
> > wrote:
> > >
> > > I made the changes and this error doesn't occur anymore, but the
> > following happens now:
> > >
> > >
> >
> /home/mohana/gccbuild/../gcc-6.3.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:158:23:
> > fatal error: sys/ustat.h: No such file or directory
> > >  #include <sys/ustat.h>
> > >                        ^
> > > compilation terminated.
> > > make[4]: *** [Makefile:477: sanitizer_platform_limits_posix.lo] Error 1
> > > make[4]: *** Waiting for unfinished jobs....
> > >
> > > It seems ustat is deprecated. How can this be fixed?
> >
> > Why are you building gcc 6.3.0 and not 6.5.0, which already has the
> > fix for both these problems?
> >
> > The patch for this error was
> > https://gcc.gnu.org/g:2cd244789bc75ecdf65824f831986969049a1647
> > specifically
> >
> https://gcc.gnu.org/git/?p=gcc.git;a=blobdiff;f=libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc;h=98825b584d24912df76f9982c2319419c7815bf8;hp=6992f2cd8ac56bcd5102f7440d71137b4458871d;hb=2cd244789bc75ecdf65824f831986969049a1647;hpb=6376168efb4c45d621fbec6472f8c9e84a24e940
> >
> > But you should just use gcc-6.5.0 instead.
> >
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Building gcc6.3.0 on Ubuntu-20.04
  2020-08-18 16:19           ` Dan Kegel
@ 2020-08-19  4:35             ` Mohana
  2020-08-19  6:37               ` Jonathan Wakely
  0 siblings, 1 reply; 10+ messages in thread
From: Mohana @ 2020-08-19  4:35 UTC (permalink / raw)
  To: Dan Kegel; +Cc: Jonathan Wakely, gcc-help, Stefan Ring

On Tue, Aug 18, 2020 at 9:49 PM Dan Kegel <dank@kegel.com> wrote:

> Adding --disable-libsanitizer to the configure command might work past
> that problem.
>
> Also, if you're not using golang, you might save some time by removing the
> ,go
> from the list of supported languages.
>

Thanks! Seems to have worked, I hope. :D

On Tue, Aug 18, 2020 at 9:28 PM Jonathan Wakely <jwakely.gcc@gmail.com>
wrote:

> On Tue, 18 Aug 2020 at 16:33, Mohana <s18002@students.iitmandi.ac.in>
> wrote:
> >
> > MATLAB can only work with GCC6.3.0 (
> https://in.mathworks.com/matlabcentral/answers/407502-incompatible-gcc-version-with-mex
> ),
>
> That's idiotic. Have you considered using GNU Octave instead of MATLAB?


Actually I just need to run somebody else's code, so.  Thanks a lot for
helping through this though! :)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Building gcc6.3.0 on Ubuntu-20.04
  2020-08-19  4:35             ` Mohana
@ 2020-08-19  6:37               ` Jonathan Wakely
  0 siblings, 0 replies; 10+ messages in thread
From: Jonathan Wakely @ 2020-08-19  6:37 UTC (permalink / raw)
  To: Mohana; +Cc: Dan Kegel, gcc-help, Stefan Ring

On Wed, 19 Aug 2020 at 05:37, Mohana wrote:
> On Tue, Aug 18, 2020 at 9:28 PM Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>>
>> On Tue, 18 Aug 2020 at 16:33, Mohana <s18002@students.iitmandi.ac.in> wrote:
>> >
>> > MATLAB can only work with GCC6.3.0 (https://in.mathworks.com/matlabcentral/answers/407502-incompatible-gcc-version-with-mex),
>>
>> That's idiotic. Have you considered using GNU Octave instead of MATLAB?
>
>
> Actually I just need to run somebody else's code, so.  Thanks a lot for helping through this though! :)

Hopefully MATLAB will remove their idiotic restriction some day, so
you can use supported versions of GCC.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-08-19  6:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17 12:05 Building gcc6.3.0 on Ubuntu-20.04 Mohana
2020-08-18  8:27 ` Stefan Ring
2020-08-18  9:01   ` Jonathan Wakely
2020-08-18 11:05     ` Mohana
2020-08-18 13:15       ` Jonathan Wakely
2020-08-18 15:31         ` Mohana
2020-08-18 15:58           ` Jonathan Wakely
2020-08-18 16:19           ` Dan Kegel
2020-08-19  4:35             ` Mohana
2020-08-19  6:37               ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).