• read them and weep (gcc 11.1.0)

    From Andrew Alt@1:261/38 to Maurice Kinal on Thu Apr 29 17:27:00 2021
    Maurice Kinal wrote to Benny Pedersen <=-

    -={ 2021-04-28 23:09:07.342978858+00:00 }=-

    $ gcc --version
    gcc (GCC) 11.1.0
    Copyright (C) 2021 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There
    is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    So being of a curious nature, I built this earlier today. Here's my experience with it so far:

    Did an out-of-tree build on Debian Buster using gcc8.

    configure failed but told me what dependencies I needed. I was able to install all
    3 from my distro's repo very quickly.

    Re-ran configure. completed. make -j5. completed. make install. completed.

    make check. Failed 14/22 tests. At the tail end I got this

    make[4]: *** [Makefile:1871: test-suite.log] Error 1 rm b3test_dwz
    make[4]: Leaving directory '/home/andy/src/gcc_build/libbacktrace' make[3]: *** [Makefile:1979: check-TESTS] Error 2 make[3]: Leaving directory '/home/andy/src/gcc_build/libbacktrace' make[2]: *** [Makefile:2264: check-am] Error 2 make[2]: Leaving directory '/home/andy/src/gcc_build/libbacktrace' make[1]: *** [Makefile:8491: check-libbacktrace] Error 2 make[1]: Leaving directory '/home/andy/src/gcc_build' make: *** [Makefile:2419: do-check] Error 2


    I ran "make check" again (without -j) and got this:

    andy@oceanus:~/src/gcc_build$ make check make[1]: Entering directory '/home/andy/src/gcc_build' make[2]: Entering directory '/home/andy/src/gcc_build/fixincludes' autogen -T ../../gcc-11.1.0/fixincludes/check.tpl ../../gcc-11.1.0/fixincludes/inclhack.def
    /bin/bash: autogen: command not found
    make[2]: *** [Makefile:176: check] Error 127 make[2]: Leaving directory '/home/andy/src/gcc_build/fixincludes' make[1]: *** [Makefile:3908: check-fixincludes] Error 2 make[1]: Leaving directory '/home/andy/src/gcc_build' make: *** [Makefile:2419: do-check] Error 2

    I built rmw with problem, added the -fanalyzer flag. The build output was the same
    as with my default compiler (no extra warnings or errors).

    After stripping the binary, the size was only slightly larger

    andy@oceanus:~/src/rmw-project/_build$ ls -al ./rmw
    -rwxr-xr-x 1 andy andy 56000 Apr 29 16:24 ./rmw andy@oceanus:~/src/rmw-project/_build$ ls -al /usr/bin/rmw
    -rwxr-xr-x 1 root root 55896 Apr 29 15:34 /usr/bin/rmw

    --
    -Andy


    ... I am not Paul.
    -+- MultiMail/Linux v0.52

    --- BBBS/Li6 v4.10 Toy-5
    * Origin: Prism bbs (1:261/38)
  • From Maurice Kinal@1:153/7001 to Andrew Alt on Thu Apr 29 22:58:34 2021
    -={ 2021-04-29 22:58:35.514341372+00:00 }=-

    Hey Andrew!

    I built rmw with problem, added the -fanalyzer flag.

    With or without I get the same result;

    # ls -al ./rmw
    -rwxr-xr-x 1 root root 62712 Apr 29 22:57 ./rmw
    # file ./rmw
    ./rmw: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, not stripped

    After stripping;
    # ls -al ./rmw
    -rwxr-xr-x 1 root root 52640 Apr 29 23:03 ./rmw
    # file ./rmw
    ./rmw: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, stripped

    My unstripped is larger but the stripped version is slightly smaller. For the record my CFLAGS="-march=x86-64 -mtune=generic -Os -pipe -m64 -fPIC".

    And just to make sure;
    # gcc --version
    gcc (GCC) 11.1.0
    Copyright (C) 2021 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Looks good from this angle.

    Life is good,
    Maurice

    ... Don't cry for me I have vi.
    --- GNU bash, version 5.1.4(1)-release (x86_64-motorshed-linux-gnu)
    * Origin: Little Mikey's Brain - Ladysmith BC, Canada (1:153/7001)