[MacPorts] #72192: x264 @0.164.3108 fails at configure with gcc-4.2

MacPorts noreply at macports.org
Fri Mar 14 10:48:21 UTC 2025


#72192: x264 @0.164.3108 fails at configure with gcc-4.2
---------------------------+------------------------
  Reporter:  barracuda156  |      Owner:  mohd-akram
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.10.5
Resolution:                |   Keywords:
      Port:  x264          |
---------------------------+------------------------

Comment (by barracuda156):

 Configure works with gcc14, once `-fastf` is patched out (unsupported with
 non-Apple gcc, apparently).
 However the Altivec patch does not work due to incompatible pointer types
 (which is now an error):

 {{{
 /opt/local/bin/gcc-mp-14 -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math
 -pipe -arch ppc -Wall -I. -I. -faltivec  -mcpu=G4 -std=gnu99 -D_GNU_SOURCE
 -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden
 -DX264_API_EXPORTS -c encoder/cavlc.c -o encoder/cavlc-8.o
 -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
 /opt/local/bin/gcc-mp-14 -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math
 -pipe -arch ppc -Wall -I. -I. -faltivec  -mcpu=G4 -std=gnu99 -D_GNU_SOURCE
 -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden
 -DX264_API_EXPORTS -c encoder/encoder.c -o encoder/encoder-8.o
 -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
 /opt/local/bin/gcc-mp-14 -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math
 -pipe -arch ppc -Wall -I. -I. -faltivec  -mcpu=G4 -std=gnu99 -D_GNU_SOURCE
 -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden
 -DX264_API_EXPORTS -c encoder/lookahead.c -o encoder/lookahead-8.o
 -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
 /opt/local/bin/gcc-mp-14 -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math
 -pipe -arch ppc -Wall -I. -I. -faltivec  -mcpu=G4 -std=gnu99 -D_GNU_SOURCE
 -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden
 -DX264_API_EXPORTS -c common/threadpool.c -o common/threadpool-8.o
 -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
 /opt/local/bin/gcc-mp-14 -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math
 -pipe -arch ppc -Wall -I. -I. -faltivec  -mcpu=G4 -std=gnu99 -D_GNU_SOURCE
 -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden
 -DX264_API_EXPORTS -c common/ppc/dct.c -o common/ppc/dct-8.o
 -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
 In file included from common/ppc/dct.c:28:
 common/ppc/ppccommon.h:335:9: warning: "vec_absd" redefined
   335 | #define vec_absd( a, b ) vec_sub( vec_max( a, b ), vec_min( a, b )
 )
       |         ^~~~~~~~
 In file included from /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/altivec.h:58,
                  from <command-line>:
 /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/rs6000-vecdefines.h:26:9: note: this is the
 location of the previous definition
    26 | #define vec_absd __builtin_vec_vadu
       |         ^~~~~~~~
 /opt/local/bin/gcc-mp-14 -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math
 -pipe -arch ppc -Wall -I. -I. -faltivec  -mcpu=G4 -std=gnu99 -D_GNU_SOURCE
 -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden
 -DX264_API_EXPORTS -c common/ppc/deblock.c -o common/ppc/deblock-8.o
 -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
 /opt/local/bin/gcc-mp-14 -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math
 -pipe -arch ppc -Wall -I. -I. -faltivec  -mcpu=G4 -std=gnu99 -D_GNU_SOURCE
 -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden
 -DX264_API_EXPORTS -c common/ppc/mc.c -o common/ppc/mc-8.o
 -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
 In file included from common/ppc/deblock.c:27:
 common/ppc/ppccommon.h:335:9: warning: "vec_absd" redefined
   335 | #define vec_absd( a, b ) vec_sub( vec_max( a, b ), vec_min( a, b )
 )
       |         ^~~~~~~~
 In file included from /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/altivec.h:58,
                  from <command-line>:
 /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/rs6000-vecdefines.h:26:9: note: this is the
 location of the previous definition
    26 | #define vec_absd __builtin_vec_vadu
       |         ^~~~~~~~
 In file included from common/ppc/mc.c:28:
 common/ppc/ppccommon.h:335:9: warning: "vec_absd" redefined
   335 | #define vec_absd( a, b ) vec_sub( vec_max( a, b ), vec_min( a, b )
 )
       |         ^~~~~~~~
 In file included from /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/altivec.h:58,
                  from <command-line>:
 /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/rs6000-vecdefines.h:26:9: note: this is the
 location of the previous definition
    26 | #define vec_absd __builtin_vec_vadu
       |         ^~~~~~~~
 /opt/local/bin/gcc-mp-14 -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math
 -pipe -arch ppc -Wall -I. -I. -faltivec  -mcpu=G4 -std=gnu99 -D_GNU_SOURCE
 -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden
 -DX264_API_EXPORTS -c common/ppc/pixel.c -o common/ppc/pixel-8.o
 -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
 /opt/local/bin/gcc-mp-14 -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math
 -pipe -arch ppc -Wall -I. -I. -faltivec  -mcpu=G4 -std=gnu99 -D_GNU_SOURCE
 -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden
 -DX264_API_EXPORTS -c common/ppc/predict.c -o common/ppc/predict-8.o
 -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
 In file included from common/ppc/pixel.c:28:
 common/ppc/ppccommon.h:335:9: warning: "vec_absd" redefined
   335 | #define vec_absd( a, b ) vec_sub( vec_max( a, b ), vec_min( a, b )
 )
       |         ^~~~~~~~
 In file included from /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/altivec.h:58,
                  from <command-line>:
 /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/rs6000-vecdefines.h:26:9: note: this is the
 location of the previous definition
    26 | #define vec_absd __builtin_vec_vadu
       |         ^~~~~~~~
 In file included from common/ppc/predict.c:27:
 common/ppc/ppccommon.h:335:9: warning: "vec_absd" redefined
   335 | #define vec_absd( a, b ) vec_sub( vec_max( a, b ), vec_min( a, b )
 )
       |         ^~~~~~~~
 In file included from /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/altivec.h:58,
                  from <command-line>:
 /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/rs6000-vecdefines.h:26:9: note: this is the
 location of the previous definition
    26 | #define vec_absd __builtin_vec_vadu
       |         ^~~~~~~~
 common/ppc/pixel.c: In function 'pixel_sad_x3_8x8_altivec':
 common/ppc/pixel.c:896:1: warning: no return statement in function
 returning non-void [-Wreturn-type]
   896 | PIXEL_SAD_X3_ALTIVEC( pixel_sad_x3_8x8_altivec, 4 )
       | ^~~~~~~~~~~~~~~~~~~~
 common/ppc/pixel.c: In function 'pixel_sad_x3_8x16_altivec':
 common/ppc/pixel.c:897:1: warning: no return statement in function
 returning non-void [-Wreturn-type]
   897 | PIXEL_SAD_X3_ALTIVEC( pixel_sad_x3_8x16_altivec, 8 )
       | ^~~~~~~~~~~~~~~~~~~~
 In file included from ./common/base.h:43,
                  from ./common/common.h:30,
                  from common/ppc/pixel.c:27:
 common/ppc/pixel.c: In function 'pixel_sad_x4_8x8_altivec':
 common/ppc/pixel.c:975:21: warning: unused variable 'sum2' [-Wunused-
 variable]
   975 |     ALIGNED_16( int sum2 );
 \
       |                     ^~~~
 ./common/osdep.h:285:35: note: in definition of macro 'DECLARE_ALIGNED'
   285 | #define DECLARE_ALIGNED( var, n ) var __attribute__((aligned(n)))
       |                                   ^~~
 common/ppc/pixel.c:975:5: note: in expansion of macro 'ALIGNED_16'
   975 |     ALIGNED_16( int sum2 );
 \
       |     ^~~~~~~~~~
 common/ppc/pixel.c:1008:1: note: in expansion of macro
 'PIXEL_SAD_X4_ALTIVEC'
  1008 | PIXEL_SAD_X4_ALTIVEC( pixel_sad_x4_8x8_altivec, 4 )
       | ^~~~~~~~~~~~~~~~~~~~
 common/ppc/pixel.c:974:21: warning: unused variable 'sum1' [-Wunused-
 variable]
   974 |     ALIGNED_16( int sum1 );
 \
       |                     ^~~~
 ./common/osdep.h:285:35: note: in definition of macro 'DECLARE_ALIGNED'
   285 | #define DECLARE_ALIGNED( var, n ) var __attribute__((aligned(n)))
       |                                   ^~~
 common/ppc/pixel.c:974:5: note: in expansion of macro 'ALIGNED_16'
   974 |     ALIGNED_16( int sum1 );
 \
       |     ^~~~~~~~~~
 common/ppc/pixel.c:1008:1: note: in expansion of macro
 'PIXEL_SAD_X4_ALTIVEC'
  1008 | PIXEL_SAD_X4_ALTIVEC( pixel_sad_x4_8x8_altivec, 4 )
       | ^~~~~~~~~~~~~~~~~~~~
 common/ppc/pixel.c:973:21: warning: unused variable 'sum0' [-Wunused-
 variable]
   973 |     ALIGNED_16( int sum0 );
 \
       |                     ^~~~
 ./common/osdep.h:285:35: note: in definition of macro 'DECLARE_ALIGNED'
   285 | #define DECLARE_ALIGNED( var, n ) var __attribute__((aligned(n)))
       |                                   ^~~
 common/ppc/pixel.c:973:5: note: in expansion of macro 'ALIGNED_16'
   973 |     ALIGNED_16( int sum0 );
 \
       |     ^~~~~~~~~~
 common/ppc/pixel.c:1008:1: note: in expansion of macro
 'PIXEL_SAD_X4_ALTIVEC'
  1008 | PIXEL_SAD_X4_ALTIVEC( pixel_sad_x4_8x8_altivec, 4 )
       | ^~~~~~~~~~~~~~~~~~~~
 common/ppc/pixel.c:1008:1: warning: no return statement in function
 returning non-void [-Wreturn-type]
 common/ppc/pixel.c: In function 'pixel_sad_x4_8x16_altivec':
 common/ppc/pixel.c:975:21: warning: unused variable 'sum2' [-Wunused-
 variable]
   975 |     ALIGNED_16( int sum2 );
 \
       |                     ^~~~
 ./common/osdep.h:285:35: note: in definition of macro 'DECLARE_ALIGNED'
   285 | #define DECLARE_ALIGNED( var, n ) var __attribute__((aligned(n)))
       |                                   ^~~
 common/ppc/pixel.c:975:5: note: in expansion of macro 'ALIGNED_16'
   975 |     ALIGNED_16( int sum2 );
 \
       |     ^~~~~~~~~~
 common/ppc/pixel.c:1009:1: note: in expansion of macro
 'PIXEL_SAD_X4_ALTIVEC'
  1009 | PIXEL_SAD_X4_ALTIVEC( pixel_sad_x4_8x16_altivec, 8 )
       | ^~~~~~~~~~~~~~~~~~~~
 /opt/local/bin/gcc-mp-14 -Wno-maybe-uninitialized -Wshadow -O3 -ffast-math
 -pipe -arch ppc -Wall -I. -I. -faltivec  -mcpu=G4 -std=gnu99 -D_GNU_SOURCE
 -fPIC -fomit-frame-pointer -fno-tree-vectorize -fvisibility=hidden
 -DX264_API_EXPORTS -c common/ppc/quant.c -o common/ppc/quant-8.o
 -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8
 common/ppc/pixel.c:974:21: warning: unused variable 'sum1' [-Wunused-
 variable]
   974 |     ALIGNED_16( int sum1 );
 \
       |                     ^~~~
 ./common/osdep.h:285:35: note: in definition of macro 'DECLARE_ALIGNED'
   285 | #define DECLARE_ALIGNED( var, n ) var __attribute__((aligned(n)))
       |                                   ^~~
 common/ppc/pixel.c:974:5: note: in expansion of macro 'ALIGNED_16'
   974 |     ALIGNED_16( int sum1 );
 \
       |     ^~~~~~~~~~
 common/ppc/pixel.c:1009:1: note: in expansion of macro
 'PIXEL_SAD_X4_ALTIVEC'
  1009 | PIXEL_SAD_X4_ALTIVEC( pixel_sad_x4_8x16_altivec, 8 )
       | ^~~~~~~~~~~~~~~~~~~~
 common/ppc/pixel.c:973:21: warning: unused variable 'sum0' [-Wunused-
 variable]
   973 |     ALIGNED_16( int sum0 );
 \
       |                     ^~~~
 ./common/osdep.h:285:35: note: in definition of macro 'DECLARE_ALIGNED'
   285 | #define DECLARE_ALIGNED( var, n ) var __attribute__((aligned(n)))
       |                                   ^~~
 common/ppc/pixel.c:973:5: note: in expansion of macro 'ALIGNED_16'
   973 |     ALIGNED_16( int sum0 );
 \
       |     ^~~~~~~~~~
 common/ppc/pixel.c:1009:1: note: in expansion of macro
 'PIXEL_SAD_X4_ALTIVEC'
  1009 | PIXEL_SAD_X4_ALTIVEC( pixel_sad_x4_8x16_altivec, 8 )
       | ^~~~~~~~~~~~~~~~~~~~
 common/ppc/pixel.c:1009:1: warning: no return statement in function
 returning non-void [-Wreturn-type]
 common/ppc/pixel.c: In function 'x264_8_pixel_init_altivec':
 common/ppc/pixel.c:1576:31: error: assignment to 'x264_pixel_cmp_x3_t'
 {aka 'void (*)(unsigned char *, unsigned char *, unsigned char *, unsigned
 char *, long int,  int *)'} from incompatible pointer type 'int
 (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, intptr_t,  int *)' {aka
 'int (*)(unsigned char *, unsigned char *, unsigned char *, unsigned char
 *, long int,  int *)'} [-Wincompatible-pointer-types]
  1576 |     pixf->sad_x3[PIXEL_8x16]  = pixel_sad_x3_8x16_altivec;
       |                               ^
 common/ppc/pixel.c:1578:31: error: assignment to 'x264_pixel_cmp_x3_t'
 {aka 'void (*)(unsigned char *, unsigned char *, unsigned char *, unsigned
 char *, long int,  int *)'} from incompatible pointer type 'int
 (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, intptr_t,  int *)' {aka
 'int (*)(unsigned char *, unsigned char *, unsigned char *, unsigned char
 *, long int,  int *)'} [-Wincompatible-pointer-types]
  1578 |     pixf->sad_x3[PIXEL_8x8]   = pixel_sad_x3_8x8_altivec;
       |                               ^
 common/ppc/pixel.c:1581:31: error: assignment to 'x264_pixel_cmp_x4_t'
 {aka 'void (*)(unsigned char *, unsigned char *, unsigned char *, unsigned
 char *, unsigned char *, long int,  int *)'} from incompatible pointer
 type 'int (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, uint8_t *,
 intptr_t,  int *)' {aka 'int (*)(unsigned char *, unsigned char *,
 unsigned char *, unsigned char *, unsigned char *, long int,  int *)'}
 [-Wincompatible-pointer-types]
  1581 |     pixf->sad_x4[PIXEL_8x16]  = pixel_sad_x4_8x16_altivec;
       |                               ^
 common/ppc/pixel.c:1583:31: error: assignment to 'x264_pixel_cmp_x4_t'
 {aka 'void (*)(unsigned char *, unsigned char *, unsigned char *, unsigned
 char *, unsigned char *, long int,  int *)'} from incompatible pointer
 type 'int (*)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, uint8_t *,
 intptr_t,  int *)' {aka 'int (*)(unsigned char *, unsigned char *,
 unsigned char *, unsigned char *, unsigned char *, long int,  int *)'}
 [-Wincompatible-pointer-types]
  1583 |     pixf->sad_x4[PIXEL_8x8]   = pixel_sad_x4_8x8_altivec;
       |                               ^
 In file included from common/ppc/quant.c:27:
 common/ppc/ppccommon.h:335:9: warning: "vec_absd" redefined
   335 | #define vec_absd( a, b ) vec_sub( vec_max( a, b ), vec_min( a, b )
 )
       |         ^~~~~~~~
 In file included from /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/altivec.h:58,
                  from <command-line>:
 /opt/local/lib/gcc14/gcc/powerpc-apple-
 darwin10/14.2.0/include/rs6000-vecdefines.h:26:9: note: this is the
 location of the previous definition
    26 | #define vec_absd __builtin_vec_vadu
       |         ^~~~~~~~
 make: *** [common/ppc/pixel-8.o] Error 1
 make: *** Waiting for unfinished jobs....
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/72192#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list