Opened 3 years ago

Closed 2 years ago

#64781 closed defect (fixed)

x265: can we fix Altivec for PowerPC?

Reported by: barracuda156 Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: powerpc, leopard, ppc64 Cc:
Port: x265

Description

[  5%] Building CXX object common/CMakeFiles/common.dir/ppc/pixel_altivec.cpp.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64/encoder && /usr/bin/g++-4.2 -DEXPORT_C_API=1 -DHAVE_ALTIVEC=1 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DMACOS=1 -DPPC64=1 -DX265_ARCH_POWER8=1 -DX265_ARCH_POWER=1 -DX265_DEPTH=8 -DX265_NS=x265 -D__STDC_LIMIT_MACROS=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64 -pipe -Os -DNDEBUG -I/opt/local/include -I/opt/local/include/LegacySupport -arch ppc64 -mmacosx-version-min=10.5   -Wall -Wextra -Wshadow -std=gnu++98 -ffast-math -fno-exceptions -maltivec -mabi=altivec -flax-vector-conversions -fpermissive -mcpu=power8 -Wno-uninitialized -MD -MT encoder/CMakeFiles/encoder.dir/search.cpp.o -MF CMakeFiles/encoder.dir/search.cpp.o.d -o CMakeFiles/encoder.dir/search.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder/search.cpp
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64/encoder && /usr/bin/g++-4.2 -DEXPORT_C_API=1 -DHAVE_ALTIVEC=1 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DMACOS=1 -DPPC64=1 -DX265_ARCH_POWER8=1 -DX265_ARCH_POWER=1 -DX265_DEPTH=8 -DX265_NS=x265 -D__STDC_LIMIT_MACROS=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64 -pipe -Os -DNDEBUG -I/opt/local/include -I/opt/local/include/LegacySupport -arch ppc64 -mmacosx-version-min=10.5   -Wall -Wextra -Wshadow -std=gnu++98 -ffast-math -fno-exceptions -maltivec -mabi=altivec -flax-vector-conversions -fpermissive -mcpu=power8 -Wno-uninitialized -MD -MT encoder/CMakeFiles/encoder.dir/bitcost.cpp.o -MF CMakeFiles/encoder.dir/bitcost.cpp.o.d -o CMakeFiles/encoder.dir/bitcost.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder/bitcost.cpp
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64/common && /usr/bin/g++-4.2 -DEXPORT_C_API=1 -DHAVE_ALTIVEC=1 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DMACOS=1 -DPPC64=1 -DX265_ARCH_POWER8=1 -DX265_ARCH_POWER=1 -DX265_DEPTH=8 -DX265_NS=x265 -D__STDC_LIMIT_MACROS=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64 -pipe -Os -DNDEBUG -I/opt/local/include -I/opt/local/include/LegacySupport -arch ppc64 -mmacosx-version-min=10.5   -Wall -Wextra -Wshadow -std=gnu++98 -ffast-math -fno-exceptions -maltivec -mabi=altivec -flax-vector-conversions -fpermissive -mcpu=power8 -Wno-unused  -Wno-unknown-pragmas -Wno-maybe-uninitialized -MD -MT common/CMakeFiles/common.dir/ppc/pixel_altivec.cpp.o -MF CMakeFiles/common.dir/ppc/pixel_altivec.cpp.o.d -o CMakeFiles/common.dir/ppc/pixel_altivec.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/pixel_altivec.cpp
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder/search.cpp:1: error: bad value (power8) for -mcpu= switch
cc1plus: error: unrecognized command line option "-Wno-maybe-uninitialized"
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder/analysis.cpp:1: error: bad value (power8) for -mcpu= switch
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder/bitcost.cpp:1: error: bad value (power8) for -mcpu= switch
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/pixel_altivec.cpp:1: error: bad value (power8) for -mcpu= switch
make[2]: *** [encoder/CMakeFiles/encoder.dir/search.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [encoder/CMakeFiles/encoder.dir/analysis.cpp.o] Error 1
make[2]: *** [encoder/CMakeFiles/encoder.dir/bitcost.cpp.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64'
make[1]: *** [encoder/CMakeFiles/encoder.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [common/CMakeFiles/common.dir/ppc/pixel_altivec.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[  8%] Building CXX object common/CMakeFiles/common.dir/ppc/dct_altivec.cpp.o
[ 10%] Building CXX object common/CMakeFiles/common.dir/ppc/ipfilter_altivec.cpp.o
[ 10%] Building CXX object common/CMakeFiles/common.dir/ppc/intrapred_altivec.cpp.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64/common && /usr/bin/g++-4.2 -DEXPORT_C_API=1 -DHAVE_ALTIVEC=1 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DMACOS=1 -DPPC64=1 -DX265_ARCH_POWER8=1 -DX265_ARCH_POWER=1 -DX265_DEPTH=8 -DX265_NS=x265 -D__STDC_LIMIT_MACROS=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64 -pipe -Os -DNDEBUG -I/opt/local/include -I/opt/local/include/LegacySupport -arch ppc64 -mmacosx-version-min=10.5   -Wall -Wextra -Wshadow -std=gnu++98 -ffast-math -fno-exceptions -maltivec -mabi=altivec -flax-vector-conversions -fpermissive -mcpu=power8 -Wno-unused  -Wno-unknown-pragmas -Wno-maybe-uninitialized -MD -MT common/CMakeFiles/common.dir/ppc/dct_altivec.cpp.o -MF CMakeFiles/common.dir/ppc/dct_altivec.cpp.o.d -o CMakeFiles/common.dir/ppc/dct_altivec.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/dct_altivec.cpp
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64/common && /usr/bin/g++-4.2 -DEXPORT_C_API=1 -DHAVE_ALTIVEC=1 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DMACOS=1 -DPPC64=1 -DX265_ARCH_POWER8=1 -DX265_ARCH_POWER=1 -DX265_DEPTH=8 -DX265_NS=x265 -D__STDC_LIMIT_MACROS=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64 -pipe -Os -DNDEBUG -I/opt/local/include -I/opt/local/include/LegacySupport -arch ppc64 -mmacosx-version-min=10.5   -Wall -Wextra -Wshadow -std=gnu++98 -ffast-math -fno-exceptions -maltivec -mabi=altivec -flax-vector-conversions -fpermissive -mcpu=power8 -Wno-unused  -Wno-unknown-pragmas -Wno-maybe-uninitialized -MD -MT common/CMakeFiles/common.dir/ppc/intrapred_altivec.cpp.o -MF CMakeFiles/common.dir/ppc/intrapred_altivec.cpp.o.d -o CMakeFiles/common.dir/ppc/intrapred_altivec.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/intrapred_altivec.cpp
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64/common && /usr/bin/g++-4.2 -DEXPORT_C_API=1 -DHAVE_ALTIVEC=1 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DMACOS=1 -DPPC64=1 -DX265_ARCH_POWER8=1 -DX265_ARCH_POWER=1 -DX265_DEPTH=8 -DX265_NS=x265 -D__STDC_LIMIT_MACROS=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64 -pipe -Os -DNDEBUG -I/opt/local/include -I/opt/local/include/LegacySupport -arch ppc64 -mmacosx-version-min=10.5   -Wall -Wextra -Wshadow -std=gnu++98 -ffast-math -fno-exceptions -maltivec -mabi=altivec -flax-vector-conversions -fpermissive -mcpu=power8 -Wno-unused  -Wno-unknown-pragmas -Wno-maybe-uninitialized -MD -MT common/CMakeFiles/common.dir/ppc/ipfilter_altivec.cpp.o -MF CMakeFiles/common.dir/ppc/ipfilter_altivec.cpp.o.d -o CMakeFiles/common.dir/ppc/ipfilter_altivec.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/ipfilter_altivec.cpp
cc1plus: error: unrecognized command line option "-Wno-maybe-uninitialized"
cc1plus: error: unrecognized command line option "-Wno-maybe-uninitialized"
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/ipfilter_altivec.cpp:1: error: bad value (power8) for -mcpu= switch
cc1plus: error: unrecognized command line option "-Wno-maybe-uninitialized"
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/dct_altivec.cpp:1: error: bad value (power8) for -mcpu= switch
make[2]: *** [common/CMakeFiles/common.dir/ppc/ipfilter_altivec.cpp.o] Error 1
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/intrapred_altivec.cpp:1: error: bad value (power8) for -mcpu= switch
make[2]: *** [common/CMakeFiles/common.dir/ppc/dct_altivec.cpp.o] Error 1
make[2]: *** [common/CMakeFiles/common.dir/ppc/intrapred_altivec.cpp.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64'
make[1]: *** [common/CMakeFiles/common.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64" && /usr/bin/make -j4 -w all VERBOSE=ON 
Exit code: 2
Error: Failed to build x265: command execution failed

Attachments (4)

main.log (153.1 KB) - added by barracuda156 3 years ago.
CMakeOutput.log (43.9 KB) - added by barracuda156 3 years ago.
CMakeError.log (3.2 KB) - added by barracuda156 3 years ago.
main_altivec.log (318.2 KB) - added by barracuda156 3 years ago.
10.5.8, gcc6

Download all attachments as: .zip

Change History (12)

Changed 3 years ago by barracuda156

Attachment: main.log added

Changed 3 years ago by barracuda156

Attachment: CMakeOutput.log added

Changed 3 years ago by barracuda156

Attachment: CMakeError.log added

comment:1 Changed 3 years ago by barracuda156

I got this now:

cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64/common && /usr/bin/g++-4.2 -DEXPORT_C_API=1 -DHAVE_ALTIVEC=1 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DMACOS=1 -DPPC64=1 -DX265_ARCH_POWER8=1 -DX265_ARCH_POWER=1 -DX265_DEPTH=8 -DX265_NS=x265 -D__STDC_LIMIT_MACROS=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64 -pipe -Os -DNDEBUG -I/opt/local/include -I/opt/local/include/LegacySupport -arch ppc64 -mmacosx-version-min=10.5   -Wall -Wextra -Wshadow -std=gnu++98 -ffast-math -fno-exceptions -maltivec -mabi=altivec -flax-vector-conversions -fpermissive -mcpu=power8 -Wno-unused  -Wno-unknown-pragmas -Wno-maybe-uninitialized -MD -MT common/CMakeFiles/common.dir/ppc/pixel_altivec.cpp.o -MF CMakeFiles/common.dir/ppc/pixel_altivec.cpp.o.d -o CMakeFiles/common.dir/ppc/pixel_altivec.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/pixel_altivec.cpp
[  5%] Building CXX object encoder/CMakeFiles/encoder.dir/analysis.cpp.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64/encoder && /usr/bin/g++-4.2 -DEXPORT_C_API=1 -DHAVE_ALTIVEC=1 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DMACOS=1 -DPPC64=1 -DX265_ARCH_POWER8=1 -DX265_ARCH_POWER=1 -DX265_DEPTH=8 -DX265_NS=x265 -D__STDC_LIMIT_MACROS=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64 -pipe -Os -DNDEBUG -I/opt/local/include -I/opt/local/include/LegacySupport -arch ppc64 -mmacosx-version-min=10.5   -Wall -Wextra -Wshadow -std=gnu++98 -ffast-math -fno-exceptions -maltivec -mabi=altivec -flax-vector-conversions -fpermissive -mcpu=power8 -Wno-uninitialized -MD -MT encoder/CMakeFiles/encoder.dir/analysis.cpp.o -MF CMakeFiles/encoder.dir/analysis.cpp.o.d -o CMakeFiles/encoder.dir/analysis.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder/analysis.cpp
cc1plus: error: unrecognized command line option "-Wno-maybe-uninitialized"
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder/bitcost.cpp:1: error: bad value (power8) for -mcpu= switch
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder/analysis.cpp:1: error: bad value (power8) for -mcpu= switch
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/pixel_altivec.cpp:1: error: bad value (power8) for -mcpu= switch
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder/search.cpp:1: error: bad value (power8) for -mcpu= switch
make[2]: *** [encoder/CMakeFiles/encoder.dir/bitcost.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [encoder/CMakeFiles/encoder.dir/analysis.cpp.o] Error 1
make[2]: *** [encoder/CMakeFiles/encoder.dir/search.cpp.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64'
make[2]: *** [common/CMakeFiles/common.dir/ppc/pixel_altivec.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [encoder/CMakeFiles/encoder.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  7%] Building CXX object common/CMakeFiles/common.dir/ppc/dct_altivec.cpp.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64/common && /usr/bin/g++-4.2 -DEXPORT_C_API=1 -DHAVE_ALTIVEC=1 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DMACOS=1 -DPPC64=1 -DX265_ARCH_POWER8=1 -DX265_ARCH_POWER=1 -DX265_DEPTH=8 -DX265_NS=x265 -D__STDC_LIMIT_MACROS=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/encoder -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64 -pipe -Os -DNDEBUG -I/opt/local/include -I/opt/local/include/LegacySupport -arch ppc64 -mmacosx-version-min=10.5   -Wall -Wextra -Wshadow -std=gnu++98 -ffast-math -fno-exceptions -maltivec -mabi=altivec -flax-vector-conversions -fpermissive -mcpu=power8 -Wno-unused  -Wno-unknown-pragmas -Wno-maybe-uninitialized -MD -MT common/CMakeFiles/common.dir/ppc/dct_altivec.cpp.o -MF CMakeFiles/common.dir/ppc/dct_altivec.cpp.o.d -o CMakeFiles/common.dir/ppc/dct_altivec.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/dct_altivec.cpp
cc1plus: error: unrecognized command line option "-Wno-maybe-uninitialized"
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/x265-3.4/source/common/ppc/dct_altivec.cpp:1: error: bad value (power8) for -mcpu= switch
make[2]: *** [common/CMakeFiles/common.dir/ppc/dct_altivec.cpp.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64'
make[1]: *** [common/CMakeFiles/common.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_x265/x265/work/build-ppc64" && /usr/bin/make -j4 -w all VERBOSE=ON 
Exit code: 2
Error: Failed to build x265: command execution failed

comment:2 Changed 3 years ago by barracuda156

Summary: x265 fails for ppc64 on Leopardx265 fails for ppc64 on Leopard: error: bad value (power8) for -mcpu= switch
Version: 2.7.12.7.2

comment:3 Changed 3 years ago by barracuda156

So CMakeLists.txt has the following:

# System architecture detection
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
set(X86_ALIASES x86 i386 i686 x86_64 amd64)
set(ARM_ALIASES armv6l armv7l aarch64)
list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
set(POWER_ALIASES ppc64 ppc64le)
list(FIND POWER_ALIASES "${SYSPROC}" POWERMATCH)
if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
    set(X86 1)
    add_definitions(-DX265_ARCH_X86=1)
    if(CMAKE_CXX_FLAGS STREQUAL "-m32")
        message(STATUS "Detected x86 target processor")
    elseif("${CMAKE_SIZEOF_VOID_P}" MATCHES 8)
        set(X64 1)
        add_definitions(-DX86_64=1)
        message(STATUS "Detected x86_64 target processor")
    endif()
elseif(POWERMATCH GREATER "-1")
    message(STATUS "Detected POWER target processor")
    set(POWER 1)
    add_definitions(-DX265_ARCH_POWER=1)
    if("${CMAKE_SIZEOF_VOID_P}" MATCHES 8)
        set(PPC64 1)
        add_definitions(-DPPC64=1)
        message(STATUS "Detected POWER PPC64 target processor")
    endif()

And:

if(POWER)
    # IBM Power8
    option(ENABLE_ALTIVEC "Enable ALTIVEC profiling instrumentation" ON)
    if(ENABLE_ALTIVEC)
        add_definitions(-DHAVE_ALTIVEC=1 -maltivec -mabi=altivec)
        add_definitions(-flax-vector-conversions -fpermissive)
    else()
        add_definitions(-DHAVE_ALTIVEC=0)
    endif()

    option(CPU_POWER8 "Enable CPU POWER8 profiling instrumentation" ON)
    if(CPU_POWER8)
        add_definitions(-mcpu=power8 -DX265_ARCH_POWER8=1)
    endif()
endif()

Macports patch adds:

--- CMakeLists.txt.orig	2021-01-31 17:45:15.000000000 -0800
+++ CMakeLists.txt	2021-01-31 17:45:51.000000000 -0800
@@ -37,6 +37,10 @@
 
 SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
 
+if(DEFINED OVERRIDE_SYSTEM_PROCESSOR)
+set(CMAKE_SYSTEM_PROCESSOR ${OVERRIDE_SYSTEM_PROCESSOR})
+endif()
+
 # System architecture detection
 string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
 set(X86_ALIASES x86 i386 i686 x86_64 amd64)

So this is possibly the cause: ppc64 makes it think it is on POWER arch, while missing altogether ppc32 does not trigger any silly flags and builds fine.

comment:4 Changed 3 years ago by barracuda156

I made a patch to get rid of Power8 flag and -Wno-maybe-uninitialized and make PowerPC recognized correctly, however x265 Altivec implementation is apparently incompatible with PowerPC, the build fails on source/common/ppc/pixel_altivec.cpp.

Changed 3 years ago by barracuda156

Attachment: main_altivec.log added

10.5.8, gcc6

comment:5 Changed 3 years ago by barracuda156

Summary: x265 fails for ppc64 on Leopard: error: bad value (power8) for -mcpu= switchx265: can we fix Altivec for PowerPC?

comment:6 Changed 3 years ago by barracuda156

Turning off Altivec, I was able to build x265 as +universal:

36-109:source svacchanda$ port -v installed x265
The following ports are currently installed:
  x265 @3.4_0 requested_variants='' platform='darwin 9' archs='ppc' date='2022-03-08T04:22:41+0800'
  x265 @3.5_0+universal (active) requested_variants='+universal' platform='darwin 9' archs='ppc ppc64' date='2022-04-06T05:37:36+0800'

comment:7 Changed 2 years ago by barracuda156

So Altivec implementation uses instructions from later ISA, unsupported on Darwin. Tried adding altivec.h and using gcc12, still fails. We just have to disable Altivec on PPC.

comment:8 Changed 2 years ago by barracuda156

Owner: set to barracuda156
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.