public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Fwd: Error for unknown spec function 'dumps' when compiling GCC 11.X
       [not found] <4e64dbb4-8179-4f35-6786-78995a5b26ea@tammo-tjarks.de>
@ 2021-10-25 20:41 ` Tammo Tjarks
  2021-10-25 21:20   ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Tammo Tjarks @ 2021-10-25 20:41 UTC (permalink / raw)
  To: gcc-help

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:
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


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

* Re: Error for unknown spec function 'dumps' when compiling GCC 11.X
  2021-10-25 20:41 ` Fwd: Error for unknown spec function 'dumps' when compiling GCC 11.X Tammo Tjarks
@ 2021-10-25 21:20   ` Jonathan Wakely
  2021-10-25 21:47     ` Tammo Tjarks
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2021-10-25 21:20 UTC (permalink / raw)
  To: Tammo Tjarks; +Cc: gcc-help

On Mon, 25 Oct 2021, 21:42 Tammo Tjarks, <tammo@tammo-tjarks.de> 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
>
>

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

* Re: Error for unknown spec function 'dumps' when compiling GCC 11.X
  2021-10-25 21:20   ` Jonathan Wakely
@ 2021-10-25 21:47     ` Tammo Tjarks
  2021-10-26  9:30       ` Jonathan Wakely
  0 siblings, 1 reply; 6+ messages in thread
From: Tammo Tjarks @ 2021-10-25 21:47 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

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@tammo-tjarks.de <mailto:tammo@tammo-tjarks.de>> 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
> 


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

* Re: Error for unknown spec function 'dumps' when compiling GCC 11.X
  2021-10-25 21:47     ` Tammo Tjarks
@ 2021-10-26  9:30       ` Jonathan Wakely
  2021-10-26 22:51         ` Tammo Tjarks
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2021-10-26  9:30 UTC (permalink / raw)
  To: Tammo Tjarks; +Cc: gcc-help

On Mon, 25 Oct 2021 at 22:47, Tammo Tjarks <tammo@tammo-tjarks.de> wrote:
>
> 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.

That's the usual way people build a release. The Git repo is most
commonly used for building the tips of development branches.


> 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.

You're making things far more complicated than necessary. See
https://gcc.gnu.org/wiki/InstallingGCC

Also, if you have already installed binutils to the same --prefix as
gcc then gcc will find it and use it automatically, you don't need to
use --with-as and --with-ld that way (installing all these packages to
different directories seems superficially logical, but is actually
just over-complicated and unnecessary).

I don't know why any of this would cause your problem with the specs,
but I also don't know why your configure command needs to be so long.

Have you tried simplifying your command to the minimum necessary? e.g.
remove --enable-gather-detailed-memory-stats and
--without-local-prefix ?

And why bother adding things that are the defaults anyway, like
--enable-shared --enable-threads=posix and the redundant
build/host/target options?

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

* Re: Error for unknown spec function 'dumps' when compiling GCC 11.X
  2021-10-26  9:30       ` Jonathan Wakely
@ 2021-10-26 22:51         ` Tammo Tjarks
  2021-11-03 23:58           ` Tammo Tjarks
  0 siblings, 1 reply; 6+ messages in thread
From: Tammo Tjarks @ 2021-10-26 22:51 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

Hi Jonathan,
thank you for your suggestions. I tried some modifications:

I first have set the environment with:

cd /opt/add_swlibs/.compile/gcc/11.2/rh6_64/gcc-11.2.0
setenv PWCCMD `pwd`
unsetenv LD_LIBRARY_PATH
  
setenv PATH "/opt/add_swlibs/gcc/10.3.0/rh6_64/bin:/opt/add_swlibs/binutils/2.36.1/linux60_64/bin:${PATH}"
setenv CPATH "/opt/add_swlibs/versioned_libs/0.5/include"
setenv LDFLAGS "-L/opt/add_swlibs/versioned_libs/0.5/linux60_64/lib64_static_only -Wl,-rpath,/opt/add_swlibs/gcc/11.2.0/rh6_64/lib64"

And then I tried configure and compile with:
1.
/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 --with-pic --enable-targets=all --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu \
                                                   --disable-multilib \
                                                   --enable-__cxa_atexit --enable-gnu-indirect-function --enable-checking

and still get the dumps error message.

2.
/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 --with-pic --enable-targets=all --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu \
                                                   --disable-multilib \
                                                   --enable-__cxa_atexit

  
Still get the dumps error message. Will try a little more on this.

Best regards,
Tammo

   
   



On 26.10.21 11:30, Jonathan Wakely wrote:
> On Mon, 25 Oct 2021 at 22:47, Tammo Tjarks <tammo@tammo-tjarks.de> wrote:
>>
>> 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.
> 
> That's the usual way people build a release. The Git repo is most
> commonly used for building the tips of development branches.
> 
> 
>> 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.
> 
> You're making things far more complicated than necessary. See
> https://gcc.gnu.org/wiki/InstallingGCC
> 
> Also, if you have already installed binutils to the same --prefix as
> gcc then gcc will find it and use it automatically, you don't need to
> use --with-as and --with-ld that way (installing all these packages to
> different directories seems superficially logical, but is actually
> just over-complicated and unnecessary).
> 
> I don't know why any of this would cause your problem with the specs,
> but I also don't know why your configure command needs to be so long.
> 
> Have you tried simplifying your command to the minimum necessary? e.g.
> remove --enable-gather-detailed-memory-stats and
> --without-local-prefix ?
> 
> And why bother adding things that are the defaults anyway, like
> --enable-shared --enable-threads=posix and the redundant
> build/host/target options?
> 


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

* Re: Error for unknown spec function 'dumps' when compiling GCC 11.X
  2021-10-26 22:51         ` Tammo Tjarks
@ 2021-11-03 23:58           ` Tammo Tjarks
  0 siblings, 0 replies; 6+ messages in thread
From: Tammo Tjarks @ 2021-11-03 23:58 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

Hi Jonathan,
I tried also the git version as well. But that had no effect. My best guess is, that it is related to the fact, that I compile with a static linked gcc.
I tried also a shared linked gcc version (9.2.0), but there I run into other problems.
Anyway, I guess it is something like: First is compiled with the building gcc and after the shared libraries are compiled the shared library is redirected somehow to the 11er-Version which supports the dumps function. Anyway, I solved it on my side with a small hack. I exchanged inside gcc.c simply the line:
static const char *cpp_debug_options = DUMPS_OPTIONS ("");
to
static const char *cpp_debug_options = "%{d*}";
as in gcc 10.3. With that hack I was able to compile.

Best regards,
Tammo

  

On 27.10.21 00:51, Tammo Tjarks wrote:
> Hi Jonathan,
> thank you for your suggestions. I tried some modifications:
> 
> I first have set the environment with:
> 
> cd /opt/add_swlibs/.compile/gcc/11.2/rh6_64/gcc-11.2.0
> setenv PWCCMD `pwd`
> unsetenv LD_LIBRARY_PATH
>    
> setenv PATH "/opt/add_swlibs/gcc/10.3.0/rh6_64/bin:/opt/add_swlibs/binutils/2.36.1/linux60_64/bin:${PATH}"
> setenv CPATH "/opt/add_swlibs/versioned_libs/0.5/include"
> setenv LDFLAGS "-L/opt/add_swlibs/versioned_libs/0.5/linux60_64/lib64_static_only -Wl,-rpath,/opt/add_swlibs/gcc/11.2.0/rh6_64/lib64"
> 
> And then I tried configure and compile with:
> 1.
> /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 --with-pic --enable-targets=all --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu \
>                                                     --disable-multilib \
>                                                     --enable-__cxa_atexit --enable-gnu-indirect-function --enable-checking
> 
> and still get the dumps error message.
> 
> 2.
> /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 --with-pic --enable-targets=all --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu \
>                                                     --disable-multilib \
>                                                     --enable-__cxa_atexit
> 
>    
> Still get the dumps error message. Will try a little more on this.
> 
> Best regards,
> Tammo
> 
>     
>     
> 
> 
> 
> On 26.10.21 11:30, Jonathan Wakely wrote:
>> On Mon, 25 Oct 2021 at 22:47, Tammo Tjarks <tammo@tammo-tjarks.de> wrote:
>>>
>>> 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.
>>
>> That's the usual way people build a release. The Git repo is most
>> commonly used for building the tips of development branches.
>>
>>
>>> 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.
>>
>> You're making things far more complicated than necessary. See
>> https://gcc.gnu.org/wiki/InstallingGCC
>>
>> Also, if you have already installed binutils to the same --prefix as
>> gcc then gcc will find it and use it automatically, you don't need to
>> use --with-as and --with-ld that way (installing all these packages to
>> different directories seems superficially logical, but is actually
>> just over-complicated and unnecessary).
>>
>> I don't know why any of this would cause your problem with the specs,
>> but I also don't know why your configure command needs to be so long.
>>
>> Have you tried simplifying your command to the minimum necessary? e.g.
>> remove --enable-gather-detailed-memory-stats and
>> --without-local-prefix ?
>>
>> And why bother adding things that are the defaults anyway, like
>> --enable-shared --enable-threads=posix and the redundant
>> build/host/target options?
>>
> 


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

end of thread, other threads:[~2021-11-03 23:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4e64dbb4-8179-4f35-6786-78995a5b26ea@tammo-tjarks.de>
2021-10-25 20:41 ` Fwd: Error for unknown spec function 'dumps' when compiling GCC 11.X Tammo Tjarks
2021-10-25 21:20   ` Jonathan Wakely
2021-10-25 21:47     ` Tammo Tjarks
2021-10-26  9:30       ` Jonathan Wakely
2021-10-26 22:51         ` Tammo Tjarks
2021-11-03 23:58           ` Tammo Tjarks

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).