package/jsoncpp: broken with musl on x86
PATCH 1/1 package/jsoncpp: broken with musl on x86
This patch replaces a previous submission made by Bernd Kuhls some while ago [1].
The posix_memalign declaration is incompatible with musl for C++, because of the exception specification [2]. Note, the referenced patch is part of the a patch series to "Add musl support to GCC".
Instead of patching gcc in Buildroot we disable jsoncpp and any reverse dependendy with the musl toolchain on x86.
[1] https://patchwork.ozlabs.org/patch/505425/
[2] https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01084.html
Fixes:
http://autobuild.buildroot.net/results/588/5885d33b8d9f17878f565f3ae5371017dc89aede/
http://autobuild.buildroot.net/results/0d9/0d90c7c13ae1640b07709c4c686e0237ada1324d/
http://autobuild.buildroot.net/results/30b/30b98ac7362c27254218a6e521d29971070f8c3c/
http://autobuild.buildroot.net/results/292/29289c125166630aeaf884ccc006bcf12c8aa0f6/
and many more.
--- package/cmake/Config.in | 4 ++++ package/jsoncpp/Config.in | 5 +++++ package/kodi-pvr-argustv/Config.in | 4 ++++ package/kodi-pvr-filmon/Config.in | 4 ++++ package/kodi-pvr-pctv/Config.in | 4 ++++ package/kodi-pvr-stalker/Config.in | 4 ++++ package/sysdig/Config.in | 4 ++++ 7 files changed, 29 insertions(+)
package/cmake/Config.in +4 -0
@@ -20,6 +20,7 @@ config BR2_PACKAGE_CMAKE_CTEST select BR2_PACKAGE_EXPAT select BR2_PACKAGE_BZIP2 select BR2_PACKAGE_XZ + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64)) # jsoncpp depends on BR2_PACKAGE_CMAKE_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # from jsoncpp depends on BR2_USE_WCHAR # libarchive
@@ -38,3 +39,6 @@ comment "ctest needs a toolchain w/ C++, wchar, dynamic library, gcc >= 4.7" depends on BR2_PACKAGE_CMAKE_ARCH_SUPPORTS depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +comment "ctest needs a (e)glibc or uClibc toolchain w/ C++ on x86" + depends on (BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64))
package/jsoncpp/Config.in +5 -0
@@ -1,4 +1,6 @@ config BR2_PACKAGE_JSONCPP + # posix_memalign is incompatible with musl for C++ on x86 + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64)) depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 depends on BR2_INSTALL_LIBSTDCPP bool "jsoncpp"
@@ -13,3 +15,6 @@ config BR2_PACKAGE_JSONCPP comment "jsoncpp needs a toolchain w/ C++, gcc >= 4.7" depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +comment "jsoncpp needs a (e)glibc or uClibc toolchain w/ C++ on x86" + depends on (BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64))
package/kodi-pvr-argustv/Config.in +4 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_KODI_PVR_ARGUSTV bool "kodi-pvr-argustv" + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64)) # jsoncpp depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # jsoncpp select BR2_PACKAGE_JSONCPP select BR2_PACKAGE_KODI_PLATFORM
@@ -10,3 +11,6 @@ config BR2_PACKAGE_KODI_PVR_ARGUSTV comment "kodi-pvr-argustv needs a toolchain w/ gcc >= 4.7" depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +comment "kodi-pvr-argustv needs a (e)glibc or uClibc toolchain w/ C++ on x86" + depends on (BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64))
package/kodi-pvr-filmon/Config.in +4 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_KODI_PVR_FILMON bool "kodi-pvr-filmon" + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64)) # jsoncpp depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # jsoncpp select BR2_PACKAGE_JSONCPP select BR2_PACKAGE_KODI_PLATFORM
@@ -10,3 +11,6 @@ config BR2_PACKAGE_KODI_PVR_FILMON comment "kodi-pvr-filmon needs a toolchain w/ gcc >= 4.7" depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +comment "kodi-pvr-filmon needs a (e)glibc or uClibc toolchain w/ C++ on x86" + depends on (BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64))
package/kodi-pvr-pctv/Config.in +4 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_KODI_PVR_PCTV bool "kodi-pvr-pctv" + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64)) # jsoncpp depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # jsoncpp select BR2_PACKAGE_JSONCPP select BR2_PACKAGE_KODI_PLATFORM
@@ -10,3 +11,6 @@ config BR2_PACKAGE_KODI_PVR_PCTV comment "kodi-pvr-pctv needs a toolchain w/ gcc >= 4.7" depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +comment "kodi-pvr-pctv needs a (e)glibc or uClibc toolchain w/ C++ on x86" + depends on (BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64))
package/kodi-pvr-stalker/Config.in +4 -0
@@ -1,5 +1,6 @@ config BR2_PACKAGE_KODI_PVR_STALKER bool "kodi-pvr-stalker" + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64)) # jsoncpp depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # jsoncpp select BR2_PACKAGE_JSONCPP select BR2_PACKAGE_KODI_PLATFORM
@@ -10,3 +11,6 @@ config BR2_PACKAGE_KODI_PVR_STALKER comment "kodi-pvr-stalker needs a toolchain w/ gcc >= 4.7" depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +comment "kodi-pvr-stalker needs a (e)glibc or uClibc toolchain w/ C++ on x86" + depends on (BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64))
package/sysdig/Config.in +4 -0
@@ -3,6 +3,7 @@ config BR2_PACKAGE_SYSDIG select BR2_PACKAGE_ZLIB select BR2_PACKAGE_LUAJIT select BR2_PACKAGE_JSONCPP + depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64)) # jsoncpp depends on BR2_LINUX_KERNEL depends on BR2_INSTALL_LIBSTDCPP # libjson depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS
@@ -19,3 +20,6 @@ config BR2_PACKAGE_SYSDIG comment "sysdig needs a toolchain w/ C++, dynamic library and a Linux kernel to be built" depends on !BR2_LINUX_KERNEL || !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS + +comment "sysdig needs a (e)glibc or uClibc toolchain w/ C++ on x86" + depends on (BR2_TOOLCHAIN_USES_MUSL && (BR2_i386 || BR2_x86_64))
Signature · 1 line
2.6.1
PATCH 1/1 package/jsoncpp: broken with musl on x86
Dear J?rg Krause,
Quoted 7 lines · J?rg Krause
This patch replaces a previous submission made by Bernd Kuhls some while ago [1].
The
posix_memaligndeclaration is incompatible with musl for C++, because of the exception specification [2]. Note, the referenced patch is part of the a patch series to "Add musl support to GCC".
Quoted 5 lines
Instead of patching gcc in Buildroot we disable jsoncpp and any reverse dependendy with the musl toolchain on x86.
[1] https://patchwork.ozlabs.org/patch/505425/
[2] https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01084.html
It is indeed not very practical to fix gcc, since external toolchains would continue to be affected. But isn't there a way of working around the problem inside jsoncpp itself, so that we don't have to do this complicated reverse-dependency propagation ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/jsoncpp: broken with musl on x86
Hello,
Quoted 11 lines · Thomas Petazzoni
Quoted 10 lines · J?rg Krause
This patch replaces a previous submission made by Bernd Kuhls some while ago [1].
The
posix_memaligndeclaration is incompatible with musl for C++, because of the exception specification [2]. Note, the referenced patch is part of the a patch series to "Add musl support to GCC".Instead of patching gcc in Buildroot we disable jsoncpp and any reverse dependendy with the musl toolchain on x86.
Quoted 7 lines
Quoted 2 lines
[1] https://patchwork.ozlabs.org/patch/505425/
[2] https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01084.htmlIt is indeed not very practical to fix gcc, since external toolchains would continue to be affected. But isn't there a way of working around the problem inside jsoncpp itself, so that we don't have to do this complicated reverse-dependency propagation ?
There is indeed a solution: remove the -pedantic flags from
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Wextra -pedantic")
line in CMakeLists.txt. And it builds just fine. It seems a lot simpler than propagating the reverse dependencies.
Could you submit a patch doing this ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/jsoncpp: broken with musl on x86
Hi Thomas,
Quoted 31 lines · Thomas Petazzoni
Hello,
Quoted 18 lines · Thomas Petazzoni
Quoted 10 lines · J?rg Krause
This patch replaces a previous submission made by Bernd Kuhls some while ago
[1].The
posix_memaligndeclaration is incompatible with musl for C++, because of
the exception specification [2]. Note, the referenced patch is part of the a
patch series to "Add musl support to GCC".Quoted 6 lines
Instead of patching gcc in Buildroot we disable jsoncpp and any reverse
dependendy with the musl toolchain on x86.[1] https://patchwork.ozlabs.org/patch/505425/
[2] https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01084.htmlQuoted 6 lines
It is indeed not very practical to fix gcc, since external toolchains
would continue to be affected. But isn't there a way of working around
the problem inside jsoncpp itself, so that we don't have to do this complicated reverse-dependency propagation ?There is indeed a solution: remove the -pedantic flags from
Quoted 8 lines
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Wextra -pedantic")line in CMakeLists.txt. And it builds just fine. It seems a lot simpler
than propagating the reverse dependencies.Could you submit a patch doing this ?
Indeed, this is much simpler. Many thanks for investigation ... I did not had the time. I'll prepare a patch for this soon!
Best regards
J?rg Krause
PATCH 1/1 package/jsoncpp: broken with musl on x86
Dear J?rg Krause,
Quoted 8 lines · J?rg Krause
Quoted 5 lines
line in CMakeLists.txt. And it builds just fine. It seems a lot simpler
than propagating the reverse dependencies.Could you submit a patch doing this ?
Indeed, this is much simpler. Many thanks for investigation ... I did not had the time. I'll prepare a patch for this soon!
I actually didn't do much investigation. I just googled the issue, and in the discussion around the musl related patches sent to gcc, this was discussed, and it was pointed out that the error only occurs if -pedantic is used.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com