A warning found during GCC 6.1.0 compilation process (may be a critical error or bug)
Hello GCC developers and GCC mailing list members: This message concerns some warnings noted by GCC during the compilation of GCC 6.1.0. If GCC had the -Werror flag passed, this would be an error. I'm not sure if this is an error, just a warning that I should ignore, or a bug, but I just wanted you to note the following warning: In file included from ../../gcc/rtl.h:34, from ../../gcc/genpreds.c:27: ../../gcc/vec.h: In static member function ‘static size_t vec::embedded_size(unsigned int) [with T = std::pair, A = va_heap]’: ../../gcc/vec.h:286: instantiated from ‘static void va_heap::reserve(vec*&, unsigned int, bool) [with T = std::pair]’ ../../gcc/vec.h:1406: instantiated from ‘bool vec::reserve(unsigned int, bool) [with T = std::pair]’ ../../gcc/vec.h:1515: instantiated from ‘T* vec::safe_push(const T&) [with T = std::pair]’ ../../gcc/genpreds.c:1524: instantiated from here ../../gcc/vec.h:1026: warning: invalid access to non-static data member ‘vec, va_heap, vl_embed>::m_vecdata’ of NULL object ../../gcc/vec.h:1026: warning: (perhaps the ‘offsetof’ macro was used incorrectly) There are many other warnings, and I will post a link to the compilation logs when the compilation finishes. (I've had to redo the compilation more than once because SSH decided to idle timeout and make noted the hangup, ending the compilation process immediately due to there being no TTY to send messages to, even though I'd had them (and still have them) redirected to a file.) -- Signed, Ethin D. Probst
An issue with GCC 6.1.0's make install?
Hello all, Yesterday I managed to successfully build GCC and all of the accompanying languages that it supports by default (Ada, C, C++, Fortran, Go, Java, Objective-C, Objective-C++, and Link-time Optimization (LTO)). I did not build JIT support because I have not herd if it is stable or not. Anyways, seeing as I didn't (and still do not) want to wait another 12 hours for that to build, I compressed it into a .tar.bz2 archive, copied it over to another server, decompressed it, and here's when the problems start. Keep in mind that I did ensure that all files were compressed and extracted. When I go into my build subdirectory build tree, and type "make install -s", it installs gnat, gcc (and g++), gfortran, gccgo, and gcj, but it errors out (and, subsequently, bales out) and says the following: Making install in tools make[3]: *** [install-recursive] Error 1 make[2]: *** [install-recursive] Error 1 make[1]: *** [install-target-libjava] Error 2 make: *** [install] Error 2 And then: $ gcj gcj: error: libgcj.spec: No such file or directory I'm considering the test suite, but until it installs, I'm not sure if executing the test suite would be very wise at this point. To get it to say that no input file was specified, I have to manually run the following commands: $ cd x86_64-pc-linux-gnu/libjava $ cp libgcj.spec /usr/bin Has the transportation of the source code caused the build tree to be messed up? I know that it works perfectly fine on my other server. Running make install without the -s command line parameter yields nothing. Have I done something wrong? -- Signed, Ethin D. Probst
Re: An issue with GCC 6.1.0's make install?
Hi there, I did extract it to the same place I had extracted it beforehand. And no, it gave absolutely no error message at all. I could not use make -j8. I do not have a quad core processor. That's where it placed the libgcj.spec file in the build directory I use. On 6/4/16, Marc Glisse wrote: > On Sat, 4 Jun 2016, Ethin Probst wrote: > >> Yesterday I managed to successfully build GCC and all of the >> accompanying languages that it supports by default (Ada, C, C++, >> Fortran, Go, Java, Objective-C, Objective-C++, and Link-time >> Optimization (LTO)). I did not build JIT support because I have not >> herd if it is stable or not. >> Anyways, seeing as I didn't (and still do not) want to wait another 12 >> hours for that to build, I compressed it into a .tar.bz2 archive, > > Did you use "make -j 8" (where 8 is roughly how many CPUs you have in your > server)? 12 hours seems excessive. > >> copied it over to another server, decompressed it, and here's when the > > Did you copy it to exactly the same path as on the original server, > preserving time stamps, and do both servers have identical systems? > >> problems start. Keep in mind that I did ensure that all files were >> compressed and extracted. >> When I go into my build subdirectory build tree, and type "make >> install -s", it installs gnat, gcc (and g++), gfortran, gccgo, and >> gcj, but it errors out (and, subsequently, bales out) and says the >> following: >> Making install in tools >> make[3]: *** [install-recursive] Error 1 >> make[2]: *** [install-recursive] Error 1 >> make[1]: *** [install-target-libjava] Error 2 >> make: *** [install] Error 2 >> And then: >> $ gcj >> gcj: error: libgcj.spec: No such file or directory > > A more common approach would be to run "make install DESTDIR=/some/where", > tar that directory, copy this archive to other servers, and untar it in > the right location. That's roughly what linux distributions do. > >> I'm considering the test suite, but until it installs, I'm not sure if >> executing the test suite would be very wise at this point. To get it >> to say that no input file was specified, I have to manually run the >> following commands: >> $ cd x86_64-pc-linux-gnu/libjava >> $ cp libgcj.spec /usr/bin > > That seems like a strange location for this file. > >> Has the transportation of the source code caused the build tree to be >> messed up? I know that it works perfectly fine on my other server. >> Running make install without the -s command line parameter yields >> nothing. Have I done something wrong? > > "nothing" is not very helpful... Surely it gave some error message. > > -- > Marc Glisse > -- Signed, Ethin D. Probst
GCC Subversion tree conflicts
While checking out the latest GCC SVN branch (rev. 243,465 as of December 08, 2016), the following conflicts were detected by subversion: [subversion output] Summary of conflicts: Tree conflicts: 34 Tree conflict on 'gcc/INSTALL' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: h (r) - accept current working copy state (p) - resolve the conflict later [postpone] (q) - postpone all remaining conflicts (h) - show this help (also '?') Words in square brackets are the corresponding --accept option arguments. Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/INSTALL' Tree conflict on 'gcc/config' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/config' Tree conflict on 'gcc/contrib' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/contrib' Tree conflict on 'gcc/fixincludes' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/fixincludes' Tree conflict on 'gcc/gcc' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/gcc' Tree conflict on 'gcc/gnattools' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/gnattools' Tree conflict on 'gcc/gotools' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/gotools' Tree conflict on 'gcc/include' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/include' Tree conflict on 'gcc/intl' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/intl' Tree conflict on 'gcc/libada' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libada' Tree conflict on 'gcc/libatomic' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libatomic' Tree conflict on 'gcc/libbacktrace' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libbacktrace' Tree conflict on 'gcc/libcc1' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libcc1' Tree conflict on 'gcc/libcilkrts' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libcilkrts' Tree conflict on 'gcc/libcpp' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libcpp' Tree conflict on 'gcc/libdecnumber' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libdecnumber' Tree conflict on 'gcc/libffi' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libffi' Tree conflict on 'gcc/libgcc' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libgcc' Tree conflict on 'gcc/libgfortran' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libgfortran' Tree conflict on 'gcc/libgo' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libgo' Tree conflict on 'gcc/libgomp' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: r Resolved conflicted state of 'gcc/libgomp' Tree conflict on 'gcc/libiberty' > local dir unversioned, incoming dir add upon update Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h)
Java language not being included as a possible language in --enable-languages argument to configure?
I'm trying to run the GCC configure script with: [configure input] ~/gcc/configure --disable-nls --enable-gold=yes --enable-libquadmath --enable-libquadmath-support --enable-libada --enable-libssp --enable-libcxx --enable-liboffloadmic=target --enable-bootstrap --enable-lto --enable-static-libjava --enable-languages=ada,c,c++,fortran,go,java,jit,objc,obj-c++ --enable-objc-gc --enable-vtable-verify --enable-host-shared --quiet [end configure input] But configure returns: [configure output] configure: WARNING: using in-tree isl, disabling version check configure: error: The following requested languages could not be built: java Supported languages are: c,ada,c,c++,fortran,go,jit,lto,objc,obj-c++ [end configure output] (I don't know why 'c' is in there twice, but it is.) Running configure without --quiet returns: [configure output] 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... /bin/sed checking for gawk... gawk checking for libatomic support... yes checking for libcilkrts support... yes checking for liboffloadmic 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... gnatbind checking for gnatmake... gnatmake checking whether compiler driver understands Ada... yes 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 configure: error: The following requested languages could not be built: java Supported languages are: c,ada,c,c++,fortran,go,jit,lto,objc,obj-c++ [end configure output] Anyone have any ideas? Libjava is in there and everything. Do I need to have gcj installed prior to building gcj like I need GNAT? -- Signed, Ethin D. Probst
Possibly requires fixing (PRF): GNAT 7.0 not printing actual code samples and column markers when printing errors and warnings
At the current moment, GNAT does not print code samples and column indicators like GCC/G++/GCCGO/GFORTRAN does. A sample is below (I'm running as root during this compilation process as I am over SSH and don't like typing sudo all that much sometimes): [compilation output from gcc] /root/gcc/gcc/ada/adaint.c: In function 'void __gnat_killprocesstree(int, int)': /root/gcc/gcc/ada/adaint.c:3405:58: warning: specified bound 64 equals the size of the destination [-Wstringop-overflow=] strncat (statfile, d->d_name, sizeof(statfile)); ^ [end output] Now, take this from GNAT: /root/gcc/gcc/ada/spark_xrefs.adb: In function 'spark_xrefs.pspark': /root/gcc/gcc/ada/put_spark_xrefs.adb:174:25: warning: 'Scope' may be used uninitialized in this function [-Wmaybe-uninitialized] /root/gcc/gcc/ada/put_spark_xrefs.adb:94:10: note: 'Scope' was declared here Instead, GNAT should probably print: /root/gcc/gcc/ada/spark_xrefs.adb: In function 'spark_xrefs.pspark': /root/gcc/gcc/ada/put_spark_xrefs.adb:174:25: warning: 'Scope' may be used uninitialized in this function [-Wmaybe-uninitialized] if R.Scope_Num /= Scope then ^ /root/gcc/gcc/ada/put_spark_xrefs.adb:94:10: note: 'Scope' was declared here It would be even nicer if it printed something like: /root/gcc/gcc/ada/spark_xrefs.adb: In function 'spark_xrefs.pspark': /root/gcc/gcc/ada/put_spark_xrefs.adb:174:25: warning: 'Scope' may be used uninitialized in this function [-Wmaybe-uninitialized] if R.Scope_Num /= Scope then ^ /root/gcc/gcc/ada/put_spark_xrefs.adb:94:10: note: 'Scope' was declared here as: Scope : Nat; ^ What do you guys think? -- Signed, Ethin D. Probst
GCC 5 snapshot
Hello there, Since my email program won't allow me to send emails directly to this address only, I guess I'll have to send them by hand. Is there any way I could help with GCC development? I'd really like to help this compiler progress and anything I can do would be nicely appreciated.
An internal GCC compiler error when compiling GCC 7.x with GCC 6.x and 4.x
Hello all, I was trying to build GCC 7.1.0 on OpenSuse 42.1 when it encountered an internal error. The error is thrown, for lack of a better word, in both 4.x and 6.x. I would have submitted a bug report on the GCC bug tracker except for the fact that I don't have all the information needed, so thought I should report it here. What I don't have is the options given when GCC was configured/built (for the system host compiler) and the preprocessed file (*.i*) that triggers the bug. I'll give the rest here, though. The exact version of GCC that triggered the internal error was both version gcc (SUSE Linux) 4.8.5 and gcc-6 (SUSE Linux) 6.2.1 20160826 [gcc-6-branch revision 239773]. The system type is a Linode VPS. Kernel and node names are Linux, kernel release is 4.9.15-x86_64-linode81, kernel version is #1 SMP Fri Mar 17 09:47:36 EDT 2017, and machine, processor, and hardware platform are all x86_64. >From what I can gather, the exact command that triggered the error was: /home/ethin/gccbuild/./gcc/xgcc -B/home/ethin/gccbuild/./gcc/ -B/usr/local/x86_64-pc-linux-gnu/bin/ -B/usr/local/x86_64-pc-linux-gnu/lib/ -isystem /usr/local/x86_64-pc-linux-gnu/include -isystem /usr/local/x86_64-pc-linux-gnu/sys-include -g0 -fcompare-debug= -g -O2 -O2 -g -O2 -DIN_GCC -fPIC -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-7.1.0/libgcc -I../../../gcc-7.1.0/libgcc/. -I../../../gcc-7.1.0/libgcc/../gcc -I../../../gcc-7.1.0/libgcc/../include -I../../../gcc-7.1.0/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _addQQ.o -MT _addQQ.o -MD -MP -MF _addQQ.dep -DL_add -DQQ_MODE -c ../../../gcc-7.1.0/libgcc/fixed-bit.c -fvisibility=hidden -DHIDE_EXPORTS I configured the GCC 7.1.0 package with the command (from the $HOME/gccbuild directory): ../gcc-7.1.0/configure --enable-host-shared --enable-multiarch --enable-vtable-verify --disable-multilib --enable-threads --enable-tls --enable-__cxa_atexit --enable-gnu-indirect-function --enable-comdat --enable-initfini-array --enable-bootstrap --enable-languages=ada,brig,c,c++,fortran,go,jit,lto,objc,obj-c++ --enable-libada --enable-libsanitizer --enable-libssp --enable-libquadmath --enable-libquadmath-support --enable-libgomp --enable-libvtv --enable-default-pie --enable-default-ssp --enable-cld --enable-checking=all --disable-nls --enable-fixed-point --with-long-double-128 --enable-linker-build-id --enable-gnu-unique-object --enable-lto --enable-canonical-system-headers --enable-objc-gc --enable-liboffloadmic=target --with-build-config="bootstrap-debug-lean bootstrap-debug-lib bootstrap-debug-ckovw" --quiet CC=gcc-6 CXX=g++-6 CC_FOR_TARGET=gcc-6 CXX_FOR_TARGET=g++-6 GCC_FOR_TARGET=gcc-6 GFORTRAN_FOR_TARGET=gfortran-6 The command I used to configure GCC without the GCC 6.x installation (so it used 4.8.5, the default) was: ../gcc-7.1.0/configure --enable-host-shared --enable-multiarch --enable-vtable-verify --disable-multilib --enable-threads --enable-tls --enable-__cxa_atexit --enable-gnu-indirect-function --enable-comdat --enable-initfini-array --enable-bootstrap --enable-languages=ada,brig,c,c++,fortran,go,jit,lto,objc,obj-c++ --enable-libada --enable-libsanitizer --enable-libssp --enable-libquadmath --enable-libquadmath-support --enable-libgomp --enable-libvtv --enable-default-pie --enable-default-ssp --enable-cld --enable-checking=all --disable-nls --enable-fixed-point --with-long-double-128 --enable-linker-build-id --enable-gnu-unique-object --enable-lto --enable-canonical-system-headers --enable-objc-gc --enable-liboffloadmic=target --with-build-config="bootstrap-debug-lean bootstrap-debug-lib bootstrap-debug-ckovw" --quiet The exact output of the command was as follows: In file included from ../../../gcc-7.1.0/libgcc/fixed-bit.c:55:0: ../../../gcc-7.1.0/libgcc/fixed-bit.h:64:1: error: unable to emulate 'QQ' typedef _Fract QQtype __attribute__ ((mode (QQ))); ^~~ ../../../gcc-7.1.0/libgcc/fixed-bit.h:65:1: error: unable to emulate 'UQQ' typedef unsigned _Fract UQQtype __attribute__ ((mode (UQQ))); ^~~ ../../../gcc-7.1.0/libgcc/fixed-bit.h:66:1: error: unable to emulate 'HQ' typedef _Fract HQtype __attribute__ ((mode (HQ))); ^~~ ../../../gcc-7.1.0/libgcc/fixed-bit.h:67:1: error: unable to emulate 'UHQ' typedef unsigned _Fract UHQtype __attribute__ ((mode (UHQ))); ^~~ ../../../gcc-7.1.0/libgcc/fixed-bit.h:68:1: error: unable to emulate 'HA' typedef _Fract HAtype __attribute__ ((mode (HA))); ^~~ ../../../gcc-7.1.0/libgcc/fixed-bit.h:69:1: error: unable to emulate 'UHA' typedef unsigned _Fract UHAtype __attribute__ ((mode (UHA))); ^~~ ../../../gcc-7.1.0/libgcc/fixed-bit.h:84:1: error: unable to emulate 'SQ' typedef _Fra