Re: Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
On Tuesday 12 May 2015 21:32:23 Georg Baum wrote: Thanks to you and Kornel for testing. José, depending on how urgent this is you can now either include a local patch in fedora or wait for LyX 2.1.4. Georg Thank you Georg, this fix is for rawhide, that is planned to be released as Fedora 23, on November. Even with our schedule 2.1.4 should be out at that time (and hopefully 2.2.0 as well). :-) :-D Fedora 22 that will be released this month ships with gcc 5.1 but with the old ABI so it is not affected. Again thank you for you thoroughly fix. Regards, -- José Abílio
Re: Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
On Tuesday 12 May 2015 21:32:23 Georg Baum wrote: > Thanks to you and Kornel for testing. > > José, depending on how urgent this is you can now either include a local > patch in fedora or wait for LyX 2.1.4. > > > Georg Thank you Georg, this fix is for rawhide, that is planned to be released as Fedora 23, on November. Even with our schedule 2.1.4 should be out at that time (and hopefully 2.2.0 as well). :-) :-D Fedora 22 that will be released this month ships with gcc 5.1 but with the old ABI so it is not affected. Again thank you for you thoroughly fix. Regards, -- José Abílio
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Jean-Marc Lasgouttes wrote: Le 10/05/2015 18:29, Georg Baum a écrit : Sorry, I should have tried before asking. Of course there were not all needed backports done yet. The attached version is the minimal I could find. I had include the removal of LYX_PROG_CXX_WORKS, otherwise autoconf would complain about expanding a macro before requiring it: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required I tested the automake part with clang 3.5, gcc 4.9 and gcc 5.1. cmake was only tested with gcc 4.9 (since it is moee similar to master) On the older side (Ubuntu 12.04), I tried gcc 4.6 and clang 3.0 and they still work (even in C++0x mode :). I'd say that you can put it in. Thanks to you and Kornel for testing. José, depending on how urgent this is you can now either include a local patch in fedora or wait for LyX 2.1.4. Georg
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Le 10/05/2015 18:29, Georg Baum a écrit : Sorry, I should have tried before asking. Of course there were not all needed backports done yet. The attached version is the minimal I could find. I had include the removal of LYX_PROG_CXX_WORKS, otherwise autoconf would complain about expanding a macro before requiring it: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required I tested the automake part with clang 3.5, gcc 4.9 and gcc 5.1. cmake was only tested with gcc 4.9 (since it is moee similar to master) On the older side (Ubuntu 12.04), I tried gcc 4.6 and clang 3.0 and they still work (even in C++0x mode :). I'd say that you can put it in. JMarc
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Le 10/05/2015 18:29, Georg Baum a écrit : Sorry, I should have tried before asking. Of course there were not all needed backports done yet. The attached version is the minimal I could find. I had include the removal of LYX_PROG_CXX_WORKS, otherwise autoconf would complain about expanding a macro before requiring it: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required I tested the automake part with clang 3.5, gcc 4.9 and gcc 5.1. cmake was only tested with gcc 4.9 (since it is moee similar to master) On the older side (Ubuntu 12.04), I tried gcc 4.6 and clang 3.0 and they still work (even in C++0x mode :). I'd say that you can put it in. JMarc
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Jean-Marc Lasgouttes wrote: > Le 10/05/2015 18:29, Georg Baum a écrit : >> Sorry, I should have tried before asking. Of course there were not all >> needed backports done yet. The attached version is the minimal I could >> find. >> >> I had include the removal of LYX_PROG_CXX_WORKS, otherwise autoconf would >> complain about expanding a macro before requiring it: >> http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required >> >> I tested the automake part with clang 3.5, gcc 4.9 and gcc 5.1. cmake was >> only tested with gcc 4.9 (since it is moee similar to master) > > On the older side (Ubuntu 12.04), I tried gcc 4.6 and clang 3.0 and they > still work (even in C++0x mode :). > > I'd say that you can put it in. Thanks to you and Kornel for testing. José, depending on how urgent this is you can now either include a local patch in fedora or wait for LyX 2.1.4. Georg
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Am Sonntag, 10. Mai 2015 um 18:29:37, schrieb Georg Baum georg.b...@post.rwth-aachen.de Jean-Marc Lasgouttes wrote: Le 10/05/2015 10:24, Georg Baum a écrit : Richard Heck wrote: This is fine for branch if the people who understand this stuff (not me) think it is. Jean-Marc, Kornel, do I have your OK? I cannot test it (or I am too lazy to see whether I can install gcc 5), but it looks good. I am lazy too, but when gcc 4.1 was new I used to compile gcc on a regular basis, and the script from that time does still work (including getting the sources from svn), so it was not much work. Did we already backport the other related things to branch? Sorry, I should have tried before asking. Of course there were not all needed backports done yet. The attached version is the minimal I could find. I had include the removal of LYX_PROG_CXX_WORKS, otherwise autoconf would complain about expanding a macro before requiring it: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required I tested the automake part with clang 3.5, gcc 4.9 and gcc 5.1. cmake was only tested with gcc 4.9 (since it is moee similar to master) Still OK? Georg I succeeded to compile gcc5.1. Then tried to compile lyx with this new gcc. Everything went OK for cmake (master). So, I think the cmake part is OK for branch too. Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Le 10/05/2015 10:24, Georg Baum a écrit : Richard Heck wrote: This is fine for branch if the people who understand this stuff (not me) think it is. Jean-Marc, Kornel, do I have your OK? I cannot test it (or I am too lazy to see whether I can install gcc 5), but it looks good. Did we already backport the other related things to branch? JMarc
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Kornel Benko wrote: I am excited! I was about to make the needed changes for cmake, but you already have done it. Nice. If possible I try to adapt cmake, but I have to admit that I do not succeed very often. The syntax looks so strange to my eyes. Georg
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Richard Heck wrote: This is fine for branch if the people who understand this stuff (not me) think it is. Jean-Marc, Kornel, do I have your OK? I'm sure we need it there, since people will want to build LyX with these tools. Yes. Georg
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Am Sonntag, 10. Mai 2015 um 10:24:16, schrieb Georg Baum georg.b...@post.rwth-aachen.de Richard Heck wrote: This is fine for branch if the people who understand this stuff (not me) think it is. Jean-Marc, Kornel, do I have your OK? I'm sure we need it there, since people will want to build LyX with these tools. Yes. Georg Yes. Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Jean-Marc Lasgouttes wrote: Le 10/05/2015 10:24, Georg Baum a écrit : Richard Heck wrote: This is fine for branch if the people who understand this stuff (not me) think it is. Jean-Marc, Kornel, do I have your OK? I cannot test it (or I am too lazy to see whether I can install gcc 5), but it looks good. I am lazy too, but when gcc 4.1 was new I used to compile gcc on a regular basis, and the script from that time does still work (including getting the sources from svn), so it was not much work. Did we already backport the other related things to branch? Sorry, I should have tried before asking. Of course there were not all needed backports done yet. The attached version is the minimal I could find. I had include the removal of LYX_PROG_CXX_WORKS, otherwise autoconf would complain about expanding a macro before requiring it: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required I tested the automake part with clang 3.5, gcc 4.9 and gcc 5.1. cmake was only tested with gcc 4.9 (since it is moee similar to master) Still OK? Georgdiff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 61ea48d..a0094c1 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -120,37 +120,65 @@ done ])dnl -AC_DEFUN([LYX_PROG_CXX_WORKS], -[rm -f conftest.C -cat conftest.C EOF -class foo { - // we require the mutable keyword - mutable int bar; - }; - // we require namespace support - namespace baz { - int bar; - } - int main() { - return(0); - } -EOF -$CXX -c $CXXFLAGS $CPPFLAGS conftest.C 5 || CXX= -rm -f conftest.C conftest.o conftest.obj || true +dnl Usage: LYX_PROG_CLANG: set lyx_cv_prog_clang to yes if the compiler is clang. +AC_DEFUN([LYX_PROG_CLANG], +[AC_CACHE_CHECK([whether the compiler is clang], + [lyx_cv_prog_clang], +[AC_TRY_COMPILE([], [ +#ifndef __clang__ + this is not clang +#endif +], +[lyx_cv_prog_clang=yes ; CLANG=yes], [lyx_cv_prog_clang=no ; CLANG=no])]) ]) -AC_DEFUN([LYX_PROG_CXX], -[AC_MSG_CHECKING([for a good enough C++ compiler]) -LYX_SEARCH_PROG(CXX, $CXX $CCC g++ gcc c++ CC cxx xlC cc++, [LYX_PROG_CXX_WORKS]) +dnl Usage: LYX_LIB_STDCXX: set lyx_cv_lib_stdcxx to yes if the STL library is libstdc++. +AC_DEFUN([LYX_LIB_STDCXX], +[AC_CACHE_CHECK([whether STL is libstdc++], + [lyx_cv_lib_stdcxx], +[AC_TRY_COMPILE([#includevector], [ +#if ! defined(__GLIBCXX__) ! defined(__GLIBCPP__) + this is not libstdc++ +#endif +], +[lyx_cv_lib_stdcxx=yes], [lyx_cv_lib_stdcxx=no])]) +]) -if test -z $CXX ; then - AC_MSG_ERROR([Unable to find a good enough C++ compiler]) -fi -AC_MSG_RESULT($CXX) -AC_PROG_CXX -AC_PROG_CXXCPP +dnl Usage: LYX_LIB_STDCXX_CXX11_ABI: set lyx_cv_lib_stdcxx_cxx11_abi to yes +dnlif the STL library is GNU libstdc++ and the C++11 ABI is used. +AC_DEFUN([LYX_LIB_STDCXX_CXX11_ABI], +[AC_CACHE_CHECK([whether STL is libstdc++ using the C++11 ABI], + [lyx_cv_lib_stdcxx_cxx11_abi], +[AC_TRY_COMPILE([#includevector], [ +#if ! defined(_GLIBCXX_USE_CXX11_ABI) || ! _GLIBCXX_USE_CXX11_ABI + this is not libstdc++ using the C++11 ABI +#endif +], +[lyx_cv_lib_stdcxx_cxx11_abi=yes], [lyx_cv_lib_stdcxx_cxx11_abi=no])]) +]) + + +AC_DEFUN([LYX_PROG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([AC_PROG_CXXCPP]) + +AC_LANG_PUSH(C++) +LYX_PROG_CLANG +LYX_LIB_STDCXX +LYX_LIB_STDCXX_CXX11_ABI +AC_LANG_POP(C++) + +if test $lyx_cv_lib_stdcxx = yes ; then + if test $lyx_cv_lib_stdcxx_cxx11_abi = yes ; then +AC_DEFINE(USE_GLIBCXX_CXX11_ABI, 1, [use GNU libstdc++ with C++11 ABI]) + fi +else + if test $lyx_cv_prog_clang = yes ; then +AC_DEFINE(USE_LLVM_LIBCPP, 1, [use libc++ provided by llvm instead of GNU libstdc++]) + fi +fi ### We might want to get or shut warnings. AC_ARG_ENABLE(warnings, diff --git a/development/cmake/ConfigureChecks.cmake b/development/cmake/ConfigureChecks.cmake index 71291a5..a738160 100644 --- a/development/cmake/ConfigureChecks.cmake +++ b/development/cmake/ConfigureChecks.cmake @@ -112,3 +112,49 @@ check_cxx_source_compiles( SIZEOF_WCHAR_T_IS_4) +# Check whether STL is libstdc++ +check_cxx_source_compiles( + + #include vector + int main() { + #if ! defined(__GLIBCXX__) ! defined(__GLIBCPP__) + this is not libstdc++ + #endif + return(0); + } + +lyx_cv_lib_stdcxx) + +# Check whether STL is libstdc++ with C++11 ABI +check_cxx_source_compiles( + + #include vector + int main() { + #if ! defined(_GLIBCXX_USE_CXX11_ABI) || ! _GLIBCXX_USE_CXX11_ABI + this is not libstdc++ using the C++11 ABI + #endif + return(0); + } + +USE_GLIBCXX_CXX11_ABI) + +check_cxx_source_compiles( + + #ifndef __clang__ + this is not clang + #endif + int main() { + return(0); + } + +lyx_cv_prog_clang) + +set(USE_LLVM_LIBCPP) +set(USE_GLIBCXX_CXX11_ABI) +if(NOT lyx_cv_lib_stdcxx) + if(lyx_cv_prog_clang) +# use libc++ provided by llvm instead of GNU libstdc++ +set(USE_LLVM_LIBCPP 1) + endif() +endif() + diff --git
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Kornel Benko wrote: > I am excited! I was about to make the needed changes for cmake, but you > already have done it. Nice. If possible I try to adapt cmake, but I have to admit that I do not succeed very often. The syntax looks so strange to my eyes. Georg
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Richard Heck wrote: > This is fine for branch if the people who understand this stuff (not me) > think it is. Jean-Marc, Kornel, do I have your OK? > I'm sure we need it there, since people will want to build LyX with > these tools. Yes. Georg
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Am Sonntag, 10. Mai 2015 um 10:24:16, schrieb Georg Baum> Richard Heck wrote: > > > This is fine for branch if the people who understand this stuff (not me) > > think it is. > > Jean-Marc, Kornel, do I have your OK? > > > I'm sure we need it there, since people will want to build LyX with > > these tools. > > Yes. > > > Georg Yes. Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Le 10/05/2015 10:24, Georg Baum a écrit : Richard Heck wrote: This is fine for branch if the people who understand this stuff (not me) think it is. Jean-Marc, Kornel, do I have your OK? I cannot test it (or I am too lazy to see whether I can install gcc 5), but it looks good. Did we already backport the other related things to branch? JMarc
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Jean-Marc Lasgouttes wrote: > Le 10/05/2015 10:24, Georg Baum a écrit : >> Richard Heck wrote: >> >>> This is fine for branch if the people who understand this stuff (not me) >>> think it is. >> >> Jean-Marc, Kornel, do I have your OK? > > I cannot test it (or I am too lazy to see whether I can install gcc 5), > but it looks good. I am lazy too, but when gcc 4.1 was new I used to compile gcc on a regular basis, and the script from that time does still work (including getting the sources from svn), so it was not much work. > Did we already backport the other related things to > branch? Sorry, I should have tried before asking. Of course there were not all needed backports done yet. The attached version is the minimal I could find. I had include the removal of LYX_PROG_CXX_WORKS, otherwise autoconf would complain about expanding a macro before requiring it: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required I tested the automake part with clang 3.5, gcc 4.9 and gcc 5.1. cmake was only tested with gcc 4.9 (since it is moee similar to master) Still OK? Georgdiff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 61ea48d..a0094c1 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -120,37 +120,65 @@ done ])dnl -AC_DEFUN([LYX_PROG_CXX_WORKS], -[rm -f conftest.C -cat >conftest.C <&5 || CXX= -rm -f conftest.C conftest.o conftest.obj || true +dnl Usage: LYX_PROG_CLANG: set lyx_cv_prog_clang to yes if the compiler is clang. +AC_DEFUN([LYX_PROG_CLANG], +[AC_CACHE_CHECK([whether the compiler is clang], + [lyx_cv_prog_clang], +[AC_TRY_COMPILE([], [ +#ifndef __clang__ + this is not clang +#endif +], +[lyx_cv_prog_clang=yes ; CLANG=yes], [lyx_cv_prog_clang=no ; CLANG=no])]) ]) -AC_DEFUN([LYX_PROG_CXX], -[AC_MSG_CHECKING([for a good enough C++ compiler]) -LYX_SEARCH_PROG(CXX, $CXX $CCC g++ gcc c++ CC cxx xlC cc++, [LYX_PROG_CXX_WORKS]) +dnl Usage: LYX_LIB_STDCXX: set lyx_cv_lib_stdcxx to yes if the STL library is libstdc++. +AC_DEFUN([LYX_LIB_STDCXX], +[AC_CACHE_CHECK([whether STL is libstdc++], + [lyx_cv_lib_stdcxx], +[AC_TRY_COMPILE([#include], [ +#if ! defined(__GLIBCXX__) && ! defined(__GLIBCPP__) + this is not libstdc++ +#endif +], +[lyx_cv_lib_stdcxx=yes], [lyx_cv_lib_stdcxx=no])]) +]) -if test -z "$CXX" ; then - AC_MSG_ERROR([Unable to find a good enough C++ compiler]) -fi -AC_MSG_RESULT($CXX) -AC_PROG_CXX -AC_PROG_CXXCPP +dnl Usage: LYX_LIB_STDCXX_CXX11_ABI: set lyx_cv_lib_stdcxx_cxx11_abi to yes +dnlif the STL library is GNU libstdc++ and the C++11 ABI is used. +AC_DEFUN([LYX_LIB_STDCXX_CXX11_ABI], +[AC_CACHE_CHECK([whether STL is libstdc++ using the C++11 ABI], + [lyx_cv_lib_stdcxx_cxx11_abi], +[AC_TRY_COMPILE([#include], [ +#if ! defined(_GLIBCXX_USE_CXX11_ABI) || ! _GLIBCXX_USE_CXX11_ABI + this is not libstdc++ using the C++11 ABI +#endif +], +[lyx_cv_lib_stdcxx_cxx11_abi=yes], [lyx_cv_lib_stdcxx_cxx11_abi=no])]) +]) + + +AC_DEFUN([LYX_PROG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([AC_PROG_CXXCPP]) + +AC_LANG_PUSH(C++) +LYX_PROG_CLANG +LYX_LIB_STDCXX +LYX_LIB_STDCXX_CXX11_ABI +AC_LANG_POP(C++) + +if test $lyx_cv_lib_stdcxx = "yes" ; then + if test $lyx_cv_lib_stdcxx_cxx11_abi = "yes" ; then +AC_DEFINE(USE_GLIBCXX_CXX11_ABI, 1, [use GNU libstdc++ with C++11 ABI]) + fi +else + if test $lyx_cv_prog_clang = "yes" ; then +AC_DEFINE(USE_LLVM_LIBCPP, 1, [use libc++ provided by llvm instead of GNU libstdc++]) + fi +fi ### We might want to get or shut warnings. AC_ARG_ENABLE(warnings, diff --git a/development/cmake/ConfigureChecks.cmake b/development/cmake/ConfigureChecks.cmake index 71291a5..a738160 100644 --- a/development/cmake/ConfigureChecks.cmake +++ b/development/cmake/ConfigureChecks.cmake @@ -112,3 +112,49 @@ check_cxx_source_compiles( " SIZEOF_WCHAR_T_IS_4) +# Check whether STL is libstdc++ +check_cxx_source_compiles( + " + #include + int main() { + #if ! defined(__GLIBCXX__) && ! defined(__GLIBCPP__) + this is not libstdc++ + #endif + return(0); + } + " +lyx_cv_lib_stdcxx) + +# Check whether STL is libstdc++ with C++11 ABI +check_cxx_source_compiles( + " + #include + int main() { + #if ! defined(_GLIBCXX_USE_CXX11_ABI) || ! _GLIBCXX_USE_CXX11_ABI + this is not libstdc++ using the C++11 ABI + #endif + return(0); + } + " +USE_GLIBCXX_CXX11_ABI) + +check_cxx_source_compiles( + " + #ifndef __clang__ + this is not clang + #endif + int main() { + return(0); + } + " +lyx_cv_prog_clang) + +set(USE_LLVM_LIBCPP) +set(USE_GLIBCXX_CXX11_ABI) +if(NOT lyx_cv_lib_stdcxx) + if(lyx_cv_prog_clang) +# use libc++ provided by llvm instead of GNU libstdc++ +set(USE_LLVM_LIBCPP 1) + endif() +endif() + diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake index 7bbe09e..a392b51 100644 --- a/development/cmake/config.h.cmake +++ b/development/cmake/config.h.cmake @@ -57,6 +57,9 @@ #cmakedefine LYX_USE_TR1 1
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Am Sonntag, 10. Mai 2015 um 18:29:37, schrieb Georg Baum> Jean-Marc Lasgouttes wrote: > > > Le 10/05/2015 10:24, Georg Baum a écrit : > >> Richard Heck wrote: > >> > >>> This is fine for branch if the people who understand this stuff (not me) > >>> think it is. > >> > >> Jean-Marc, Kornel, do I have your OK? > > > > I cannot test it (or I am too lazy to see whether I can install gcc 5), > > but it looks good. > > I am lazy too, but when gcc 4.1 was new I used to compile gcc on a regular > basis, and the script from that time does still work (including getting the > sources from svn), so it was not much work. > > > Did we already backport the other related things to > > branch? > > Sorry, I should have tried before asking. Of course there were not all > needed backports done yet. The attached version is the minimal I could find. > > I had include the removal of LYX_PROG_CXX_WORKS, otherwise autoconf would > complain about expanding a macro before requiring it: > http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required > > I tested the automake part with clang 3.5, gcc 4.9 and gcc 5.1. cmake was > only tested with gcc 4.9 (since it is moee similar to master) > > Still OK? > > > Georg I succeeded to compile gcc5.1. Then tried to compile lyx with this new gcc. Everything went OK for cmake (master). So, I think the cmake part is OK for branch too. Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
On 08/05/2015 22:03, Jean-Marc Lasgouttes wrote: Le 08/05/2015 21:19, Georg Baum a écrit : commit 51cc8aa9f6b784f806b1d9cc97fe0749ffac29af Author: Georg Baum b...@lyx.org Date: Fri May 8 21:12:42 2015 +0200 Fix build with GNU libstdc++ C++11 ABI The GNU libstdc++ that ships witch gcc 5 can be used with the same ABI as older versions, or with a new ABI which is conformant to the C++11 standard. LyX did not build if the latter was used: https://kojipkgs.fedoraproject.org//work/tasks/1267/9651267/build.log This is now fixed by detecting the ABI version and disabling the wrong forward declarations. At the same time, STD_STRING_USES_COW is switched off for the C++11 ABI version, because the std::basic_string implementation is now C++11 conformant. Since the GNU libstdc++ can also used by other compilers such as clang, we must not test for the compiler version. Good job :) BTW, we have a problem with clang in Ubuntu 15.04. THe boost 1.55 that ships with ubuntu crashes with clang 3.6. There is not much we can do about it, except maybe upgrading our local copy of boost. Or removing boost ;-) Abdel.
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Am Freitag, 8. Mai 2015 um 21:19:24, schrieb Georg Baum b...@lyx.org commit 51cc8aa9f6b784f806b1d9cc97fe0749ffac29af Author: Georg Baum b...@lyx.org Date: Fri May 8 21:12:42 2015 +0200 Fix build with GNU libstdc++ C++11 ABI The GNU libstdc++ that ships witch gcc 5 can be used with the same ABI as older versions, or with a new ABI which is conformant to the C++11 standard. LyX did not build if the latter was used: https://kojipkgs.fedoraproject.org//work/tasks/1267/9651267/build.log This is now fixed by detecting the ABI version and disabling the wrong forward declarations. At the same time, STD_STRING_USES_COW is switched off for the C++11 ABI version, because the std::basic_string implementation is now C++11 conformant. Since the GNU libstdc++ can also used by other compilers such as clang, we must not test for the compiler version. I am excited! I was about to make the needed changes for cmake, but you already have done it. Nice. Kornel signature.asc Description: This is a digitally signed message part.
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Le 09/05/2015 09:37, Abdelrazak Younes a écrit : Good job :) BTW, we have a problem with clang in Ubuntu 15.04. THe boost 1.55 that ships with ubuntu crashes with clang 3.6. There is not much we can do about it, except maybe upgrading our local copy of boost. Or removing boost ;-) We are not there yet unfortunately. Up to gcc 4.8 (4.9?), std::regex just does not work. JMarc
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
On 05/08/2015 03:19 PM, Georg Baum wrote: commit 51cc8aa9f6b784f806b1d9cc97fe0749ffac29af Author: Georg Baum b...@lyx.org Date: Fri May 8 21:12:42 2015 +0200 Fix build with GNU libstdc++ C++11 ABI The GNU libstdc++ that ships witch gcc 5 can be used with the same ABI as older versions, or with a new ABI which is conformant to the C++11 standard. LyX did not build if the latter was used: https://kojipkgs.fedoraproject.org//work/tasks/1267/9651267/build.log This is now fixed by detecting the ABI version and disabling the wrong forward declarations. At the same time, STD_STRING_USES_COW is switched off for the C++11 ABI version, because the std::basic_string implementation is now C++11 conformant. Since the GNU libstdc++ can also used by other compilers such as clang, we must not test for the compiler version. This is fine for branch if the people who understand this stuff (not me) think it is. I'm sure we need it there, since people will want to build LyX with these tools. Richard
Re: Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
On Saturday 09 May 2015 11:38:46 Jean-Marc Lasgouttes wrote: We are not there yet unfortunately. Up to gcc 4.8 (4.9?), std::regex just does not work. JMarc IIRC you are right, 4.9 is the first version where it works properly: http://stackoverflow.com/questions/23474121/what-part-of-regex-is-supported-by-gcc-4-9 http://stackoverflow.com/questions/4716680/c0x-regex-in-gcc -- José Abílio
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
On 08/05/2015 22:03, Jean-Marc Lasgouttes wrote: Le 08/05/2015 21:19, Georg Baum a écrit : commit 51cc8aa9f6b784f806b1d9cc97fe0749ffac29af Author: Georg BaumDate: Fri May 8 21:12:42 2015 +0200 Fix build with GNU libstdc++ C++11 ABI The GNU libstdc++ that ships witch gcc 5 can be used with the same ABI as older versions, or with a new ABI which is conformant to the C++11 standard. LyX did not build if the latter was used: https://kojipkgs.fedoraproject.org//work/tasks/1267/9651267/build.log This is now fixed by detecting the ABI version and disabling the wrong forward declarations. At the same time, STD_STRING_USES_COW is switched off for the C++11 ABI version, because the std::basic_string implementation is now C++11 conformant. Since the GNU libstdc++ can also used by other compilers such as clang, we must not test for the compiler version. Good job :) BTW, we have a problem with clang in Ubuntu 15.04. THe boost 1.55 that ships with ubuntu crashes with clang 3.6. There is not much we can do about it, except maybe upgrading our local copy of boost. Or removing boost ;-) Abdel.
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Le 09/05/2015 09:37, Abdelrazak Younes a écrit : Good job :) BTW, we have a problem with clang in Ubuntu 15.04. THe boost 1.55 that ships with ubuntu crashes with clang 3.6. There is not much we can do about it, except maybe upgrading our local copy of boost. Or removing boost ;-) We are not there yet unfortunately. Up to gcc 4.8 (4.9?), std::regex just does not work. JMarc
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
Am Freitag, 8. Mai 2015 um 21:19:24, schrieb Georg Baum> commit 51cc8aa9f6b784f806b1d9cc97fe0749ffac29af > Author: Georg Baum > Date: Fri May 8 21:12:42 2015 +0200 > > Fix build with GNU libstdc++ C++11 ABI > > The GNU libstdc++ that ships witch gcc 5 can be used with the same ABI as > older versions, or with a new ABI which is conformant to the C++11 > standard. > LyX did not build if the latter was used: > https://kojipkgs.fedoraproject.org//work/tasks/1267/9651267/build.log > > This is now fixed by detecting the ABI version and disabling the wrong > forward > declarations. At the same time, STD_STRING_USES_COW is switched off for > the > C++11 ABI version, because the std::basic_string implementation is now > C++11 > conformant. Since the GNU libstdc++ can also used by other compilers such > as > clang, we must not test for the compiler version. > I am excited! I was about to make the needed changes for cmake, but you already have done it. Nice. Kornel signature.asc Description: This is a digitally signed message part.
Re: Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
On Saturday 09 May 2015 11:38:46 Jean-Marc Lasgouttes wrote: > We are not there yet unfortunately. Up to gcc 4.8 (4.9?), std::regex > just does not work. > > JMarc IIRC you are right, 4.9 is the first version where it works properly: http://stackoverflow.com/questions/23474121/what-part-of-regex-is-supported-by-gcc-4-9 http://stackoverflow.com/questions/4716680/c0x-regex-in-gcc -- José Abílio
Re: [LyX/master] Fix build with GNU libstdc++ C++11 ABI
On 05/08/2015 03:19 PM, Georg Baum wrote: commit 51cc8aa9f6b784f806b1d9cc97fe0749ffac29af Author: Georg BaumDate: Fri May 8 21:12:42 2015 +0200 Fix build with GNU libstdc++ C++11 ABI The GNU libstdc++ that ships witch gcc 5 can be used with the same ABI as older versions, or with a new ABI which is conformant to the C++11 standard. LyX did not build if the latter was used: https://kojipkgs.fedoraproject.org//work/tasks/1267/9651267/build.log This is now fixed by detecting the ABI version and disabling the wrong forward declarations. At the same time, STD_STRING_USES_COW is switched off for the C++11 ABI version, because the std::basic_string implementation is now C++11 conformant. Since the GNU libstdc++ can also used by other compilers such as clang, we must not test for the compiler version. This is fine for branch if the people who understand this stuff (not me) think it is. I'm sure we need it there, since people will want to build LyX with these tools. Richard