Re: Failure to compile with gcc-12 (2.3.x)

2022-05-14 Thread Jürgen Spitzmüller
Am Donnerstag, dem 03.02.2022 um 17:06 + schrieb José Abílio Matos:
> The changes were minimal and already referred here.
> 
> It was enough to patch two files. The equivalent patch is already
> applied to the devel branch.

Just to confirm: OpenSuse Tumbleweed pushed gcc 12 on me today. I got
the same error while compiling stable, this patch cures it.

I think you should commit.

-- 
Jürgen


signature.asc
Description: This is a digitally signed message part
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-02-03 Thread Scott Kostyshak
On Thu, Feb 03, 2022 at 05:04:29PM +, José Abílio Matos wrote:
> On Thursday, 27 January 2022 13.09.09 WET Scott Kostyshak wrote:
> > Except for that issue does it build with -Werror ?
> > 
> > Scott
> 
> For completeness sake, since this was answered before, it follows here an 
> example of the output that you can expect when building lyx with gcc-12. In 
> this case I am still building the stable branch (2.3.x):
> 
> https://kojipkgs.fedoraproject.org//work/tasks/2847/82342847/build.log

Good to know, thanks.

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-02-03 Thread José Abílio Matos
On Thursday, 27 January 2022 13.04.12 WET José Abílio Matos wrote:
> Hi,
> 
>   we are at the time of year again. :-)
> 
> 
> The gcc project will release version 12 and in Fedora we are rebuilding all
> packages with it.

The changes were minimal and already referred here.

It was enough to patch two files. The equivalent patch is already applied to 
the devel branch.

-- 
José Abíliodiff -ur lyx-2.3.6.1.orig/src/insets/InsetListings.cpp lyx-2.3.6.1/src/insets/InsetListings.cpp
--- lyx-2.3.6.1.orig/src/insets/InsetListings.cpp	2020-12-29 16:50:45.0 +
+++ lyx-2.3.6.1/src/insets/InsetListings.cpp	2022-02-03 16:22:37.983196716 +
@@ -44,6 +44,7 @@
 
 #include "support/regex.h"
 
+#include 
 #include 
 
 using namespace std;
Only in lyx-2.3.6.1/src/insets: InsetListings.cpp~
diff -ur lyx-2.3.6.1.orig/src/lyxfind.cpp lyx-2.3.6.1/src/lyxfind.cpp
--- lyx-2.3.6.1.orig/src/lyxfind.cpp	2020-12-29 16:50:45.0 +
+++ lyx-2.3.6.1/src/lyxfind.cpp	2022-02-03 16:01:54.997152176 +
@@ -52,6 +52,7 @@
 #include "support/lstrings.h"
 
 #include "support/regex.h"
+#include 
 
 using namespace std;
 using namespace lyx::support;
Only in lyx-2.3.6.1/src: lyxfind.cpp~
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-02-03 Thread José Abílio Matos
On Thursday, 27 January 2022 13.09.09 WET Scott Kostyshak wrote:
> Except for that issue does it build with -Werror ?
> 
> Scott

For completeness sake, since this was answered before, it follows here an 
example of the output that you can expect when building lyx with gcc-12. In 
this case I am still building the stable branch (2.3.x):

https://kojipkgs.fedoraproject.org//work/tasks/2847/82342847/build.log

Best regards,
-- 
José Abílio


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-01-31 Thread José Abílio Matos
On Thursday, 27 January 2022 13.52.56 WET Jean-Marc Lasgouttes wrote:
> José, what can you tell me about these messages?
> annobin: Timeout.cpp: Warning: -D_GLIBCXX_ASSERTIONS not defined
> 
> We use _GLIBCXX_DEBUG currently. Should we switch to
> _GLIBCXX_ASSERTIONS? I have not found the gcc docs very useful in this
> respect.
> 
> JMarc

I think that this is bug in annobin that was fixed meanwhile. So this can be 
ignored since it is not our fault. :-)

-- 
José Abílio


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-01-27 Thread Scott Kostyshak
On Thu, Jan 27, 2022 at 03:07:25PM +, José Abílio Matos wrote:
> On Thursday, 27 January 2022 13.09.09 WET Scott Kostyshak wrote:
> > Except for that issue does it build with -Werror ?
> > 
> > Scott
> 
> As Jean-Marc said the compilation has lots of warnings. Some of them are not 
> our fault, so I am not sure if it is possible to filter system warnings from -
> Werror. :-)

Does 2.4.0dev compile with -Werror? What are the system warnings? Do you
mean things like hunspell that we bundle?

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-01-27 Thread Kornel Benko
Am Thu, 27 Jan 2022 16:22:18 +
schrieb José Abílio Matos :

> On Thursday, 27 January 2022 15.48.33 WET Kornel Benko wrote:
> > This one may be needed for 2.4.0 version of lyxfind.cpp too.
> 
> You are right but for some reason I got away without this fix, only the 
> cstring of the other thread. (BTW I am puzzled) The reason could be some 
> change in the code between 2.3 and 2.4 but for the moment I am leaving this 
> out.

If you compare the 2 files, you will encounter MANY differences :)

Kornel


pgpukFl9Cm5lp.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-01-27 Thread José Abílio Matos
On Thursday, 27 January 2022 15.48.33 WET Kornel Benko wrote:
> This one may be needed for 2.4.0 version of lyxfind.cpp too.

You are right but for some reason I got away without this fix, only the 
cstring of the other thread. (BTW I am puzzled) The reason could be some 
change in the code between 2.3 and 2.4 but for the moment I am leaving this 
out.
-- 
José Abílio-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-01-27 Thread Kornel Benko
Am Thu, 27 Jan 2022 15:05:34 +
schrieb José Abílio Matos :

> lyxfind.cpp:55:1: note: 'std::ostream_iterator' is defined in header 
> ''; did
> you forget to '#include '?
> 
>    54 | #include "support/regex.h"
> 
>   +++ |+#include 
> 
>    55 |

This one may be needed for 2.4.0 version of lyxfind.cpp too.

Kornel


pgpldx2tbTzwL.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-01-27 Thread José Abílio Matos
On Thursday, 27 January 2022 13.09.09 WET Scott Kostyshak wrote:
> Except for that issue does it build with -Werror ?
> 
> Scott

As Jean-Marc said the compilation has lots of warnings. Some of them are not 
our fault, so I am not sure if it is possible to filter system warnings from -
Werror. :-)

-- 
José Abílio-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-01-27 Thread José Abílio Matos
On Thursday, 27 January 2022 13.52.56 WET Jean-Marc Lasgouttes wrote:
> This one is a warning, but you cut part of it out.

For complete sake the complete diagnose (warnings and errors) is here:

make[4]: Entering directory '/builddir/build/BUILD/lyx-2.3.6.1/src'
g++ -DHAVE_CONFIG_H -I. -I..  -I../src-I/usr/include/enchant 
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 
-pthread  -I/usr/include/hunspell   -DQT_NO_STL -DQT_NO_KEYWORDS -DQT_CORE_LIB 
-I/usr/include/qt5/QtCore -I/usr/include/qt5   -fPIC -O2 -flto=auto 
-ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall 
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic 
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection 
-std=c++14  -std=c++14  -O2 -flto=auto -ffat-lto-objects -fexceptions -g 
-grecord-gcc-switches -pipe -Wall -Werror=format-security 
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS 
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic 
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -c -o 
lyxfind.o lyxfind.cpp
lyxfind.cpp: warning: -D_FORTIFY_SOURCE not defined
annobin: lyxfind.cpp: Warning: -D_GLIBCXX_ASSERTIONS not defined
lyxfind.cpp:73:28: warning: 'template 
struct std::binary_function' is deprecated [-Wdeprecated-declarations]
   73 | class MatchString : public binary_function
  |^~~
In file included from /usr/include/c++/12/string:48,
 from support/strfwd.h:42,
 from lyxfind.h:19,
 from lyxfind.cpp:17:
/usr/include/c++/12/bits/stl_function.h:131:12: note: declared here
  131 | struct binary_function
  |^~~
lyxfind.cpp: In function 'bool lyx::{anonymous}::regex_replace(const 
std::string&, std::string&, const std::string&, const std::string&)':
lyxfind.cpp:677:9: error: 'ostream_iterator' was not declared in this scope
  677 | ostream_iterator it(oss);
  | ^~~~
lyxfind.cpp:55:1: note: 'std::ostream_iterator' is defined in header 
''; did you forget to '#include '?
   54 | #include "support/regex.h"
  +++ |+#include 
   55 | 
lyxfind.cpp:677:26: error: expected primary-expression before 'char'
  677 | ostream_iterator it(oss);
  |  ^~~~
lyxfind.cpp:678:28: error: 'it' was not declared in this scope; did you mean 
't'?
  678 | lyx::regex_replace(it, s.begin(), s.end(), e, replacestr);
  |^~
  |t
-- 
José Abílio-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-01-27 Thread Jean-Marc Lasgouttes

Le 27/01/2022 à 14:09, Scott Kostyshak a écrit :

On Thu, Jan 27, 2022 at 01:04:12PM +, José Abílio Matos wrote:

Hi,
   we are at the time of year again. :-)

The gcc project will release version 12 and in Fedora we are rebuilding all
packages with it.

There is a failure to build 2.3.x (e.g. on x86-54):
https://kojipkgs.fedoraproject.org//work/tasks/4412/81984412/build.log

73 | class MatchString : public binary_function


This one is a warning, but you cut part of it out.


   |^~~
In file included from /usr/include/c++/12/string:48,
  from support/strfwd.h:42,
  from lyxfind.h:19,
  from lyxfind.cpp:17:
/usr/include/c++/12/bits/stl_function.h:131:12: note: declared here
   131 | struct binary_function
   |^~~
lyxfind.cpp: In function 'bool lyx::{anonymous}::regex_replace(const std::string&, 
std::string&, const std::string&, const std::string&)':
lyxfind.cpp:677:9: error: 'ostream_iterator' was not declared in this scope
   677 | ostream_iterator it(oss);
   | ^~~~
lyxfind.cpp:55:1: note: 'std::ostream_iterator' is defined in header ''; 
did you forget to '#include '?
54 | #include "support/regex.h"
   +++ |+#include 


Yes, sure.


Except for that issue does it build with -Werror ?


2.3.6 has many deprecation errors. Many of them are fixed in branch 
2.3.x, but not all.


And it seems there are some new warnings. Let's see what happens with 
our current branches.


José, what can you tell me about these messages?
annobin: Timeout.cpp: Warning: -D_GLIBCXX_ASSERTIONS not defined

We use _GLIBCXX_DEBUG currently. Should we switch to 
_GLIBCXX_ASSERTIONS? I have not found the gcc docs very useful in this 
respect.


JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Failure to compile with gcc-12 (2.3.x)

2022-01-27 Thread Scott Kostyshak
On Thu, Jan 27, 2022 at 01:04:12PM +, José Abílio Matos wrote:
> Hi,
>   we are at the time of year again. :-)
> 
> The gcc project will release version 12 and in Fedora we are rebuilding all 
> packages with it.
> 
> There is a failure to build 2.3.x (e.g. on x86-54):
> https://kojipkgs.fedoraproject.org//work/tasks/4412/81984412/build.log
> 
>73 | class MatchString : public binary_function
>   |^~~
> In file included from /usr/include/c++/12/string:48,
>  from support/strfwd.h:42,
>  from lyxfind.h:19,
>  from lyxfind.cpp:17:
> /usr/include/c++/12/bits/stl_function.h:131:12: note: declared here
>   131 | struct binary_function
>   |^~~
> lyxfind.cpp: In function 'bool lyx::{anonymous}::regex_replace(const 
> std::string&, std::string&, const std::string&, const std::string&)':
> lyxfind.cpp:677:9: error: 'ostream_iterator' was not declared in this scope
>   677 | ostream_iterator it(oss);
>   | ^~~~
> lyxfind.cpp:55:1: note: 'std::ostream_iterator' is defined in header 
> ''; did you forget to '#include '?
>54 | #include "support/regex.h"
>   +++ |+#include 
>55 | 
> lyxfind.cpp:677:26: error: expected primary-expression before 'char'
>   677 | ostream_iterator it(oss);
>   |  ^~~~
> lyxfind.cpp:678:28: error: 'it' was not declared in this scope; did you mean 
> 't'?
>   678 | lyx::regex_replace(it, s.begin(), s.end(), e, replacestr);
>   |^~
>   |t
> This seems an example of a missing include, and g++ even suggests to add:
> #include 
> 
> Is there are better fix or is this OK?
> 
> I will start to build 2.4 with g++-12 as well FWIW.

Except for that issue does it build with -Werror ?

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Failure to compile with gcc-12 (2.3.x)

2022-01-27 Thread José Abílio Matos
Hi,
  we are at the time of year again. :-)

The gcc project will release version 12 and in Fedora we are rebuilding all 
packages with it.

There is a failure to build 2.3.x (e.g. on x86-54):
https://kojipkgs.fedoraproject.org//work/tasks/4412/81984412/build.log

   73 | class MatchString : public binary_function
  |^~~
In file included from /usr/include/c++/12/string:48,
 from support/strfwd.h:42,
 from lyxfind.h:19,
 from lyxfind.cpp:17:
/usr/include/c++/12/bits/stl_function.h:131:12: note: declared here
  131 | struct binary_function
  |^~~
lyxfind.cpp: In function 'bool lyx::{anonymous}::regex_replace(const 
std::string&, std::string&, const std::string&, const std::string&)':
lyxfind.cpp:677:9: error: 'ostream_iterator' was not declared in this scope
  677 | ostream_iterator it(oss);
  | ^~~~
lyxfind.cpp:55:1: note: 'std::ostream_iterator' is defined in header 
''; did you forget to '#include '?
   54 | #include "support/regex.h"
  +++ |+#include 
   55 | 
lyxfind.cpp:677:26: error: expected primary-expression before 'char'
  677 | ostream_iterator it(oss);
  |  ^~~~
lyxfind.cpp:678:28: error: 'it' was not declared in this scope; did you mean 
't'?
  678 | lyx::regex_replace(it, s.begin(), s.end(), e, replacestr);
  |^~
  |t
This seems an example of a missing include, and g++ even suggests to add:
#include 

Is there are better fix or is this OK?

I will start to build 2.4 with g++-12 as well FWIW.

Best regards,
-- 
José Abílio-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel