Topic
  • 6 replies
  • Latest Post - ‏2010-04-19T13:17:17Z by tomi.kause
SystemAdmin
SystemAdmin
2364 Posts

Pinned topic Building gcc-4.0.2 on zSuSE 9 64-bit

‏2006-05-31T18:02:28Z |
Hi all,
I'm attempting to build gcc 4.0.2 on zSuSE 9, and get the following errors during the make:

c-parse.y: In function `yyparse':
c-parse.y:342: error: `pedantic' undeclared (first use in this function)
c-parse.y:342: error: (Each undeclared identifier is reported only once
c-parse.y:342: error: for each function it appears in.)
c-parse.y:365: error: `warn_pointer_arith' undeclared (first use in this function)
c-parse.y:365: error: `warn_traditional' undeclared (first use in this function)
c-parse.y:1882: error: `warn_declaration_after_statement' undeclared (first use in this function)
make[1]: *** http://c-parse.o Error 1

I have used a variety of configure lines and none seem to have any effect. I can post any of the configure lines if they would be useful. I used everything from no options, replicating the options on the 3.3.3 build to the options used on the build reports on gcc.gnu.org.

I am using the installed 3.3.3 gcc for the building, and have built the latest versions of binutils, bison, flex, texinfo, and coreutils.

Is there some sort of patch or workaround?

Thanks for your time. If this is not the right place for this question, please point me in the right direction.
Updated on 2010-04-19T13:17:17Z at 2010-04-19T13:17:17Z by tomi.kause
  • ishields
    ishields
    988 Posts

    Re: Building gcc-4.0.2 on zSuSE 9 64-bit

    ‏2006-06-01T18:21:24Z  
    Have you seen the note about obtaining gcc 4.1.0 on the October 2005 stream?

    Ian Shields
  • SystemAdmin
    SystemAdmin
    2364 Posts

    Re: Building gcc-4.0.2 on zSuSE 9 64-bit

    ‏2006-06-05T20:25:33Z  
    • ishields
    • ‏2006-06-01T18:21:24Z
    Have you seen the note about obtaining gcc 4.1.0 on the October 2005 stream?

    Ian Shields
    > Have you seen the note about obtaining href="http://www.ibm.com/developerworks/linux/linux390
    > /gcc-4.1.0-s390-october2005.html">gcc 4.1.0 on the
    > October 2005 stream
    ?
    >
    > Ian Shields
    I have seen that page, but it just says to go download the source from gcc.gnu.org. I tried 4.1.1, and get a whole different set of problems:

    gcc -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -Wno-error -DHAVE_CONFIG_H -DGENER
    ATOR_FILE -I. -Ibuild -I../../gcc -I../../gcc/build -I../../gcc/../include -I../../gcc/../libcpp/include -o build/insn-conditions.o insn-conditions.c
    ../../gcc/config/s390/s390.md:5793: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../../gcc/config/s390/s390.md:5793: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../../gcc/config/s390/s390.md:5794: error: initializer element is not constant
    ../../gcc/config/s390/s390.md:5794: error: (near initialization for `insn_conditions[1].value')
    ../../gcc/config/s390/s390.md:5794: warning: missing initializer
    ../../gcc/config/s390/s390.md:5794: warning: (near initialization for `insn_conditions[1].value')
    ../../gcc/config/s390/s390.md:5794: error: initializer element is not constant
    ../../gcc/config/s390/s390.md:5794: error: (near initialization for `insn_conditions[1]')
    ../../gcc/config/s390/s390.md:555: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../../gcc/config/s390/s390.md:555: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../../gcc/config/s390/s390.md:556: error: initializer element is not constant
    ../../gcc/config/s390/s390.md:556: error: (near initialization for `insn_conditions[2].value')
    ../../gcc/config/s390/s390.md:556: warning: missing initializer

    ... etc ...
  • ishields
    ishields
    988 Posts

    Re: Building gcc-4.0.2 on zSuSE 9 64-bit

    ‏2006-06-05T21:02:36Z  
    Your best bet might be to ocntact the Linux on zSeries team directly (linux390@de.ibm.com). They should be able to help.

    Ian Shields.
  • SystemAdmin
    SystemAdmin
    2364 Posts

    Re: Building gcc-4.0.2 on zSuSE 9 64-bit

    ‏2006-08-11T16:48:54Z  
    Don't know who cares much about this any more .... (May 31 was a while ago), but I've got your answer.

    Take your builds of bison, flex, gawk, etc out of the picture.

    Set your path so that /usr/local/bin isn't in the path any more. Of course, if you're using gcc from that path you'll have to make some adjustments, like symlinking gcc from /usr/bin, (and makeinfo, make, etc).

    I was building gcc 4.1.1 on AIX 4.3.3 and ran into the same problems. When I fell back to the original AIX 4.3 lex, awk, yacc, as, ld, etc, it got past this problem and went on to the next set of problems.

    Oh yea, I disabled nls (--disable-nls) and did an "export CONFIG_SHELL=/usr/bin/bash" for my build too.

    Hope this helps!

    -Lou
  • RUI
    RUI
    1 Post

    Re: Building gcc-4.0.2 on zSuSE 9 64-bit

    ‏2010-01-13T16:43:57Z  
    Don't know who cares much about this any more .... (May 31 was a while ago), but I've got your answer.

    Take your builds of bison, flex, gawk, etc out of the picture.

    Set your path so that /usr/local/bin isn't in the path any more. Of course, if you're using gcc from that path you'll have to make some adjustments, like symlinking gcc from /usr/bin, (and makeinfo, make, etc).

    I was building gcc 4.1.1 on AIX 4.3.3 and ran into the same problems. When I fell back to the original AIX 4.3 lex, awk, yacc, as, ld, etc, it got past this problem and went on to the next set of problems.

    Oh yea, I disabled nls (--disable-nls) and did an "export CONFIG_SHELL=/usr/bin/bash" for my build too.

    Hope this helps!

    -Lou
    Hi,

    I have tried hiding the /usr/local/bin path but still doesn't work for me on suse 9 zlinux and i get the following errors? Can you please explain the steps in a bit more detail?

    make[4]: Entering directory `/pike/building/gcc4.3.2/gcc-4.3.2/host-s390x-ibm-linux-gnu/gcc'
    gcc -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../.././gcc -I../.././gcc/build -I../.././gcc/../include -I../.././gcc/../libcpp/include -I/usr/opt/gmp/include -I/usr/opt/mpfr/include -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/dpd -I../libdecnumber -o build/gencondmd.o build/gencondmd.c
    In file included from build/gencondmd.c:41:
    ../.././gcc/config/s390/constraints.md: In function `satisfies_constraint_L':
    ../.././gcc/config/s390/constraints.md:136: error: `TARGET_ZARCH' undeclared (first use in this function)
    ../.././gcc/config/s390/constraints.md:136: error: (Each undeclared identifier is reported only once
    ../.././gcc/config/s390/constraints.md:136: error: for each function it appears in.)
    ../.././gcc/config/s390/s390.md: At top level:
    ../.././gcc/config/s390/s390.md:542: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:542: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:543: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:543: error: (near initialization for `insn_conditions[0].value')
    ../.././gcc/config/s390/s390.md:543: warning: missing initializer
    ../.././gcc/config/s390/s390.md:543: warning: (near initialization for `insn_conditions[0].value')
    ../.././gcc/config/s390/s390.md:543: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:543: error: (near initialization for `insn_conditions[0]')
    ../.././gcc/config/s390/s390.md:1351: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1351: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1353: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1353: error: (near initialization for `insn_conditions[1].value')
    ../.././gcc/config/s390/s390.md:1353: warning: missing initializer
    ../.././gcc/config/s390/s390.md:1353: warning: (near initialization for `insn_conditions[1].value')
    ../.././gcc/config/s390/s390.md:1353: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1353: error: (near initialization for `insn_conditions[1]')
    ../.././gcc/config/s390/s390.md:5132: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:5132: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:5133: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5133: error: (near initialization for `insn_conditions[2].value')
    ../.././gcc/config/s390/s390.md:5133: warning: missing initializer
    ../.././gcc/config/s390/s390.md:5133: warning: (near initialization for `insn_conditions[2].value')
    ../.././gcc/config/s390/s390.md:5133: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5133: error: (near initialization for `insn_conditions[2]')
    ../.././gcc/config/s390/s390.md:6631: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:6631: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:6632: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:6632: error: (near initialization for `insn_conditions[3].value')
    ../.././gcc/config/s390/s390.md:6632: warning: missing initializer
    ../.././gcc/config/s390/s390.md:6632: warning: (near initialization for `insn_conditions[3].value')
    ../.././gcc/config/s390/s390.md:6632: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:6632: error: (near initialization for `insn_conditions[3]')
    ../.././gcc/config/s390/s390.md:2978: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:2978: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:2979: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:2979: error: (near initialization for `insn_conditions[4].value')
    ../.././gcc/config/s390/s390.md:2979: warning: missing initializer
    ../.././gcc/config/s390/s390.md:2979: warning: (near initialization for `insn_conditions[4].value')
    ../.././gcc/config/s390/s390.md:2979: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:2979: error: (near initialization for `insn_conditions[4]')
    ../.././gcc/config/s390/s390.md:2871: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:2873: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:277: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:2871: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:2873: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:277: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:278: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:278: error: (near initialization for `insn_conditions[5].value')
    ../.././gcc/config/s390/s390.md:278: warning: missing initializer
    ../.././gcc/config/s390/s390.md:278: warning: (near initialization for `insn_conditions[5].value')
    ../.././gcc/config/s390/s390.md:278: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:278: error: (near initialization for `insn_conditions[5]')
    ../.././gcc/config/s390/s390.md:1319: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1319: error: (near initialization for `insn_conditions[6]')
    ../.././gcc/config/s390/s390.md:271: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:271: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:272: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:272: error: (near initialization for `insn_conditions[7].value')
    ../.././gcc/config/s390/s390.md:272: warning: missing initializer
    ../.././gcc/config/s390/s390.md:272: warning: (near initialization for `insn_conditions[7].value')
    ../.././gcc/config/s390/s390.md:272: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:272: error: (near initialization for `insn_conditions[7]')
    ../.././gcc/config/s390/s390.md:1162: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1162: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1164: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1164: error: (near initialization for `insn_conditions[8].value')
    ../.././gcc/config/s390/s390.md:1164: warning: missing initializer
    ../.././gcc/config/s390/s390.md:1164: warning: (near initialization for `insn_conditions[8].value')
    ../.././gcc/config/s390/s390.md:1164: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1164: error: (near initialization for `insn_conditions[8]')
    ../.././gcc/config/s390/s390.md:746: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:746: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:747: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:747: error: (near initialization for `insn_conditions[9].value')
    ../.././gcc/config/s390/s390.md:747: warning: missing initializer
    ../.././gcc/config/s390/s390.md:747: warning: (near initialization for `insn_conditions[9].value')
    ../.././gcc/config/s390/s390.md:747: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:747: error: (near initialization for `insn_conditions[9]')
    ../.././gcc/config/s390/s390.md:3465: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3465: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3466: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:3466: error: (near initialization for `insn_conditions10.value')
    ../.././gcc/config/s390/s390.md:3466: warning: missing initializer
    ../.././gcc/config/s390/s390.md:3466: warning: (near initialization for `insn_conditions10.value')
    ../.././gcc/config/s390/s390.md:3466: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:3466: error: (near initialization for `insn_conditions10')
    ../.././gcc/config/s390/s390.md:894: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:894: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:896: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:896: error: (near initialization for `insn_conditions11.value')
    ../.././gcc/config/s390/s390.md:896: warning: missing initializer
    ../.././gcc/config/s390/s390.md:896: warning: (near initialization for `insn_conditions11.value')
    ../.././gcc/config/s390/s390.md:896: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:896: error: (near initialization for `insn_conditions11')
    ../.././gcc/config/s390/s390.md:5610: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:5610: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:5611: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5611: error: (near initialization for `insn_conditions12.value')
    ../.././gcc/config/s390/s390.md:5611: warning: missing initializer
    ../.././gcc/config/s390/s390.md:5611: warning: (near initialization for `insn_conditions12.value')
    ../.././gcc/config/s390/s390.md:5611: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5611: error: (near initialization for `insn_conditions12')
    ../.././gcc/config/s390/s390.md:3002: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3002: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:271: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3002: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3002: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:271: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:272: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:272: error: (near initialization for `insn_conditions13.value')
    ../.././gcc/config/s390/s390.md:272: warning: missing initializer
    ../.././gcc/config/s390/s390.md:272: warning: (near initialization for `insn_conditions13.value')
    ../.././gcc/config/s390/s390.md:272: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:272: error: (near initialization for `insn_conditions13')
    ../.././gcc/config/s390/s390.md:3465: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3465: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3466: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:3466: error: (near initialization for `insn_conditions14.value')
    ../.././gcc/config/s390/s390.md:3466: warning: missing initializer
    ../.././gcc/config/s390/s390.md:3466: warning: (near initialization for `insn_conditions14.value')
    ../.././gcc/config/s390/s390.md:3466: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:3466: error: (near initialization for `insn_conditions14')
    ../.././gcc/config/s390/s390.md:710: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:710: error: (near initialization for `insn_conditions15')
    ../.././gcc/config/s390/s390.md:4242: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:4242: error: (near initialization for `insn_conditions16')
    ../.././gcc/config/s390/s390.md:5940: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5940: error: (near initialization for `insn_conditions17')
    ../.././gcc/config/s390/s390.md:849: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:256: error: `TARGET_HARD_DFP' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:849: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:256: error: `TARGET_HARD_DFP' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:257: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:257: error: (near initialization for `insn_conditions18.value')
    ../.././gcc/config/s390/s390.md:257: warning: missing initializer
    ../.././gcc/config/s390/s390.md:257: warning: (near initialization for `insn_conditions18.value')
    ../.././gcc/config/s390/s390.md:257: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:257: error: (near initialization for `insn_conditions18')
    ../.././gcc/config/s390/s390.md:5894: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5894: error: (near initialization for `insn_conditions19')
    ../.././gcc/config/s390/s390.md:4199: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:4199: error: (near initialization for `insn_conditions20')
    ../.././gcc/config/s390/s390.md:6671: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:6671: error: (near initialization for `insn_conditions21')
    ../.././gcc/config/s390/s390.md:1190: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1190: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1195: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1195: error: (near initialization for `insn_conditions22.value')
    ../.././gcc/config/s390/s390.md:1195: warning: missing initializer
    ../.././gcc/config/s390/s390.md:1195: warning: (near initialization for `insn_conditions22.value')
    ../.././gcc/config/s390/s390.md:1195: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1195: error: (near initialization for `insn_conditions22')
    ../.././gcc/config/s390/s390.md:7453: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:7453: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:7454: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:7454: error: (near initialization for `insn_conditions23.value')
    ../.././gcc/config/s390/s390.md:7454: warning: missing initializer
    ../.././gcc/config/s390/s390.md:7454: warning: (near initialization for `insn_conditions23.value')
    ../.././gcc/config/s390/s390.md:7454: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:7454: error: (near initialization for `insn_conditions23')
    ../.././gcc/config/s390/s390.md:760: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:760: error: (near initialization for `insn_conditions24')
    ../.././gcc/config/s390/s390.md:849: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:849: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:850: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:850: error: (near initialization for `insn_conditions25.value')
    ../.././gcc/config/s390/s390.md:850: warning: missing initializer
    ../.././gcc/config/s390/s390.md:850: warning: (near initialization for `insn_conditions25.value')
    ../.././gcc/config/s390/s390.md:850: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:850: error: (near initialization for `insn_conditions25')
    ../.././gcc/config/s390/s390.md:7691: error: `TARGET_BACKCHAIN' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:7691: error: `TARGET_BACKCHAIN' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:7692: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:7692: error: (near initialization for `insn_conditions26.value')
    ../.././gcc/config/s390/s390.md:7692: warning: missing initializer
    ../.././gcc/config/s390/s390.md:7692: warning: (near initialization for `insn_conditions26.value')
    ../.././gcc/config/s390/s390.md:7692: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:7692: error: (near initialization for `insn_conditions26')
    ../.././gcc/config/s390/s390.md:3215: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3215: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3218: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:3218: error: (near initialization for `insn_conditions27.value')
    ../.././gcc/config/s390/s390.md:3218: warning: missing initializer

    Regards,
    Raja
  • tomi.kause
    tomi.kause
    1 Post

    Re: Building gcc-4.0.2 on zSuSE 9 64-bit

    ‏2010-04-19T13:17:17Z  
    • RUI
    • ‏2010-01-13T16:43:57Z
    Hi,

    I have tried hiding the /usr/local/bin path but still doesn't work for me on suse 9 zlinux and i get the following errors? Can you please explain the steps in a bit more detail?

    make[4]: Entering directory `/pike/building/gcc4.3.2/gcc-4.3.2/host-s390x-ibm-linux-gnu/gcc'
    gcc -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../.././gcc -I../.././gcc/build -I../.././gcc/../include -I../.././gcc/../libcpp/include -I/usr/opt/gmp/include -I/usr/opt/mpfr/include -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/dpd -I../libdecnumber -o build/gencondmd.o build/gencondmd.c
    In file included from build/gencondmd.c:41:
    ../.././gcc/config/s390/constraints.md: In function `satisfies_constraint_L':
    ../.././gcc/config/s390/constraints.md:136: error: `TARGET_ZARCH' undeclared (first use in this function)
    ../.././gcc/config/s390/constraints.md:136: error: (Each undeclared identifier is reported only once
    ../.././gcc/config/s390/constraints.md:136: error: for each function it appears in.)
    ../.././gcc/config/s390/s390.md: At top level:
    ../.././gcc/config/s390/s390.md:542: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:542: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:543: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:543: error: (near initialization for `insn_conditions[0].value')
    ../.././gcc/config/s390/s390.md:543: warning: missing initializer
    ../.././gcc/config/s390/s390.md:543: warning: (near initialization for `insn_conditions[0].value')
    ../.././gcc/config/s390/s390.md:543: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:543: error: (near initialization for `insn_conditions[0]')
    ../.././gcc/config/s390/s390.md:1351: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1351: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1353: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1353: error: (near initialization for `insn_conditions[1].value')
    ../.././gcc/config/s390/s390.md:1353: warning: missing initializer
    ../.././gcc/config/s390/s390.md:1353: warning: (near initialization for `insn_conditions[1].value')
    ../.././gcc/config/s390/s390.md:1353: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1353: error: (near initialization for `insn_conditions[1]')
    ../.././gcc/config/s390/s390.md:5132: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:5132: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:5133: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5133: error: (near initialization for `insn_conditions[2].value')
    ../.././gcc/config/s390/s390.md:5133: warning: missing initializer
    ../.././gcc/config/s390/s390.md:5133: warning: (near initialization for `insn_conditions[2].value')
    ../.././gcc/config/s390/s390.md:5133: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5133: error: (near initialization for `insn_conditions[2]')
    ../.././gcc/config/s390/s390.md:6631: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:6631: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:6632: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:6632: error: (near initialization for `insn_conditions[3].value')
    ../.././gcc/config/s390/s390.md:6632: warning: missing initializer
    ../.././gcc/config/s390/s390.md:6632: warning: (near initialization for `insn_conditions[3].value')
    ../.././gcc/config/s390/s390.md:6632: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:6632: error: (near initialization for `insn_conditions[3]')
    ../.././gcc/config/s390/s390.md:2978: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:2978: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:2979: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:2979: error: (near initialization for `insn_conditions[4].value')
    ../.././gcc/config/s390/s390.md:2979: warning: missing initializer
    ../.././gcc/config/s390/s390.md:2979: warning: (near initialization for `insn_conditions[4].value')
    ../.././gcc/config/s390/s390.md:2979: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:2979: error: (near initialization for `insn_conditions[4]')
    ../.././gcc/config/s390/s390.md:2871: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:2873: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:277: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:2871: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:2873: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:277: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:278: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:278: error: (near initialization for `insn_conditions[5].value')
    ../.././gcc/config/s390/s390.md:278: warning: missing initializer
    ../.././gcc/config/s390/s390.md:278: warning: (near initialization for `insn_conditions[5].value')
    ../.././gcc/config/s390/s390.md:278: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:278: error: (near initialization for `insn_conditions[5]')
    ../.././gcc/config/s390/s390.md:1319: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1319: error: (near initialization for `insn_conditions[6]')
    ../.././gcc/config/s390/s390.md:271: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:271: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:272: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:272: error: (near initialization for `insn_conditions[7].value')
    ../.././gcc/config/s390/s390.md:272: warning: missing initializer
    ../.././gcc/config/s390/s390.md:272: warning: (near initialization for `insn_conditions[7].value')
    ../.././gcc/config/s390/s390.md:272: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:272: error: (near initialization for `insn_conditions[7]')
    ../.././gcc/config/s390/s390.md:1162: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1162: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1164: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1164: error: (near initialization for `insn_conditions[8].value')
    ../.././gcc/config/s390/s390.md:1164: warning: missing initializer
    ../.././gcc/config/s390/s390.md:1164: warning: (near initialization for `insn_conditions[8].value')
    ../.././gcc/config/s390/s390.md:1164: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1164: error: (near initialization for `insn_conditions[8]')
    ../.././gcc/config/s390/s390.md:746: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:746: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:747: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:747: error: (near initialization for `insn_conditions[9].value')
    ../.././gcc/config/s390/s390.md:747: warning: missing initializer
    ../.././gcc/config/s390/s390.md:747: warning: (near initialization for `insn_conditions[9].value')
    ../.././gcc/config/s390/s390.md:747: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:747: error: (near initialization for `insn_conditions[9]')
    ../.././gcc/config/s390/s390.md:3465: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3465: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3466: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:3466: error: (near initialization for `insn_conditions10.value')
    ../.././gcc/config/s390/s390.md:3466: warning: missing initializer
    ../.././gcc/config/s390/s390.md:3466: warning: (near initialization for `insn_conditions10.value')
    ../.././gcc/config/s390/s390.md:3466: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:3466: error: (near initialization for `insn_conditions10')
    ../.././gcc/config/s390/s390.md:894: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:894: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:896: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:896: error: (near initialization for `insn_conditions11.value')
    ../.././gcc/config/s390/s390.md:896: warning: missing initializer
    ../.././gcc/config/s390/s390.md:896: warning: (near initialization for `insn_conditions11.value')
    ../.././gcc/config/s390/s390.md:896: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:896: error: (near initialization for `insn_conditions11')
    ../.././gcc/config/s390/s390.md:5610: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:5610: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:5611: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5611: error: (near initialization for `insn_conditions12.value')
    ../.././gcc/config/s390/s390.md:5611: warning: missing initializer
    ../.././gcc/config/s390/s390.md:5611: warning: (near initialization for `insn_conditions12.value')
    ../.././gcc/config/s390/s390.md:5611: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5611: error: (near initialization for `insn_conditions12')
    ../.././gcc/config/s390/s390.md:3002: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3002: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:271: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3002: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3002: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:271: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:272: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:272: error: (near initialization for `insn_conditions13.value')
    ../.././gcc/config/s390/s390.md:272: warning: missing initializer
    ../.././gcc/config/s390/s390.md:272: warning: (near initialization for `insn_conditions13.value')
    ../.././gcc/config/s390/s390.md:272: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:272: error: (near initialization for `insn_conditions13')
    ../.././gcc/config/s390/s390.md:3465: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3465: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3466: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:3466: error: (near initialization for `insn_conditions14.value')
    ../.././gcc/config/s390/s390.md:3466: warning: missing initializer
    ../.././gcc/config/s390/s390.md:3466: warning: (near initialization for `insn_conditions14.value')
    ../.././gcc/config/s390/s390.md:3466: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:3466: error: (near initialization for `insn_conditions14')
    ../.././gcc/config/s390/s390.md:710: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:710: error: (near initialization for `insn_conditions15')
    ../.././gcc/config/s390/s390.md:4242: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:4242: error: (near initialization for `insn_conditions16')
    ../.././gcc/config/s390/s390.md:5940: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5940: error: (near initialization for `insn_conditions17')
    ../.././gcc/config/s390/s390.md:849: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:256: error: `TARGET_HARD_DFP' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:849: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:256: error: `TARGET_HARD_DFP' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:257: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:257: error: (near initialization for `insn_conditions18.value')
    ../.././gcc/config/s390/s390.md:257: warning: missing initializer
    ../.././gcc/config/s390/s390.md:257: warning: (near initialization for `insn_conditions18.value')
    ../.././gcc/config/s390/s390.md:257: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:257: error: (near initialization for `insn_conditions18')
    ../.././gcc/config/s390/s390.md:5894: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:5894: error: (near initialization for `insn_conditions19')
    ../.././gcc/config/s390/s390.md:4199: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:4199: error: (near initialization for `insn_conditions20')
    ../.././gcc/config/s390/s390.md:6671: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:6671: error: (near initialization for `insn_conditions21')
    ../.././gcc/config/s390/s390.md:1190: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1190: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:1195: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1195: error: (near initialization for `insn_conditions22.value')
    ../.././gcc/config/s390/s390.md:1195: warning: missing initializer
    ../.././gcc/config/s390/s390.md:1195: warning: (near initialization for `insn_conditions22.value')
    ../.././gcc/config/s390/s390.md:1195: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:1195: error: (near initialization for `insn_conditions22')
    ../.././gcc/config/s390/s390.md:7453: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:7453: error: `TARGET_64BIT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:7454: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:7454: error: (near initialization for `insn_conditions23.value')
    ../.././gcc/config/s390/s390.md:7454: warning: missing initializer
    ../.././gcc/config/s390/s390.md:7454: warning: (near initialization for `insn_conditions23.value')
    ../.././gcc/config/s390/s390.md:7454: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:7454: error: (near initialization for `insn_conditions23')
    ../.././gcc/config/s390/s390.md:760: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:760: error: (near initialization for `insn_conditions24')
    ../.././gcc/config/s390/s390.md:849: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:849: error: `TARGET_HARD_FLOAT' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:850: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:850: error: (near initialization for `insn_conditions25.value')
    ../.././gcc/config/s390/s390.md:850: warning: missing initializer
    ../.././gcc/config/s390/s390.md:850: warning: (near initialization for `insn_conditions25.value')
    ../.././gcc/config/s390/s390.md:850: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:850: error: (near initialization for `insn_conditions25')
    ../.././gcc/config/s390/s390.md:7691: error: `TARGET_BACKCHAIN' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:7691: error: `TARGET_BACKCHAIN' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:7692: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:7692: error: (near initialization for `insn_conditions26.value')
    ../.././gcc/config/s390/s390.md:7692: warning: missing initializer
    ../.././gcc/config/s390/s390.md:7692: warning: (near initialization for `insn_conditions26.value')
    ../.././gcc/config/s390/s390.md:7692: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:7692: error: (near initialization for `insn_conditions26')
    ../.././gcc/config/s390/s390.md:3215: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3215: error: `TARGET_ZARCH' undeclared here (not in a function)
    ../.././gcc/config/s390/s390.md:3218: error: initializer element is not constant
    ../.././gcc/config/s390/s390.md:3218: error: (near initialization for `insn_conditions27.value')
    ../.././gcc/config/s390/s390.md:3218: warning: missing initializer

    Regards,
    Raja
    That error means your awk is too old. Not kidding. There is a generated header
    file which is supposed to define the TARGET_ZARCH and pals. The header is
    generated with awk, and if awk is too old, the header file will be empty.
    Took me a while to figure that one out.

    My detailed steps to climb over the obstacle:

    wget ftp://ftp.funet.fi/pub/gnu/gnu/gawk/gawk-3.1.5.tar.bz2
    tar jvxf /gawk-3.1.5.tar.bz2
    cd gawk-3.1.5
    ./configure --prefix=/opt/gawk-3.1.5 && make install

    cd ../gcc-4.1.1
    CONFIG_SHELL=/bin/bash \
    PATH=/usr/bin:/usr/X11R6/bin:/bin \
    ./configure --prefix=/opt/gcc-4.1.1 \
    --enable-shared \
    --enable-threads=posix \
    --with-system-zlib \
    --enable-__cxa_atexit \
    --disable-libunwind-exceptions \
    --enable-languages=c,c++ \
    --disable-nls
    PATH=/opt/gawk-3.1.5/bin/:$PATH make

    Adjust the gcc configure options to suit your personal taste.