Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 2019 11:03:05 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 240531] multimedia/kvazaar: fix build on powerpc64 elfv2
Message-ID:  <bug-240531-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240531

            Bug ID: 240531
           Summary: multimedia/kvazaar: fix build on powerpc64 elfv2
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: jbeich@FreeBSD.org
          Reporter: pkubaj@FreeBSD.org
          Assignee: jbeich@FreeBSD.org
             Flags: maintainer-feedback?(jbeich@FreeBSD.org)

Created attachment 207417
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D207417&action=
=3Dedit
patch

Reported at:
https://github.com/ultravideo/kvazaar/issues/245

I use LLVM 8.0.1 on FreeBSD/powerpc64.

Currently build fails with:

libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -DKVZ_DLL_EXPORTS -maltivec
-pthread -Wall -Wextra -Wvla -Wno-sign-compare -Wno-unused-parameter -I./src
-I./src/extras -ftree-vectorize -fvisibility=3Dhidden -O2 -pipe
-fstack-protector-strong -fno-strict-aliasing -MT
strategies/altivec/libaltivec_la-picture-altivec.lo -MD -MP -MF
strategies/altivec/.deps/libaltivec_la-picture-altivec.Tpo -c
strategies/altivec/picture-altivec.c  -fPIC -DPIC -o
strategies/altivec/.libs/libaltivec_la-picture-altivec.o
In file included from strategies/altivec/picture-altivec.c:24:
/usr/lib/clang/8.0.1/include/altivec.h:69:19: error: unknown type name 'vec=
tor'
static __inline__ vector bool char __ATTRS_o_ai
                  ^
/usr/lib/clang/8.0.1/include/altivec.h:69:26: error: expected identifier or=
 '('
static __inline__ vector bool char __ATTRS_o_ai
                         ^
/usr/include/stdbool.h:39:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
In file included from strategies/altivec/picture-altivec.c:24:
/usr/lib/clang/8.0.1/include/altivec.h:80:19: error: unknown type name 'vec=
tor'
static __inline__ vector bool short __ATTRS_o_ai vec_perm(
                  ^
/usr/lib/clang/8.0.1/include/altivec.h:80:26: error: expected identifier or=
 '('
static __inline__ vector bool short __ATTRS_o_ai vec_perm(
                         ^
/usr/include/stdbool.h:39:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
In file included from strategies/altivec/picture-altivec.c:24:
/usr/lib/clang/8.0.1/include/altivec.h:94:19: error: unknown type name 'vec=
tor'
static __inline__ vector bool int __ATTRS_o_ai
                  ^
/usr/lib/clang/8.0.1/include/altivec.h:94:26: error: expected identifier or=
 '('
static __inline__ vector bool int __ATTRS_o_ai
                         ^
/usr/include/stdbool.h:39:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
In file included from strategies/altivec/picture-altivec.c:24:
/usr/lib/clang/8.0.1/include/altivec.h:217:9: error: unknown type name 'vec=
tor'
vec_add(vector bool char __a, vector signed char __b) {
        ^
/usr/lib/clang/8.0.1/include/altivec.h:217:16: error: expected ')'
vec_add(vector bool char __a, vector signed char __b) {
               ^
/usr/include/stdbool.h:39:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
/usr/lib/clang/8.0.1/include/altivec.h:217:8: note: to match this '('
vec_add(vector bool char __a, vector signed char __b) {
       ^
/usr/lib/clang/8.0.1/include/altivec.h:217:16: error: parameter name omitted
vec_add(vector bool char __a, vector signed char __b) {
               ^
/usr/include/stdbool.h:39:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
In file included from strategies/altivec/picture-altivec.c:24:
/usr/lib/clang/8.0.1/include/altivec.h:218:30: error: use of undeclared
identifier '__a'
  return (vector signed char)__a + __b;
                             ^
/usr/lib/clang/8.0.1/include/altivec.h:218:36: error: use of undeclared
identifier '__b'
  return (vector signed char)__a + __b;
                                   ^
/usr/lib/clang/8.0.1/include/altivec.h:222:33: error: unknown type name
'vector'
vec_add(vector signed char __a, vector bool char __b) {
                                ^
/usr/lib/clang/8.0.1/include/altivec.h:222:40: error: expected ')'
vec_add(vector signed char __a, vector bool char __b) {
                                       ^
/usr/include/stdbool.h:39:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
/usr/lib/clang/8.0.1/include/altivec.h:222:8: note: to match this '('
vec_add(vector signed char __a, vector bool char __b) {
       ^
/usr/lib/clang/8.0.1/include/altivec.h:222:40: error: parameter name omitted
vec_add(vector signed char __a, vector bool char __b) {
                                       ^
/usr/include/stdbool.h:39:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
In file included from strategies/altivec/picture-altivec.c:24:
/usr/lib/clang/8.0.1/include/altivec.h:223:36: error: use of undeclared
identifier '__b'
  return __a + (vector signed char)__b;
                                   ^
/usr/lib/clang/8.0.1/include/altivec.h:232:9: error: unknown type name 'vec=
tor'
vec_add(vector bool char __a, vector unsigned char __b) {
        ^
/usr/lib/clang/8.0.1/include/altivec.h:232:16: error: expected ')'
vec_add(vector bool char __a, vector unsigned char __b) {
               ^
/usr/include/stdbool.h:39:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
/usr/lib/clang/8.0.1/include/altivec.h:232:8: note: to match this '('
vec_add(vector bool char __a, vector unsigned char __b) {
       ^
/usr/lib/clang/8.0.1/include/altivec.h:232:16: error: parameter name omitted
vec_add(vector bool char __a, vector unsigned char __b) {
               ^
/usr/include/stdbool.h:39:14: note: expanded from macro 'bool'
#define bool    _Bool
                ^
In file included from strategies/altivec/picture-altivec.c:24:
/usr/lib/clang/8.0.1/include/altivec.h:233:32: error: use of undeclared
identifier '__a'
  return (vector unsigned char)__a + __b;
                               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=3D]

If I remove include <altivec.h> from strategies/altivec/picture-altivec.c a=
nd
put it above global.h in strategies/altivec/picture-altivec.h or above
stdbool.h in global.h, build works.

Would it be possible replace including <stdbool.h> with:
typedef enum { false, true } bool;?

I can confirm that it works.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-240531-7788>