Re: Build errors with GCC 14
Jeffrey Kingston <[email protected]> Sat, 18 May 2024 21:26:33 +0000
| Newsgroups | gmane.comp.type-setting.lout |
|---|---|
| Message-ID | <SYCPR01MB3983CF6BC94791FA79F0E376C4EF2@SYCPR01MB3983.ausprd01.prod.outlook.com> |
--_000_SYCPR01MB3983CF6BC94791FA79F0E376C4EF2SYCPR01MB3983ausp_ Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Dear Matej, I'm afraid I know nothing about distros. But last year I upgraded my computer and I found that I had to do some patching to get Lout to compile (I still use Lout every day). I think gcc had taken to counting the number of characters that sprintf writes into buffers, and complaining when it couldn't be sure that the buffers were long enough to hold them. Anyway I conscientiously fixed all the errors and got it down to a clean compile or something close. I'm ashamed to say that it did not even cross my mind that others might need to do the same thing. I'm not interested in doing any detailed work but I would be happy to send you these files that I've got: -rw-r--r-- 1 jeff jeff 2172651 Jun 11 2023 lout-3.40.tar.gz -rw-r--r-- 1 jeff jeff 829862 Jun 11 2023 lout-3.40-user.ps.gz -rw-rw-r-- 1 jeff jeff 2176158 Jun 19 2023 lout-3.41.tar.gz -rw-rw-r-- 1 jeff jeff 829823 Jun 18 2023 lout-3.41-user.ps.gz It looks as though I bought the new computer in June last year and got around to getting Lout to work on it about a week later. Jeff Kingston ps I have done absolutely no tinkering with Lout's functionality. ________________________________ From: [email protected] on behalf of Greg= A. Woods Sent: Sunday, May 19, 2024 6:07 AM To: Mat=ECj Cepl Cc: Lout Mailing List Subject: Re: Build errors with GCC 14 At Sat, 18 May 2024 18:09:33 +0200, Mat=ECj Cepl <[email protected]> wrote: Subject: Build errors with GCC 14 > > I am maintaining Lout for OpenSUSE distros, and we are currently > in the process of preparation for the switch to GCC 14 [1], which > has much more stringent checks on the code and many things were > before just warnings are now build errors ([2] and [3]). When > build in the experiemental project [4] it produces number of > errors and the build fails [5] I would strongly recommend using '--std=3Dc99' (or as necessary '--std=3Dc89') to compile older code with a newer compiler such as GCC-14. It also wouldn't be wrong to add '-fpermissive' as well. The code was written to an older standard so don't try to foist new language features on it without very careful consideration! You really don't have to fix innocuous warnings just because the compiler now defaults to a newer language standard that's not entirely backwards compatible. Of course real bugs should be fixed and reported. Note too that Lout's makefile has long specified '-ansi', which is of course equivalent to '--std=3Dc89', along with '-pedantic'. That said perhaps you haven't noticed the latest release from June of last year that fixes all warnings (though I've found it needs to be adjusted to use '--std=3Dc99' instead of '-ansi'): http://jeffreykingston.id.au/lout/ http://jeffreykingston.id.au/lout/lout-3.41.tar.gz nThere's also William Bader's work to clean up warnings and make some fixes: https://github.com/william8000/lout/ I would like to see him rebase any of his changes still "necessary" onto Jeff's 3.41 though before recommending it wholeheartedly. -- Greg A. Woods <[email protected]> Kelowna, BC +1 250 762-7675 RoboHack <[email protected]> Planix, Inc. <[email protected]> Avoncote Farms <[email protected]> --_000_SYCPR01MB3983CF6BC94791FA79F0E376C4EF2SYCPR01MB3983ausp_ Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable <html> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-= 2"> <style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo= ttom:0;} </style> </head> <body dir=3D"ltr"> <div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo= nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c= olor: rgb(0, 0, 0);"> Dear Matej,</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> I'm afraid I know nothing about distros. But last year I</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> upgraded my computer and I found that I had to do some</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> patching to get Lout to compile (I still use Lout every day).</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> I think gcc had taken to counting the number of characters</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> that sprintf writes into buffers, and complaining when it</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> couldn't be sure that the buffers were long enough to hold</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> them. Anyway I conscientiously fixed all the errors and got</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> it down to a clean compile or something close. I'm ashamed</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> to say that it did not even cross my mind that others might</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> need to do the same thing.</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> I'm not interested in doing any detailed work but I would be</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> happy to send you these files that I've got:</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> -rw-r--r-- 1 jeff jeff 2172651 Jun 11 2023 lout-3.40.tar.gz</di= v> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> -rw-r--r-- 1 jeff jeff 829862 Jun 11 2023 lout-3.40-user.= ps.gz</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> -rw-rw-r-- 1 jeff jeff 2176158 Jun 19 2023 lout-3.41.tar.gz</di= v> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> -rw-rw-r-- 1 jeff jeff 829823 Jun 18 2023 lout-3.41-user.= ps.gz</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> It looks as though I bought the new computer in June last year</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> and got around to getting Lout to work on it about a week later.</div> <div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, = Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"> <br> </div> <div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo= nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c= olor: rgb(0, 0, 0);"> Jeff Kingston</div> <div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo= nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c= olor: rgb(0, 0, 0);"> <br> </div> <div class=3D"elementToProof" style=3D"font-family: Aptos, Aptos_EmbeddedFo= nt, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; c= olor: rgb(0, 0, 0);"> ps I have done absolutely no tinkering with Lout's functionality.</div> <div id=3D"appendonsend"></div> <div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size= : 12pt; color: rgb(0, 0, 0);"> <br> </div> <hr style=3D"display: inline-block; width: 98%;"> <span style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-siz= e: 12pt; color: rgb(0, 0, 0);"><b>From:</b> lout-users-bounces+jeff=3D= [email protected] on behalf of Greg A. Woods<br> <b>Sent:</b> Sunday, May 19, 2024 6:07 AM<br> <b>To:</b> Mat=ECj Cepl<br> <b>Cc:</b> Lout Mailing List<br> <b>Subject:</b> Re: Build errors with GCC 14 </span> <div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size= : 12pt; color: rgb(0, 0, 0);"> <br> </div> <div style=3D"font-size: 11pt;">At Sat, 18 May 2024 18:09:33 +0200, Mat=ECj= Cepl <[email protected]> wrote:<br> Subject: Build errors with GCC 14<br> ><br> > I am maintaining Lout for OpenSUSE distros, and we are currently<br> > in the process of preparation for the switch to GCC 14 [1], which<br> > has much more stringent checks on the code and many things were<br> > before just warnings are now build errors ([2] and [3]). When<br> > build in the experiemental project [4] it produces number of<br> > errors and the build fails [5]<br> <br> I would strongly recommend using '--std=3Dc99' (or as necessary<br> '--std=3Dc89') to compile older code with a newer compiler such as GCC-14.<= br> <br> It also wouldn't be wrong to add '-fpermissive' as well.<br> <br> The code was written to an older standard so don't try to foist new<br> language features on it without very careful consideration!<br> <br> You really don't have to fix innocuous warnings just because the<br> compiler now defaults to a newer language standard that's not entirely<br> backwards compatible.<br> <br> Of course real bugs should be fixed and reported.<br> <br> Note too that Lout's makefile has long specified '-ansi', which is of<br> course equivalent to '--std=3Dc89', along with '-pedantic'.<br> <br> That said perhaps you haven't noticed the latest release from June of<br> last year that fixes all warnings (though I've found it needs to be<br> adjusted to use '--std=3Dc99' instead of '-ansi'):<br> <br> <a href=3D"http://jeffreykingston.id.au/lout/" tar= get=3D"_blank" id=3D"OWAb0dc047e-b0ee-fe7e-63e2-53ee47657bab" class=3D"OWAA= utoLink" rel=3D"noopener noreferrer" data-auth=3D"NotApplicable" data-loops= tyle=3D"linkonly"> http://jeffreykingston.id.au/lout/</a><br> <a href=3D"http://jeffreykingston.id.au/lout/lout-= 3.41.tar.gz" target=3D"_blank" id=3D"OWAd8fc2a22-33a0-9548-bcd7-30e00ad2f38= a" class=3D"OWAAutoLink" rel=3D"noopener noreferrer" data-auth=3D"NotApplic= able" data-loopstyle=3D"linkonly"> http://jeffreykingston.id.au/lout/lout-3.41.tar.gz</a><br> <br> nThere's also William Bader's work to clean up warnings and make some<br> fixes:<br> <br> &nb= sp; <a href=3D"https://github.com/william8000/lout/" target=3D"_blank" id= =3D"OWAfeb8e811-2c8d-a88a-3e71-c9c7bac6c01d" class=3D"OWAAutoLink" rel=3D"n= oopener noreferrer" data-auth=3D"NotApplicable" data-loopstyle=3D"linkonly"= > https://github.com/william8000/lout/</a><br> <br> I would like to see him rebase any of his changes still "necessary&quo= t; onto<br> Jeff's 3.41 though before recommending it wholeheartedly.<br> <br> --<br> &nb= sp; = &nb= sp; Greg A. Woods <[email protected]><br> <br> Kelowna, BC +1 250 762-7675 = RoboHack <[email protected]><br> Planix, Inc. <[email protected]> Avoncote Farm= s <[email protected]><br> </div> </body> </html> --_000_SYCPR01MB3983CF6BC94791FA79F0E376C4EF2SYCPR01MB3983ausp_--