Loading ...
Sorry, an error occurred while loading the content.

Re: Problems with gcc 3.3.1

Expand Messages
  • Alejandro López-Valencia
    ... Bram, can you ask the OP to try again with collect2 disabled (as in renamed or moved out of the way)? I suspect the problem is the incremental linker. I
    Message 1 of 10 , Dec 6, 2004
    • 0 Attachment
      On 06/12/2004 06:39 a.m., Bram Moolenaar wrote:
      > Reinhard Wobst reported problems when compiling Vim with gcc 3.3.1. It
      > appears to work OK with the "-O2" option, but not with "-O3". Possibly
      > this is an optimizer problem in the compiler.
      >
      > Searching around I found hints that the 3.3.1 and 3.3.2 versions of gcc
      > have known problems. Pehaps I should add a configure check for them and
      > disable the optimizer for these versions? Or just change "-O3" and
      > higher to "-O2"? Currently version 3.3.5 is available, and it appears
      > to be OK.
      >
      > If someone knows more details about exactly which versions of gcc in the
      > 3.3 series have problems and what level of the optimizer should work OK,
      > please let me know.
      >

      Bram, can you ask the OP to try again with collect2 disabled (as in
      renamed or moved out of the way)?

      I suspect the problem is the incremental linker. I have no problems
      using -O3 with Cygmin 3.3.3, but I know that this particular
      Cygwin/Mingw version has some backports from the 3.4.1 trunk, so it is
      not your typical gcc.

      --
      Alejandro López-Valencia

      Lo que Natura non da, Salamanca non presta.
      Francisco de Quevedo y Villegas
    • Ciaran McCreesh
      On Mon, 06 Dec 2004 12:39:51 +0100 Bram Moolenaar ... If something like this is added, could you please also provide an easy way for
      Message 2 of 10 , Dec 6, 2004
      • 0 Attachment
        On Mon, 06 Dec 2004 12:39:51 +0100 Bram Moolenaar <Bram@...>
        wrote:
        | Searching around I found hints that the 3.3.1 and 3.3.2 versions of
        | gcc have known problems. Pehaps I should add a configure check for
        | them and disable the optimizer for these versions? Or just change
        | "-O3" and higher to "-O2"? Currently version 3.3.5 is available, and
        | it appears to be OK.

        If something like this is added, could you please also provide an easy
        way for distributions to override this? Gentoo allows users to build
        vim with -O3 and we've not had any problems with it. The only flag
        that's caused problems for us is -funroll-all-loops (which is a silly
        flag anyway), and we filter this from CFLAGS before calling configure.
        It'd make my life easier if I didn't have to worry about vim's configure
        scripts and the ebuild flag filtering managing to confuse each other :)

        --
        Ciaran McCreesh : Gentoo Developer (Vim, Fluxbox, Sparc, Mips)
        Mail : ciaranm at gentoo.org
        Web : http://dev.gentoo.org/~ciaranm
      • Bram Moolenaar
        ... And with what version of gcc? And with Python, GTK and other stuff? The problem was reported with big features and Python. I don t know if that
        Message 3 of 10 , Dec 6, 2004
        • 0 Attachment
          Ciaran McCreesh wrote:

          > On Mon, 06 Dec 2004 12:39:51 +0100 Bram Moolenaar <Bram@...>
          > wrote:
          > | Searching around I found hints that the 3.3.1 and 3.3.2 versions of
          > | gcc have known problems. Pehaps I should add a configure check for
          > | them and disable the optimizer for these versions? Or just change
          > | "-O3" and higher to "-O2"? Currently version 3.3.5 is available, and
          > | it appears to be OK.
          >
          > If something like this is added, could you please also provide an easy
          > way for distributions to override this? Gentoo allows users to build
          > vim with -O3 and we've not had any problems with it.

          And with what version of gcc? And with Python, GTK and other stuff?
          The problem was reported with "big" features and Python. I don't know
          if that matters.

          My point is that I want to hear about known problems with gcc 3.3.x.

          > The only flag that's caused problems for us is -funroll-all-loops
          > (which is a silly flag anyway), and we filter this from CFLAGS before
          > calling configure. It'd make my life easier if I didn't have to worry
          > about vim's configure scripts and the ebuild flag filtering managing
          > to confuse each other :)

          That's why I was thinking of taking the safe side. "-O2" should be
          enough for Vim, more optimization is unlikely to give a noticable
          effect. A crash is quite nocicable!

          --
          Imagine a world without hypothetical situations.

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
          \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
        • Aschwin Marsman
          ... Do you know how the problem could be reproduced? Compiling is OK I presume, but it crashes after startup? I could try gcc 3.3.3 that is delivered with SUSE
          Message 4 of 10 , Dec 6, 2004
          • 0 Attachment
            On Mon, 6 Dec 2004, Bram Moolenaar wrote:
            > Ciaran McCreesh wrote:
            >
            > > On Mon, 06 Dec 2004 12:39:51 +0100 Bram Moolenaar <Bram@...>
            > > wrote:
            > > | Searching around I found hints that the 3.3.1 and 3.3.2 versions of
            > > | gcc have known problems. Pehaps I should add a configure check for
            > > | them and disable the optimizer for these versions? Or just change
            > > | "-O3" and higher to "-O2"? Currently version 3.3.5 is available, and
            > > | it appears to be OK.
            > >
            > > If something like this is added, could you please also provide an easy
            > > way for distributions to override this? Gentoo allows users to build
            > > vim with -O3 and we've not had any problems with it.
            >
            > And with what version of gcc? And with Python, GTK and other stuff?
            > The problem was reported with "big" features and Python. I don't know
            > if that matters.
            >
            > My point is that I want to hear about known problems with gcc 3.3.x.

            Do you know how the problem could be reproduced? Compiling is OK I presume,
            but it crashes after startup? I could try gcc 3.3.3 that is delivered with
            SUSE 9.1, but I don't know how many patches they applied to it (gcc-3.3.3-41).

            Best regards,

            Aschwin

            --
            aschwin@... http://www.marsman.org
          • Ciaran McCreesh
            On Mon, 06 Dec 2004 16:19:37 +0100 Bram Moolenaar ... We build with huge features and python (2.3.3 and 2.3.4) as an option. gcc-wise,
            Message 5 of 10 , Dec 6, 2004
            • 0 Attachment
              On Mon, 06 Dec 2004 16:19:37 +0100 Bram Moolenaar <Bram@...>
              wrote:
              | > On Mon, 06 Dec 2004 12:39:51 +0100 Bram Moolenaar
              | > <Bram@...> wrote:
              | > If something like this is added, could you please also provide an
              | > easy way for distributions to override this? Gentoo allows users to
              | > build vim with -O3 and we've not had any problems with it.
              |
              | And with what version of gcc? And with Python, GTK and other stuff?
              | The problem was reported with "big" features and Python. I don't know
              | if that matters.

              We build with "huge" features and python (2.3.3 and 2.3.4) as an option.
              gcc-wise, we're using 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.4.1, 3.4.2 and
              3.4.3. For GTK+ we use 2.4.9 and 2.4.13.

              | My point is that I want to hear about known problems with gcc 3.3.x.

              -funroll-all-loops definitely breaks vim on some systems with "huge"
              features and no GUI with (gcc 3.3.2 on amd64 and x86), (gcc 3.3.3 on
              sparc and mips) and (gcc 3.3.4 on x86, sparc and mips). It probably
              breaks with other combinations too.

              By "breaks", it tends to spew a load of nonsense E412 messages upon
              startup and then behave strangely thereafter.

              Here's a configure line that triggers it on my system:

              ./configure --prefix=/usr --host=i686-pc-linux-gnu
              --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
              --sysconfdir=/etc --localstatedir=/var/lib --with-features=huge
              --enable-multibyte --disable-cscope --enable-gpm --disable-perlinterp
              --disable-pythoninterp --disable-rubyinterp --disable-tclinterp
              --disable-mzschemeinterp --enable-gui=no --without-x --disable-nls
              --disable-acl --with-tlib=ncurses --disable-selinux

              CFLAGS are "-O2 -march=pentium4 -fomit-frame-pointer -pipe
              -funroll-all-loops".

              It's definitely the -funroll-all-loops that's to blame, we had a number
              of bug reports from users who thought it'd be a good idea to use that
              flag globally (please don't ask why, I have absolutely no idea) until we
              started filtering the flag for vim builds.

              | > The only flag that's caused problems for us is -funroll-all-loops
              | > (which is a silly flag anyway), and we filter this from CFLAGS
              | > before calling configure. It'd make my life easier if I didn't have
              | > to worry about vim's configure scripts and the ebuild flag filtering
              | > managing to confuse each other :)
              |
              | That's why I was thinking of taking the safe side. "-O2" should be
              | enough for Vim, more optimization is unlikely to give a noticable
              | effect. A crash is quite nocicable!

              True. On the other hand, I'd expect anyone who goes higher than -O2 to
              know that they may have problems.

              --
              Ciaran McCreesh : Gentoo Developer (Vim, Fluxbox, Sparc, Mips)
              Mail : ciaranm at gentoo.org
              Web : http://dev.gentoo.org/~ciaranm
            • Bram Moolenaar
              ... The problem (a crash) appeared with syntax highlighting. I don t have the file with which it happened (Reinhard, can you send it to the list?). Using the
              Message 6 of 10 , Dec 6, 2004
              • 0 Attachment
                Aschwin Marsman wrote:

                > On Mon, 6 Dec 2004, Bram Moolenaar wrote:
                > > Ciaran McCreesh wrote:
                > >
                > > > On Mon, 06 Dec 2004 12:39:51 +0100 Bram Moolenaar <Bram@...>
                > > > wrote:
                > > > | Searching around I found hints that the 3.3.1 and 3.3.2 versions of
                > > > | gcc have known problems. Pehaps I should add a configure check for
                > > > | them and disable the optimizer for these versions? Or just change
                > > > | "-O3" and higher to "-O2"? Currently version 3.3.5 is available, and
                > > > | it appears to be OK.
                > > >
                > > > If something like this is added, could you please also provide an easy
                > > > way for distributions to override this? Gentoo allows users to build
                > > > vim with -O3 and we've not had any problems with it.
                > >
                > > And with what version of gcc? And with Python, GTK and other stuff?
                > > The problem was reported with "big" features and Python. I don't know
                > > if that matters.
                > >
                > > My point is that I want to hear about known problems with gcc 3.3.x.
                >
                > Do you know how the problem could be reproduced? Compiling is OK I
                > presume, but it crashes after startup? I could try gcc 3.3.3 that is
                > delivered with SUSE 9.1, but I don't know how many patches they
                > applied to it (gcc-3.3.3-41).

                The problem (a crash) appeared with syntax highlighting. I don't have
                the file with which it happened (Reinhard, can you send it to the
                list?). Using the "G" command in that specific file crashed Vim.
                Perhaps also in other files with syntax highlighting.

                --
                No engineer can take a shower without wondering if some sort of Teflon coating
                would make showering unnecessary.
                (Scott Adams - The Dilbert principle)

                /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
                \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
              • Bram Moolenaar
                ... That s quite a large range of combinations. That should be helpful. ... OK, thus when someone switches on this option (it s not the default) he knows he
                Message 7 of 10 , Dec 6, 2004
                • 0 Attachment
                  Ciaran McCreesh wrote:

                  > We build with "huge" features and python (2.3.3 and 2.3.4) as an option.
                  > gcc-wise, we're using 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.4.1, 3.4.2 and
                  > 3.4.3. For GTK+ we use 2.4.9 and 2.4.13.

                  That's quite a large range of combinations. That should be helpful.

                  > | My point is that I want to hear about known problems with gcc 3.3.x.
                  >
                  > -funroll-all-loops definitely breaks vim on some systems with "huge"
                  > features and no GUI with (gcc 3.3.2 on amd64 and x86), (gcc 3.3.3 on
                  > sparc and mips) and (gcc 3.3.4 on x86, sparc and mips). It probably
                  > breaks with other combinations too.
                  >
                  > By "breaks", it tends to spew a load of nonsense E412 messages upon
                  > startup and then behave strangely thereafter.

                  OK, thus when someone switches on this option (it's not the default) he
                  knows he got himself into trouble. The problem we started with was much
                  more subtle and looks like a bug in Vim (until you notice the problem
                  disappears when you change -O3 to -O2).

                  > It's definitely the -funroll-all-loops that's to blame, we had a number
                  > of bug reports from users who thought it'd be a good idea to use that
                  > flag globally (please don't ask why, I have absolutely no idea) until we
                  > started filtering the flag for vim builds.

                  It's probably better not to use it at all then. If it breaks Vim it
                  might break something else.

                  > | That's why I was thinking of taking the safe side. "-O2" should be
                  > | enough for Vim, more optimization is unlikely to give a noticable
                  > | effect. A crash is quite nocicable!
                  >
                  > True. On the other hand, I'd expect anyone who goes higher than -O2 to
                  > know that they may have problems.

                  I would not count on it.

                  --
                  Normal people believe that if it ain't broke, don't fix it. Engineers believe
                  that if it ain't broke, it doesn't have enough features yet.
                  (Scott Adams - The Dilbert principle)

                  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                  /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                  \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
                  \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
                • Bram Moolenaar
                  Here is the method that Reinhard Wobst uses to crash Vim with gcc 3.3.1 and the -O3 argument. You can use this to find out if your gcc causes the same
                  Message 8 of 10 , Dec 6, 2004
                  • 0 Attachment
                    Here is the method that Reinhard Wobst uses to crash Vim with gcc 3.3.1
                    and the "-O3" argument. You can use this to find out if your gcc causes
                    the same problems with various optimizer switches on/off.

                    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

                    The file below generates the error when vim6.3 is compiled with
                    gcc3.3.1 (SuSE9.0) and -O3 AND configured with features=big. If
                    you open the file and type "G", vim gets catched in an endless loop.
                    It seems to be in syntax.c all the time. This error does NOT occur
                    if:

                    o vim is compiled with -O2, or
                    o vim is compiled with gcc2.95.3 and -O3 (SuSE8.0), or
                    o vim is compiled with features=normal, or
                    o if you go forward with several ^F and then back, e.g. with "gg".
                    So it could have to do with syntax coloring, but I don't understand
                    why features=big is then necessary to reproduce the error.

                    I have neither knowledge nor time to understand and compare the
                    generated assembly codes, but I found hints in the web that a couple
                    of people had problems with gcc3.3.

                    In private, not so representative test I did not note a big
                    difference between -O2 and -O3. Since vim is not so slow in
                    general (OK, syntax coloring of 1 million lines would be slow :-),
                    the easiest way could be to say "-O2".

                    In an older edition of the German journal "iX" (Heise), a benchmark
                    test of gcc3.3 ended in an endless loop, maybe even during compilation.
                    If I find this item, I can give a reference here.

                    Reinhard Wobst (r dot wobst at gmx dot de)
                    -------------------------------------------------------------------------
                    <html><head><title>WachtelZUCHT.DE - ALLES ÜBER Wachtel</title>

                    <style fprolloverstyle="">A:hover {color: #800000; letter-spacing: 2pt;
                    font-weight: bold}
                    </style>

                    <link rel="stylesheet" type="text/css" href="text_data/style.css">
                    <script>
                    <!--
                    function check()
                    {
                    if (top.location != location)
                    {
                    }
                    else
                    {
                    }
                    }

                    function frame_noframe()
                    {
                    if (top.location != location)
                    {
                    top.location.href = document.location.href
                    }
                    else
                    {
                    top.location="index.html"
                    }
                    }
                    //-->
                    </script>

                    <link rel="stylesheet" type="text/css" href="text_data/style.css"></head>
                    <body onload="check()">



                    <h1 align="center"><b><u><font color="#000000" face="Short Hand"
                    size="7"><i><span style="letter-spacing: 0pt;">WachtelZUCHT</span></i></
                    font></u></b></h1>



                    <h1 align="center"><b><u><font color="#000000" face="Short Hand"
                    size="7"><i><img src="text_data/w1.jpg" border="0" height="205"
                    width="337"></i></font></u></b></h1>



                    <h3 align="center"><strong><font face="Monotype Corsiva" size="5">99 %

                    der bei uns in Legebatterien, Käfigen etc. gehaltenen Wachtel

                    sind Ostasiatische oder Japanische Wachtel ( Coturnix japonica )

                    und nur von dieser Art handelt diese, von einem Hobbyzüchter

                    erstellte, nicht wissenschaftliche Seite.</font></strong></h3>



                    <p id="rotschattig" align="center"><font face="Monotype Corsiva"
                    size="5">Weitere Bilder finden
                    Sie links in der Navigation!</font>


                    </p><p align="center"><font face="Monotype Corsiva" size="5">Der Wachtel ist
                    ursprünglich

                    ein Zugvogel. Früher lebten sie bei uns in Massen, heute braucht

                    man eine tüchtige Portion Glück, einmal einen Wachtel in freier

                    Natur zu Gesicht bekommen, denn es gibt fast keine einheimische,

                    europäische Wachtel (Coturnix coturnix) mehr. </font>



                    </p><p align="center"><font face="Monotype Corsiva" size="5">Bei mir in meiner

                    kleinen Hobbyzucht leben die Wachtel noch größtenteils natürlich,

                    d.h. Bodenhaltung auf Sand, teilweise Stroh und Hobelspänen. Ein

                    großer Auslauf in der geräumigen Voliere steht Sommer wie

                    Winter zu Verfügung. Die Tiere nutzen diesen Auslauf sonderbarer

                    Weise auch im tiefsten Winter, die meisten Wachtel liegen nachts

                    - - auch bei Eis und Schnee - im Freien. Natürlich legen diese

                    Zuchttiere während der Winterpause keine Eier. Aber ab März -

                    April geht's mit gesunden Tieren wieder los. Mittlerweile habe ich, um an

                    frühere Bruteier zu kommen, einen warmen zusätzlichen Innenstall.</font></p>



                    <p align="center"><font face="Monotype Corsiva" size="5">Während der Brut-
                    bzw.

                    der Legeperiode hört man den sonderbaren Ruf des Wachtelhahnes. Naturbruten
                    sind sehr

                    selten, in meiner langjährigen Erfahrung hatte ich noch nie

                    Jungtiere aus Naturbrut. Nach fast genau 17

                    Tagen schlüpfen die ersten Küken im Brutapparat, aber Vorsicht:

                    Manchmal brauchen einzelne Küken auch 20-22 Tage, aber warum ?</font></p>



                    <p align="center"><font face="Monotype Corsiva" size="5">Die nur Hummelgroßen

                    Küken brauchen in den ersten Tagen noch sehr viel Wärme,

                    angefangen bei ca. 37=B0C, dann kann man langsam bis auf 20=B0C nach ca. 14 Tagen

                    senken. Ich benutze für die Wärme einen sogenannten

                    Dunkelstrahler, damit die Tiere nachts ihre Ruhe haben und nicht geblendet
                    werden.</font></p>



                    <p align="center"><font face="Monotype Corsiva" size="5">Als erstes Futter

                    bekommen meine Tiere geringe Mengen an Mohn, dies ist gut zur

                    ersten Darmreinigung - danach Putenstarter - erhältlich in vielen

                    landw. Einkaufsläden. In den ersten Tagen

                    zerkleinere ich dieses Pressfutter noch in einer alten

                    elektrischen Kaffeemühle. Ein hartgekochtes Wachtelei - durchs

                    Gitter gerieben - schadet ebenfalls nicht.</font></p>



                    <p align="center"><font face="Monotype Corsiva" size="5">Sobald die Jungtiere

                    ihr erstes Gefieder haben, ca. 3 Wochen, kommen sie in den

                    Innenstall - ohne Heizung - ab sofort nur noch natürliches

                    =46utter.</font></p>



                    <p align="center"><font face="Monotype Corsiva" size="5">Ich besorge mir im

                    Herbst (Getreideernte) von Landwirten den sog. Ausputz - Abfälle

                    die beim Dreschen des Getreides anfallen. Diese kleine Körner, Sämereien

                    etc. sowie als Leckerbissen noch Wellensittichfutter bekommen

                    meine Tiere zum Fressen, daneben noch manchen Salatkopf aus dem

                    Garten.</font></p>



                    <p align="center"><font face="Monotype Corsiva" size="5">Nach ca. 6 Wochen
                    sind

                    die ersten Hennen schon legebereit, die Hähne werden

                    aussortiert, gesondert gemästet und geschlachtet. Einen guten Onlineshop
                    finden
                    Sie hier:</font></p>



                    <h1 style="border-style: dotted; border-width: 2px;" align="center"><font
                    face="Monotype Corsiva">Alles
                    für die Zucht<br><a href="http://www.friss-mich.info/cgi-bin/shop/front/
                    shop_main.cgi?pid=15" target="_blank"><img src="text_data/friss.gif" alt="Zum
                    friss-mich.de Shop" border="0" height="80" width="400"></a></font></h1>



                    <h1 align="center"><font face="Monotype Corsiva">Wachteleier sind eine

                    besondere Delikatesse.</font></h1>



                    <h1 align="center"><u><font color="#ff0000" face="Monotype Corsiva">Wussten

                    Sie schon, dass . . .</font></u></h1>



                    <p align="center"><font face="Monotype Corsiva" size="5">--> Wachteleier
                    fast
                    cholesterinfrei sind, bei  Hühnereiweißallergie

                    verwendet werden können und einen positiver Einfluss bei

                    Bluthochdruck, Bronchialasthma, Diabetes usw. haben.</font></p>

                    <p align="center"><font face="Monotype Corsiva" size="5">--> Schon die

                    alten Chinesen die Heilwirkung des Wachteleies kannten.</font></p>

                    <p align="center"><font face="Monotype Corsiva" size="5">--> In
                    =46rankreich  sogar Tabletten und Dragees aus getrockneten,

                    geriebenen Wachteleiern auf dem Markt sind.</font></p>



                    <h1 align="center"><strong><u><font color="#ff0000" face="Monotype Corsiva"
                    size="5">Ich
                    esse aber lieber frische Wachteleier</font></u></strong></h1>



                    <p align="center"><font face="Monotype Corsiva" size="5">3-4 Minuten gekocht -
                    dabei Eier
                    anstechen und von der Spitze aus schälen, weil's leichter

                    geht - oder auch als Spiegelei ein Genuss!</font></p>



                    <p align="center"><font face="Monotype Corsiva" size="5">Bei weiteren Fragen
                    schreiben
                    Sie mir doch bitte eine E-Mail, der Link dazu ist im Menü links zu finden!</
                    font></p>



                    <p align="center"> </p>



                    </body></html>
                    -------------------------------------------------------------------------

                    --
                    The average life of an organization chart is six months. You can safely
                    ignore any order from your boss that would take six months to complete.
                    (Scott Adams - The Dilbert principle)

                    /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                    /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                    \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
                    \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
                  Your message has been successfully submitted and would be delivered to recipients shortly.