Re: [LyX/master] Fix compilation with gcc-12

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

> On Thursday, 27 January 2022 15.44.56 WET José Abílio Matos wrote:
> > The previous patch was all that it was required to compile lyx-2.4 with
> > gcc-12. :-)
> 
> But then it does not run:
> 
> $ src/lyx
> src/lyx: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required 
> by src/lyx)
> 
> it is not using the new library. Is there any flag that can be passed to 
> configure to account for this?
> 
> I can always run it as:
> 
> $ LD_LIBRARY_PATH=/ src/lyx
> 
> and it works...

Proposing to add file 'i686-linux-gnu-gcc-something.conf' to 
'/etc/ld.so.conf.d/'
with content
/opt/gcc-latest/lib64

and then use
  $ sudo ldconfig

Kornel


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


Re: [LyX/master] Fix compilation with gcc-12

2022-01-27 Thread José Abílio Matos
On Thursday, 27 January 2022 15.44.56 WET José Abílio Matos wrote:
> The previous patch was all that it was required to compile lyx-2.4 with
> gcc-12. :-)

But then it does not run:

$ src/lyx
src/lyx: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required 
by src/lyx)

it is not using the new library. Is there any flag that can be passed to 
configure to account for this?

I can always run it as:

$ LD_LIBRARY_PATH=/opt/gcc-latest/lib64/ src/lyx

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


Re: [LyX/master] Fix compilation with gcc-12

2022-01-27 Thread José Abílio Matos
On Thursday, 27 January 2022 15.06.43 WET José Matos wrote:
> commit b73ab0256d113571174fed4b2a3405fe8c44d297
> Author: José Matos 
> Date:   Thu Jan 27 15:37:45 2022 +
> 
> Fix compilation with gcc-12
> ---
>  src/insets/InsetListings.cpp |1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/src/insets/InsetListings.cpp b/src/insets/InsetListings.cpp
> index 57df06e..67a0462 100644
> --- a/src/insets/InsetListings.cpp
> +++ b/src/insets/InsetListings.cpp
> @@ -41,6 +41,7 @@
>  #include "frontends/alert.h"
>  #include "frontends/Application.h"
> 
> +#include 
>  #include 
>  #include 

@Riki (or any other Fedora user), in case you are interested, this is my work 
flow:

Install gcc-latest from copr:
https://copr.fedorainfracloud.org/coprs/jwakely/gcc-latest/

Configure lyx to use it:

$ configure --with-version-suffix=-devel 
CC=/opt/gcc-latest/bin/gcc CXX=/opt/gcc-latest/bin/g++

And that is it. :-)

The previous patch was all that it was required to compile lyx-2.4 with gcc-12. 
:-)
-- 
José Abílio-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel