Re: Error for unknown spec function 'dumps' when compiling GCC 11.X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Jonathan,
thank you very much for your quick answer. Maybe it is related to the fact, that I compile from tarball and do not clone the git repository.
I use the commands:

unset LD_LIBRARY_PATH


export PATH="/opt/add_swlibs/gcc/10.3.0/rh6_64/bin:${PATH}"
export LDFLAGS="-L/opt/add_swlibs/versioned_libs/0.5/linux60_64/lib64_static_only "

/opt/add_swlibs/.compile/gcc/11.2/rh6_64/gcc-11.2.0/configure --prefix=/opt/add_swlibs/gcc/11.2.0/rh6_64 --enable-shared --enable-threads=posix --without-local-prefix --with-pic --enable-targets=all --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu \
                                                  --with-ld=/opt/add_swlibs/binutils/2.36.1/linux60_64/bin/ld LDFLAGS=-Wl,-rpath,/opt/add_swlibs/gcc/11.2.0/rh6_64/lib64 --disable-multilib --with-as=/opt/add_swlibs/binutils/2.36.1/linux60_64/bin/as \
                                                  --enable-__cxa_atexit --enable-gnu-indirect-function --enable-checking --enable-gather-detailed-mem-stats \
                                                  --with-mpc-include=/opt/add_swlibs/versioned_libs/0.5/include --with-mpc-lib=/opt/add_swlibs/versioned_libs/0.5/linux60_64/lib64_static_only \
                                                  --with-mpfr-include=/opt/add_swlibs/versioned_libs/0.5/include --with-mpfr-lib=/opt/add_swlibs/versioned_libs/0.5/linux60_64/lib64_static_only \
                                                  --with-gmp-include=/opt/add_swlibs/versioned_libs/0.5/include --with-gmp-lib=/opt/add_swlibs/versioned_libs/0.5/linux60_64/lib64_static_only \
                                                  --with-isl-include=/opt/add_swlibs/versioned_libs/0.5/include --with-isl-lib=/opt/add_swlibs/versioned_libs/0.5/linux60_64/lib64_static_only \
                                                  --with-zstd-include=/opt/add_swlibs/versioned_libs/0.5/include --with-zstd-lib=/opt/add_swlibs/versioned_libs/0.5/linux60_64/lib64_static_only

 to compile. Used similar command for 10.3 (where I did not use/provide isl and zstd).
The library directory (/opt/add_swlibs/versioned_libs/0.5/linux60_64/lib64_static_only is a directory where I linked only the static libraries to link the gcc itself without dynamic dependencies. I compile for RH6, but have seen the same problem for RH7/8. For compilation I use
gcc 10.3.

Best regards,
Tammo


On 25.10.21 23:20, Jonathan Wakely wrote:


On Mon, 25 Oct 2021, 21:42 Tammo Tjarks, <tammo@xxxxxxxxxxxxxxx <mailto:tammo@xxxxxxxxxxxxxxx>> wrote:

    Dear GCC community,

    when I try to compile a 11 Version of GCC I get while compiling in the directory
    …./gcc-11.2.0/host-x86_64-pc-linux-gnu/gcc
    the following:


How are you configuring GCC? What is your OS?

Everybody else can compile GCC 11.2.0 so something odd is happening for you.


    x86_64-pc-linux-gnu-g++ -std=c++11 -fno-PIE ….. ../.././gcc/cp/g++spec.c
    error occurs:
    x86_64-pc-linux-gnu-g++: fatal error: unknown spec function 'dumps'
    compilation terminated.

    I looked into the spec-file in that directory. There is the entry:
    *cpp_debug_options:
    %<dumpdir %<dumpbase %<dumpbase-ext %{d*} %:dumps()

    When I change it to the entry as in GCC 10.3:
    *cpp_debug_options:
    %{d*}

    the compile runs through even so in the end, the specs file seems to be overwritten again.

    I have seen, that this arguments are defined inside ../gcc/gcc.c. I see there for
    gcc 11.2:

    Gcc-11.2/gcc/gcc.c
    1253 – 1262:
    /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
          Make it easy for a language to override the argument for the
         %:dumps specs function call.  */
    #define DUMPS_OPTIONS(EXTS) \
        "%<dumpdir %<dumpbase %<dumpbase-ext %{d*} %:dumps(" EXTS ")"

    /* This contains cpp options which are not passed when the preprocessor
         output will be used by another program.  */
    static const char *cpp_debug_options = DUMPS_OPTIONS ("");

    While I see in 10.3:
    Gcc-10.3/gcc/gcc.c
    1142 :
    /* This contains cpp options which are not passed when the preprocessor
         output will be used by another program.  */
    static const char *cpp_debug_options = "%{d*}";


    Still have no clue where this dumps is defined. But when I patch the g++spec.c manully and restart compilation, the compilation runs through. My best guess is, that it is not defined inside 10.3 and in the first compilation with 10.3 it fails.
    Is there a clean solution to solve this (unclean solution would be to patch gcc.c or to hack the spec-file when it fails and restart compile)? Where is this dumps defined? Are some prerequisites missing?

    Best regards,
    Tammo





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux