All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC
@ 2017-02-28 23:24 Romain Naour
  2017-02-28 23:24 ` [Buildroot] [PATCH v2 2/2] package/supertux: new package Romain Naour
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Romain Naour @ 2017-02-28 23:24 UTC (permalink / raw)
  To: buildroot

As reported in this bug report [1], altivec support in SDL break
arbitrary C++ code.

Issue reported by test-pkg script while testing supertux package:
    error: could not convert 'true' from 'bool' to '__vector(4) __bool int'

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Sam Bobroff <sam.bobroff@au1.ibm.com>
---
 package/sdl2/sdl2.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/sdl2/sdl2.mk b/package/sdl2/sdl2.mk
index d2ee50d..628d906 100644
--- a/package/sdl2/sdl2.mk
+++ b/package/sdl2/sdl2.mk
@@ -23,6 +23,16 @@ SDL2_CONF_OPTS += \
 # We must enable static build to get compilation successful.
 SDL2_CONF_OPTS += --enable-static
 
+# From https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
+# "The problem lies within SDL_cpuinfo.h.  It includes altivec.h, which by
+# definition provides an unconditional vector, pixel and bool define in
+# standard-c++ mode.  In GNU-c++ mode this names are only defined
+# context-sensitive by cpp.  SDL_cpuinfo.h is included by SDL.h.
+# Including altivec.h makes arbitrary code break."
+ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
+SDL2_CONF_OPTS += --disable-altivec
+endif
+
 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 SDL2_DEPENDENCIES += udev
 SDL2_CONF_OPTS += --enable-libudev
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/supertux: new package
  2017-02-28 23:24 [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC Romain Naour
@ 2017-02-28 23:24 ` Romain Naour
  2017-03-01 21:58   ` Romain Naour
  2017-03-01  2:13 ` [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC Sam Bobroff
  2017-03-01 20:54 ` Thomas Petazzoni
  2 siblings, 1 reply; 8+ messages in thread
From: Romain Naour @ 2017-02-28 23:24 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
v2: update GCC minimal version to 4.8
Coding style checked with check-package script (v1) and build tested
with test-pkg script.
---
 DEVELOPERS                     |  1 +
 package/Config.in              |  1 +
 package/supertux/Config.in     | 37 +++++++++++++++++++++++++++++++
 package/supertux/supertux.hash |  2 ++
 package/supertux/supertux.mk   | 49 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 90 insertions(+)
 create mode 100644 package/supertux/Config.in
 create mode 100644 package/supertux/supertux.hash
 create mode 100644 package/supertux/supertux.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index c80fdb4..8bde497 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1286,6 +1286,7 @@ F:	package/lugaru/
 F:	package/mcelog/
 F:	package/openpowerlink/
 F:	package/stress-ng/
+F:	package/supertux/
 F:	package/terminology/
 F:	package/upower/
 F:	package/xenomai/
diff --git a/package/Config.in b/package/Config.in
index aad0842..f6bfa2e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -229,6 +229,7 @@ menu "Games"
 	source "package/rubix/Config.in"
 	source "package/sl/Config.in"
 	source "package/stella/Config.in"
+	source "package/supertux/Config.in"
 	source "package/supertuxkart/Config.in"
 endmenu
 
diff --git a/package/supertux/Config.in b/package/supertux/Config.in
new file mode 100644
index 0000000..a7a6e1b
--- /dev/null
+++ b/package/supertux/Config.in
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_SUPERTUX
+	bool "supertux"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_PACKAGE_HAS_LIBGL # libglew
+	depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_XORG7 # libglew, SDL2 OpenGL (GLX)
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 gcc attributes noreturn
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal
+	depends on BR2_USE_MMU # SDL2 OpenGL (GLX)
+	depends on !BR2_STATIC_LIBS # SDL2
+	depends on BR2_USE_WCHAR # Boost
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_DATE_TIME
+	select BR2_PACKAGE_BOOST_FILESYSTEM
+	select BR2_PACKAGE_BOOST_SYSTEM
+	select BR2_PACKAGE_LIBGLEW
+	select BR2_PACKAGE_LIBGLU # GL/glu.h
+	select BR2_PACKAGE_LIBOGG
+	select BR2_PACKAGE_LIBVORBIS
+	select BR2_PACKAGE_OPENAL
+	select BR2_PACKAGE_SDL2
+	select BR2_PACKAGE_SDL2_IMAGE
+	select BR2_PACKAGE_SDL2_OPENGL
+	help
+	  SuperTux is a free classic 2D jump'n run sidescroller game in
+	  a style similar to the original Super Mario games covered
+	  under the GNU GPL.
+
+	  http://supertux.github.io/
+
+comment "supertux needs X11 and a toolchain w/ C++, OpenGL backend, gcc >= 4.8, NPTL, dynamic library, wchar"
+	depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_USE_MMU
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_LIBGL || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
+		BR2_STATIC_LIBS || !BR2_USE_WCHAR
diff --git a/package/supertux/supertux.hash b/package/supertux/supertux.hash
new file mode 100644
index 0000000..c56f608
--- /dev/null
+++ b/package/supertux/supertux.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 c9dc3b42991ce5c5d0d0cb94e44c4ec2373ad09029940f0e92331e7e9ada0ac5 SuperTux-v0.5.1-Source.tar.gz
diff --git a/package/supertux/supertux.mk b/package/supertux/supertux.mk
new file mode 100644
index 0000000..0d1a7ab
--- /dev/null
+++ b/package/supertux/supertux.mk
@@ -0,0 +1,49 @@
+################################################################################
+#
+# supertux
+#
+################################################################################
+
+SUPERTUX_VERSION = 0.5.1
+SUPERTUX_SITE = https://github.com/SuperTux/supertux/releases/download/v$(SUPERTUX_VERSION)
+SUPERTUX_SOURCE = SuperTux-v$(SUPERTUX_VERSION)-Source.tar.gz
+
+# Most of the data subdirectory is licensed under CC-by-SA, see
+# data/AUTHORS for a full list.
+# Supertux itself is GPLv3+, but it bundles a few libraries with different
+# licenses. PhysFS, sexp-cpp, squirrel, tinygettext.
+SUPERTUX_LICENSE = GPLv3+, CC-BY-SA (images music sounds)
+SUPERTUX_LICENSE_FILES = LICENSE.txt data/AUTHORS
+
+# Use bundled squirrel, tinygettext sexp-cpp packages which are hardcoded in
+# the CMake build system. Also use bundled PhysFS since there is no Buildroot
+# package for it.
+SUPERTUX_DEPENDENCIES = host-pkgconf boost libcurl libgl libglew libglu \
+	libogg libvorbis openal sdl2 sdl2_image
+
+# ENABLE_BOOST_STATIC_LIBS=OFF: use boost shared libraries since supertux
+# depends on !BR2_STATIC_LIBS and boost provide only shared libraries with
+# BR2_SHARED_LIBS.
+# ENABLE_OPENGL=ON: Can be disabled but will make SuperTux unplayable slow.
+# GLBINDING_ENABLED=OFF: use GLEW (default) instead of glbinding.
+# Install the game directly in /usr/bin and game data in /usr/share/supertux2.
+SUPERTUX_CONF_OPTS += \
+	-DENABLE_BOOST_STATIC_LIBS=OFF \
+	-DBUILD_DOCUMENTATION=OFF \
+	-DENABLE_OPENGL=ON \
+	-DGLBINDING_ENABLED=OFF \
+	-DINSTALL_SUBDIR_BIN="bin" \
+	-DINSTALL_SUBDIR_SHARE="share/supertux2"
+
+# Avoid incompatible posix_memalign declaration on x86 and x86_64 with
+# musl.
+# https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01425.html
+ifeq ($(BR2_TOOLCHAIN_USES_MUSL):$(BR2_i386)$(BR2_x86_64),y:y)
+define SUPERTUX_REMOVE_PEDANTIC
+	$(SED) 's% -pedantic%%' $(@D)/CMakeLists.txt
+	$(SED) 's%CHECK_CXX_FLAG(pedantic)%%' $(@D)/external/tinygettext/CMakeLists.txt
+endef
+SUPERTUX_POST_PATCH_HOOKS += SUPERTUX_REMOVE_PEDANTIC
+endif
+
+$(eval $(cmake-package))
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC
  2017-02-28 23:24 [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC Romain Naour
  2017-02-28 23:24 ` [Buildroot] [PATCH v2 2/2] package/supertux: new package Romain Naour
@ 2017-03-01  2:13 ` Sam Bobroff
  2017-03-01 19:52   ` Romain Naour
  2017-03-01 20:54 ` Thomas Petazzoni
  2 siblings, 1 reply; 8+ messages in thread
From: Sam Bobroff @ 2017-03-01  2:13 UTC (permalink / raw)
  To: buildroot

On Wed, Mar 01, 2017 at 12:24:52AM +0100, Romain Naour wrote:
> As reported in this bug report [1], altivec support in SDL break
> arbitrary C++ code.
> 
> Issue reported by test-pkg script while testing supertux package:
>     error: could not convert 'true' from 'bool' to '__vector(4) __bool int'
> 
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Sam Bobroff <sam.bobroff@au1.ibm.com>

Hi Romain,

If you want to keep alitvec support on you can probably work around this
problem by using -std=gnu99 (which I used for mpv, see
package/mpv/0002-fix-powerpc64-altivec.patch).

Cheers,
Sam.

> ---
>  package/sdl2/sdl2.mk | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/package/sdl2/sdl2.mk b/package/sdl2/sdl2.mk
> index d2ee50d..628d906 100644
> --- a/package/sdl2/sdl2.mk
> +++ b/package/sdl2/sdl2.mk
> @@ -23,6 +23,16 @@ SDL2_CONF_OPTS += \
>  # We must enable static build to get compilation successful.
>  SDL2_CONF_OPTS += --enable-static
>  
> +# From https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
> +# "The problem lies within SDL_cpuinfo.h.  It includes altivec.h, which by
> +# definition provides an unconditional vector, pixel and bool define in
> +# standard-c++ mode.  In GNU-c++ mode this names are only defined
> +# context-sensitive by cpp.  SDL_cpuinfo.h is included by SDL.h.
> +# Including altivec.h makes arbitrary code break."
> +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
> +SDL2_CONF_OPTS += --disable-altivec
> +endif
> +
>  ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
>  SDL2_DEPENDENCIES += udev
>  SDL2_CONF_OPTS += --enable-libudev
> -- 
> 2.9.3

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC
  2017-03-01  2:13 ` [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC Sam Bobroff
@ 2017-03-01 19:52   ` Romain Naour
  2017-03-03  2:16     ` Sam Bobroff
  0 siblings, 1 reply; 8+ messages in thread
From: Romain Naour @ 2017-03-01 19:52 UTC (permalink / raw)
  To: buildroot

Hi Sam,

Le 01/03/2017 ? 03:13, Sam Bobroff a ?crit :
> On Wed, Mar 01, 2017 at 12:24:52AM +0100, Romain Naour wrote:
>> As reported in this bug report [1], altivec support in SDL break
>> arbitrary C++ code.
>>
>> Issue reported by test-pkg script while testing supertux package:
>>     error: could not convert 'true' from 'bool' to '__vector(4) __bool int'
>>
>> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
>>
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> Cc: Sam Bobroff <sam.bobroff@au1.ibm.com>
> 
> Hi Romain,
> 
> If you want to keep alitvec support on you can probably work around this
> problem by using -std=gnu99 (which I used for mpv, see
> package/mpv/0002-fix-powerpc64-altivec.patch).

Thanks for the help!

But the error come from a C++ build :
In file included from
output/build/supertux-0.5.1/external/tinygettext/src/dictionary_manager.cpp:30:0:
output/build/supertux-0.5.1/external/tinygettext/include/tinygettext/po_parser.hpp:50:96:
error: could not convert ?true? from ?bool? to ?__vector(4) __bool int?
   POParser(const std::string& filename, std::istream& in_, Dictionary& dict_,
bool use_fuzzy = true);

What do you think about removing altivec.h from SDL_cpuinfo.h as suggested in
the bug report ?

Otherwise, I'm not using a powerpc so we can keep altivec support disabled for
now...

Best regards,
Romain

> 
> Cheers,
> Sam.
> 
>> ---
>>  package/sdl2/sdl2.mk | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/package/sdl2/sdl2.mk b/package/sdl2/sdl2.mk
>> index d2ee50d..628d906 100644
>> --- a/package/sdl2/sdl2.mk
>> +++ b/package/sdl2/sdl2.mk
>> @@ -23,6 +23,16 @@ SDL2_CONF_OPTS += \
>>  # We must enable static build to get compilation successful.
>>  SDL2_CONF_OPTS += --enable-static
>>  
>> +# From https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
>> +# "The problem lies within SDL_cpuinfo.h.  It includes altivec.h, which by
>> +# definition provides an unconditional vector, pixel and bool define in
>> +# standard-c++ mode.  In GNU-c++ mode this names are only defined
>> +# context-sensitive by cpp.  SDL_cpuinfo.h is included by SDL.h.
>> +# Including altivec.h makes arbitrary code break."
>> +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
>> +SDL2_CONF_OPTS += --disable-altivec
>> +endif
>> +
>>  ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
>>  SDL2_DEPENDENCIES += udev
>>  SDL2_CONF_OPTS += --enable-libudev
>> -- 
>> 2.9.3
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC
  2017-02-28 23:24 [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC Romain Naour
  2017-02-28 23:24 ` [Buildroot] [PATCH v2 2/2] package/supertux: new package Romain Naour
  2017-03-01  2:13 ` [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC Sam Bobroff
@ 2017-03-01 20:54 ` Thomas Petazzoni
  2 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2017-03-01 20:54 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed,  1 Mar 2017 00:24:52 +0100, Romain Naour wrote:
> As reported in this bug report [1], altivec support in SDL break
> arbitrary C++ code.
> 
> Issue reported by test-pkg script while testing supertux package:
>     error: could not convert 'true' from 'bool' to '__vector(4) __bool int'
> 
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Sam Bobroff <sam.bobroff@au1.ibm.com>
> ---
>  package/sdl2/sdl2.mk | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/supertux: new package
  2017-02-28 23:24 ` [Buildroot] [PATCH v2 2/2] package/supertux: new package Romain Naour
@ 2017-03-01 21:58   ` Romain Naour
  0 siblings, 0 replies; 8+ messages in thread
From: Romain Naour @ 2017-03-01 21:58 UTC (permalink / raw)
  To: buildroot

Hi All,

Le 01/03/2017 ? 00:24, Romain Naour a ?crit :
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---

snip

> +# Most of the data subdirectory is licensed under CC-by-SA, see
> +# data/AUTHORS for a full list.
> +# Supertux itself is GPLv3+, but it bundles a few libraries with different
> +# licenses. PhysFS, sexp-cpp, squirrel, tinygettext.
> +SUPERTUX_LICENSE = GPLv3+, CC-BY-SA (images music sounds)
> +SUPERTUX_LICENSE_FILES = LICENSE.txt data/AUTHORS

data/AUTHORS provide a license for almost each data file, each license may be
CC-BY-SA and GPL version 2 or later or CC-BY-SA 4.0 or CC-BY 3.0/CC-BY-SA
3.0/GPL 3.0 etc...

So It's not an exhaustive list of licenses. Should I list all licenses present
in this file ?

> +
> +# Use bundled squirrel, tinygettext sexp-cpp packages which are hardcoded in
> +# the CMake build system. Also use bundled PhysFS since there is no Buildroot
> +# package for it.
> +SUPERTUX_DEPENDENCIES = host-pkgconf boost libcurl libgl libglew libglu \
> +	libogg libvorbis openal sdl2 sdl2_image

I'm working on PhysFS package and see if it can be used by supertux.
This is the only library that can be used as "system" library (i.e from staging).

Best regards,
Romain

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC
  2017-03-01 19:52   ` Romain Naour
@ 2017-03-03  2:16     ` Sam Bobroff
  2017-03-05 21:53       ` Romain Naour
  0 siblings, 1 reply; 8+ messages in thread
From: Sam Bobroff @ 2017-03-03  2:16 UTC (permalink / raw)
  To: buildroot

On Wed, Mar 01, 2017 at 08:52:27PM +0100, Romain Naour wrote:
> Hi Sam,
> 
> Le 01/03/2017 ? 03:13, Sam Bobroff a ?crit :
> > On Wed, Mar 01, 2017 at 12:24:52AM +0100, Romain Naour wrote:
> >> As reported in this bug report [1], altivec support in SDL break
> >> arbitrary C++ code.
> >>
> >> Issue reported by test-pkg script while testing supertux package:
> >>     error: could not convert 'true' from 'bool' to '__vector(4) __bool int'
> >>
> >> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
> >>
> >> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> >> Cc: Sam Bobroff <sam.bobroff@au1.ibm.com>
> > 
> > Hi Romain,
> > 
> > If you want to keep alitvec support on you can probably work around this
> > problem by using -std=gnu99 (which I used for mpv, see
> > package/mpv/0002-fix-powerpc64-altivec.patch).
> 
> Thanks for the help!
> 
> But the error come from a C++ build :
> In file included from
> output/build/supertux-0.5.1/external/tinygettext/src/dictionary_manager.cpp:30:0:
> output/build/supertux-0.5.1/external/tinygettext/include/tinygettext/po_parser.hpp:50:96:
> error: could not convert ?true? from ?bool? to ?__vector(4) __bool int?
>    POParser(const std::string& filename, std::istream& in_, Dictionary& dict_,
> bool use_fuzzy = true);
> 
> What do you think about removing altivec.h from SDL_cpuinfo.h as suggested in
> the bug report ?
> 
> Otherwise, I'm not using a powerpc so we can keep altivec support disabled for
> now...
> 
> Best regards,
> Romain

Oh, I hadn't seen this with c++ before but I reproduced it easily when
using -std=c++0x (as discussed in the bug report you linked).

Were you using that flag during your compile?

If you don't need c++0x, removing it might work around the problem but
if you can't do that (or it doesn't work), and your problem is showing
up in a non-altivec context (e.g. the code is expecting bool to be a
normal bool) then I think you can #undef the re-defined keywords (the
altivec header suggests that this is OK for C++). e.g.:

#include <altivec.h>
#undef bool
#undef vector
#undef pixel

Might work!

Cheers,
Sam.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC
  2017-03-03  2:16     ` Sam Bobroff
@ 2017-03-05 21:53       ` Romain Naour
  0 siblings, 0 replies; 8+ messages in thread
From: Romain Naour @ 2017-03-05 21:53 UTC (permalink / raw)
  To: buildroot

Hi Sam,

Le 03/03/2017 ? 03:16, Sam Bobroff a ?crit :
> On Wed, Mar 01, 2017 at 08:52:27PM +0100, Romain Naour wrote:
>> Hi Sam,
>>
>> Le 01/03/2017 ? 03:13, Sam Bobroff a ?crit :
>>> On Wed, Mar 01, 2017 at 12:24:52AM +0100, Romain Naour wrote:
>>>> As reported in this bug report [1], altivec support in SDL break
>>>> arbitrary C++ code.
>>>>
>>>> Issue reported by test-pkg script while testing supertux package:
>>>>     error: could not convert 'true' from 'bool' to '__vector(4) __bool int'
>>>>
>>>> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
>>>>
>>>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>>>> Cc: Sam Bobroff <sam.bobroff@au1.ibm.com>
>>>
>>> Hi Romain,
>>>
>>> If you want to keep alitvec support on you can probably work around this
>>> problem by using -std=gnu99 (which I used for mpv, see
>>> package/mpv/0002-fix-powerpc64-altivec.patch).
>>
>> Thanks for the help!
>>
>> But the error come from a C++ build :
>> In file included from
>> output/build/supertux-0.5.1/external/tinygettext/src/dictionary_manager.cpp:30:0:
>> output/build/supertux-0.5.1/external/tinygettext/include/tinygettext/po_parser.hpp:50:96:
>> error: could not convert ?true? from ?bool? to ?__vector(4) __bool int?
>>    POParser(const std::string& filename, std::istream& in_, Dictionary& dict_,
>> bool use_fuzzy = true);
>>
>> What do you think about removing altivec.h from SDL_cpuinfo.h as suggested in
>> the bug report ?
>>
>> Otherwise, I'm not using a powerpc so we can keep altivec support disabled for
>> now...
>>
>> Best regards,
>> Romain
> 
> Oh, I hadn't seen this with c++ before but I reproduced it easily when
> using -std=c++0x (as discussed in the bug report you linked).
> 
> Were you using that flag during your compile?
> 
> If you don't need c++0x, removing it might work around the problem but
> if you can't do that (or it doesn't work), and your problem is showing
> up in a non-altivec context (e.g. the code is expecting bool to be a
> normal bool) then I think you can #undef the re-defined keywords (the
> altivec header suggests that this is OK for C++). e.g.:
> 
> #include <altivec.h>
> #undef bool
> #undef vector
> #undef pixel
> 
> Might work!

I believe it's a C++11 issue (-std=gnu++11 vs -std=c++11).

See the same issue has been fixed in stella package:
https://git.busybox.net/buildroot/commit/?id=0024465d8a7b51f7fc7c9e8581072695d869adca

I'll check if it work...

Best regards,
Romain

> 
> Cheers,
> Sam.
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-03-05 21:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 23:24 [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC Romain Naour
2017-02-28 23:24 ` [Buildroot] [PATCH v2 2/2] package/supertux: new package Romain Naour
2017-03-01 21:58   ` Romain Naour
2017-03-01  2:13 ` [Buildroot] [PATCH v2 1/2] package/sdl2: disable altivec built-in function for PowerPC Sam Bobroff
2017-03-01 19:52   ` Romain Naour
2017-03-03  2:16     ` Sam Bobroff
2017-03-05 21:53       ` Romain Naour
2017-03-01 20:54 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.