Skip to contentSkip to conversation

package/mpd: disable on SPARCV8, NIOS2, ARMV{4, 5}

PATCH New Jörg Krause 3 participants 6 messages Jan 21, 2017 – Jan 30, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/mpd: disable on SPARCV8, NIOS2, ARMV{4, 5}

Since version 0.20 mpd uses the C++11 feature std::exception_ptr which is not available on architectures that do not have always-lock-free atomics for int.

The issue [1,2] has been fixed in GCC trunk r244051 [3] and will be available in GCC 7. However, as GCC 7 is not released yet and will not be before the next release of Buildroot, we disable the following architectures, which caused build errors on the autobuilders:
* SPARCV8
* NIOS2
* ARMV4
* ARMV5

Fixes:
http://autobuild.buildroot.net/results/1c5/1c5090fe361b08c60277e54be1bfa7e80d5d31d8/
http://autobuild.buildroot.net/results/076/07621b958a3a35066790543586549aa41f2effa9/
http://autobuild.buildroot.net/results/7b1/7b12d41bee83ad20251dbc7026e0fc665d5abe0c/
.. and many more

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58938
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
[3]
https://gcc.gnu.org/viewcvs/gcc/trunk/libstdc%2B%2B-v3/include/std/future?view=log&pathrev=244051

---
 package/mpd/Config.in | 6 ++++++
 1 file changed, 6 insertions(+)
package/mpd/Config.in +6 -0
index 9b22f68ce..52deef438 100644
@@ -6,6 +6,11 @@ menuconfig BR2_PACKAGE_MPD
 	depends on BR2_USE_MMU # fork
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
 	depends on BR2_TOOLCHAIN_HAS_ATOMIC
+	# std::exception_ptr is not available on architectures that do not have
+	# always-lock-free atomics for int. Note that GCC 7 will fix this issue
+	# by not relying on atomics anymore, so MPD will be available for these
+	# archs again (if build with GCC 7).
+	depends on !(BR2_sparc_v8 || BR2_nios2 || BR2_ARM_CPU_ARMV4 || BR2_ARM_CPU_ARMV5)
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_MPD_TREMOR if !(BR2_PACKAGE_MPD_MAD || BR2_PACKAGE_MPD_MPG123 || BR2_PACKAGE_MPD_VORBIS || BR2_PACKAGE_MPD_WAVPACK || BR2_PACKAGE_MPD_FLAC || BR2_PACKAGE_MPD_MUSEPACK || BR2_PACKAGE_MPD_FFMPEG)
@@ -317,5 +322,6 @@ endif
 comment "mpd needs a toolchain w/ C++, threads, wchar, gcc >= 4.9"
 	depends on BR2_USE_MMU
 	depends on BR2_TOOLCHAIN_HAS_ATOMIC
+	depends on !(BR2_sparc_v8 || BR2_nios2 || BR2_ARM_CPU_ARMV4 || BR2_ARM_CPU_ARMV5)
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
 		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 package/mpd: disable on SPARCV8, NIOS2, ARMV{4, 5}

Hello,

Quoted 13 lines · J?rg Krause

Since version 0.20 mpd uses the C++11 feature std::exception_ptr which is not available on architectures that do not have always-lock-free atomics for int.

The issue [1,2] has been fixed in GCC trunk r244051 [3] and will be available in GCC 7. However, as GCC 7 is not released yet and will not be before the next release of Buildroot, we disable the following architectures, which caused build errors on the autobuilders:
* SPARCV8
* NIOS2
* ARMV4
* ARMV5

Quoted 5 lines

Fixes:
http://autobuild.buildroot.net/results/1c5/1c5090fe361b08c60277e54be1bfa7e80d5d31d8/
http://autobuild.buildroot.net/results/076/07621b958a3a35066790543586549aa41f2effa9/
http://autobuild.buildroot.net/results/7b1/7b12d41bee83ad20251dbc7026e0fc665d5abe0c/
.. and many more

How many packages are potentially affected by this?

The reason I'm asking is because I believe a BR2_TOOLCHAIN_HAS_GCC_BUG_xyz hidden option would be a bit better:

1. It would document what this is for

2. It would avoid repeating the architecture conditions

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 package/mpd: disable on SPARCV8, NIOS2, ARMV{4, 5}

Hi Thomas,

Quoted 27 lines · Thomas Petazzoni

Hello,

Quoted 15 lines · J?rg Krause

Since version 0.20 mpd uses the C++11 feature std::exception_ptr which
is not available on architectures that do not have always-lock-free atomics for int.

The issue [1,2] has been fixed in GCC trunk r244051 [3] and will be available in GCC 7. However, as GCC 7 is not released yet and will not
be before the next release of Buildroot, we disable the following architectures, which caused build errors on the autobuilders:
? * SPARCV8
? * NIOS2
? * ARMV4
? * ARMV5

Quoted 8 lines

Fixes:
http://autobuild.buildroot.net/results/1c5/1c5090fe361b08c60277e54b
e1bfa7e80d5d31d8/
http://autobuild.buildroot.net/results/076/07621b958a3a350667905435
86549aa41f2effa9/
http://autobuild.buildroot.net/results/7b1/7b12d41bee83ad20251dbc70
26e0fc665d5abe0c/
.. and many more

Quoted 1 line

How many packages are potentially affected by this?

Not sure about this. Eventually all C++11 packages using std:exception_ptr or std::future are affected. I am not aware of any other Buildroot package besides MPD.

Quoted 6 lines

The reason I'm asking is because I believe a BR2_TOOLCHAIN_HAS_GCC_BUG_xyz hidden option would be a bit better:

?1. It would document what this is for

?2. It would avoid repeating the architecture conditions

Yes, this would be better in case more packages show up. Shall I make an updated fix?

J?rg

#3 lore raw

PATCH 1/1 package/mpd: disable on SPARCV8, NIOS2, ARMV{4, 5}

Hello,

Quoted 9 lines · J?rg Krause
Quoted 6 lines

The reason I'm asking is because I believe a BR2_TOOLCHAIN_HAS_GCC_BUG_xyz hidden option would be a bit better:

?1. It would document what this is for

?2. It would avoid repeating the architecture conditions

Yes, this would be better in case more packages show up. Shall I make an updated fix?

Yes, please :)

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 package/mpd: disable on SPARCV8, NIOS2, ARMV{4, 5}

Hi Thomas,

Quoted 10 lines · Thomas Petazzoni

Hello,

Quoted 6 lines · J?rg Krause
Quoted 6 lines

The reason I'm asking is because I believe a BR2_TOOLCHAIN_HAS_GCC_BUG_xyz hidden option would be a bit better:

?1. It would document what this is for

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

?2. It would avoid repeating the architecture conditions??

Yes, this would be better in case more packages show up. Shall I make
an updated fix?

Yes, please :)

OK.

I'm a little upset that there will be no MPD available for the ARMv5 architecture until GCC 7 is available?in Buildroot. Maybe we can still support the 0.19 branch for the archs which are affected by the GCC issue and use the 0.20 otherwise? Any objections?

J?rg

#5 lore raw

PATCH 1/1 package/mpd: disable on SPARCV8, NIOS2, ARMV{4, 5}

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"J?rg" == J?rg Krause <[email protected]> writes:

Hi,

Quoted 6 lines

OK.

I'm a little upset that there will be no MPD available for the ARMv5 architecture until GCC 7 is available?in Buildroot. Maybe we can still support the 0.19 branch for the archs which are affected by the GCC issue and use the 0.20 otherwise? Any objections?

Yeah, I agree that it isn't really very nice. What does upstream say? Stick to 0.19 for now?

Signature · 1 line
Bye, Peter Korsgaard