animetosho / par2cmdline-turbo

par2cmdline × ParPar: speed focused par2cmdline fork
http://parchive.sourceforge.net
GNU General Public License v2.0
94 stars 5 forks source link

build failures on ppc64el #18

Closed jcfp closed 1 year ago

jcfp commented 1 year ago

Tried a build of par2-turbo on a launchpad PPA for all currently supported Ubuntu releases and architectures available there (amd64, arm64, armhf, ppc64el, s390x), and got build failures on all Ubuntu releases, for ppc64el only. All other architectures completed fine.

Full build logs via: focal/20.04 jammy/22.04 lunar/23.04 mantic/23.10

With Ubuntu Jammy/22.04 and newer, the errors look very similar across all 3 releases, see excerpt below. On Ubuntu Focal/20.04, errors happen building the same source file, but the full error output is rather long so I'll refrain from posting it here. Please refer to the full build logs linked above for more details, build environment, compiler versions, etc.

g++ -std=c++11 -DHAVE_CONFIG_H -I.  -Iparpar/gf16 -Iparpar/gf16/opencl-include -Wdate-time -D_FORTIFY_SOURCE=2 -DPARPAR_INVERT_SUPPORT -g -O3 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -c -o parpar/gf16/libparpar_gf16_a-controller_ocl.o `test -f 'parpar/gf16/controller_ocl.cpp' || echo './'`parpar/gf16/controller_ocl.cpp
In file included from parpar/gf16/opencl-include/CL/cl.h:34,
                 from parpar/gf16/opencl-include/CL/cl.hpp:172,
                 from parpar/gf16/controller_ocl.h:10,
                 from parpar/gf16/controller_ocl.cpp:5:
parpar/gf16/opencl-include/CL/cl_platform.h:360:12: error: ‘vector’ does not name a type; did you mean ‘vec_or’?
  360 |    typedef vector unsigned char     __cl_uchar16;
      |            ^~~~~~
      |            vec_or
parpar/gf16/opencl-include/CL/cl_platform.h:361:12: error: ‘vector’ does not name a type; did you mean ‘vec_or’?
  361 |    typedef vector signed char       __cl_char16;
      |            ^~~~~~
      |            vec_or
parpar/gf16/opencl-include/CL/cl_platform.h:362:12: error: ‘vector’ does not name a type; did you mean ‘vec_or’?
  362 |    typedef vector unsigned short    __cl_ushort8;
      |            ^~~~~~
      |            vec_or
parpar/gf16/opencl-include/CL/cl_platform.h:363:12: error: ‘vector’ does not name a type; did you mean ‘vec_or’?
  363 |    typedef vector signed short      __cl_short8;
      |            ^~~~~~
      |            vec_or
parpar/gf16/opencl-include/CL/cl_platform.h:364:12: error: ‘vector’ does not name a type; did you mean ‘vec_or’?
  364 |    typedef vector unsigned int      __cl_uint4;
      |            ^~~~~~
      |            vec_or
parpar/gf16/opencl-include/CL/cl_platform.h:365:12: error: ‘vector’ does not name a type; did you mean ‘vec_or’?
  365 |    typedef vector signed int        __cl_int4;
      |            ^~~~~~
      |            vec_or
parpar/gf16/opencl-include/CL/cl_platform.h:366:12: error: ‘vector’ does not name a type; did you mean ‘vec_or’?
  366 |    typedef vector float             __cl_float4;
      |            ^~~~~~
      |            vec_or
In file included from parpar/gf16/opencl-include/CL/cl.h:34,
                 from parpar/gf16/opencl-include/CL/cl.hpp:172,
                 from parpar/gf16/controller_ocl.h:10,
                 from parpar/gf16/controller_ocl.cpp:5:
parpar/gf16/opencl-include/CL/cl_platform.h:591:5: error: ‘__cl_char16’ does not name a type; did you mean ‘cl_char8’?
  591 |     __cl_char16    v16;
      |     ^~~~~~~~~~~
      |     cl_char8
parpar/gf16/opencl-include/CL/cl_platform.h:666:5: error: ‘__cl_uchar16’ does not name a type; did you mean ‘cl_char16’?
  666 |     __cl_uchar16    v16;
      |     ^~~~~~~~~~~~
      |     cl_char16
parpar/gf16/opencl-include/CL/cl_platform.h:719:5: error: ‘__cl_short8’ does not name a type; did you mean ‘cl_short4’?
  719 |     __cl_short8     v8;
      |     ^~~~~~~~~~~
      |     cl_short4
parpar/gf16/opencl-include/CL/cl_platform.h:738:5: error: ‘__cl_short8’ does not name a type; did you mean ‘cl_short8’?
  738 |     __cl_short8     v8[2];
      |     ^~~~~~~~~~~
      |     cl_short8
parpar/gf16/opencl-include/CL/cl_platform.h:794:5: error: ‘__cl_ushort8’ does not name a type; did you mean ‘cl_ushort4’?
  794 |     __cl_ushort8     v8;
      |     ^~~~~~~~~~~~
      |     cl_ushort4
parpar/gf16/opencl-include/CL/cl_platform.h:813:5: error: ‘__cl_ushort8’ does not name a type; did you mean ‘cl_ushort8’?
  813 |     __cl_ushort8     v8[2];
      |     ^~~~~~~~~~~~
      |     cl_ushort8
parpar/gf16/opencl-include/CL/cl_platform.h:846:5: error: ‘__cl_int4’ does not name a type; did you mean ‘cl_int2’?
  846 |     __cl_int4     v4;
      |     ^~~~~~~~~
      |     cl_int2
parpar/gf16/opencl-include/CL/cl_platform.h:865:5: error: ‘__cl_int4’ does not name a type; did you mean ‘cl_int4’?
  865 |     __cl_int4     v4[2];
      |     ^~~~~~~~~
      |     cl_int4
parpar/gf16/opencl-include/CL/cl_platform.h:884:5: error: ‘__cl_int4’ does not name a type; did you mean ‘cl_int4’?
  884 |     __cl_int4     v4[4];
      |     ^~~~~~~~~
      |     cl_int4
parpar/gf16/opencl-include/CL/cl_platform.h:921:5: error: ‘__cl_uint4’ does not name a type; did you mean ‘cl_uint2’?
  921 |     __cl_uint4     v4;
      |     ^~~~~~~~~~
      |     cl_uint2
parpar/gf16/opencl-include/CL/cl_platform.h:940:5: error: ‘__cl_uint4’ does not name a type; did you mean ‘cl_uint4’?
  940 |     __cl_uint4     v4[2];
      |     ^~~~~~~~~~
      |     cl_uint4
parpar/gf16/opencl-include/CL/cl_platform.h:959:5: error: ‘__cl_uint4’ does not name a type; did you mean ‘cl_uint4’?
  959 |     __cl_uint4     v4[4];
      |     ^~~~~~~~~~
      |     cl_uint4
parpar/gf16/opencl-include/CL/cl_platform.h:1146:5: error: ‘__cl_float4’ does not name a type; did you mean ‘cl_float2’?
 1146 |     __cl_float4     v4;
      |     ^~~~~~~~~~~
      |     cl_float2
parpar/gf16/opencl-include/CL/cl_platform.h:1165:5: error: ‘__cl_float4’ does not name a type; did you mean ‘cl_float4’?
 1165 |     __cl_float4     v4[2];
      |     ^~~~~~~~~~~
      |     cl_float4
parpar/gf16/opencl-include/CL/cl_platform.h:1184:5: error: ‘__cl_float4’ does not name a type; did you mean ‘cl_float4’?
 1184 |     __cl_float4     v4[4];
      |     ^~~~~~~~~~~
      |     cl_float4
make[2]: *** [Makefile:2717: parpar/gf16/libparpar_gf16_a-controller_ocl.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /usr/include/c++/11/bits/shared_ptr.h:53,
                 from /usr/include/c++/11/memory:77,
                 from parpar/gf16/threadqueue.h:24,
                 from parpar/gf16/controller.h:10,
                 from parpar/gf16/controller.cpp:1:
/usr/include/c++/11/bits/shared_ptr_base.h: In member function ‘PAR2Proc::_addInput<unsigned short const*>(void const*, unsigned long, unsigned short const*, bool)std::future<void>’:
/usr/include/c++/11/bits/shared_ptr_base.h:735:15: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  735 |         _M_pi = __tmp;
      |         ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/bits/shared_ptr.h:53,
                 from /usr/include/c++/11/memory:77,
                 from src/diskfile.h:43,
                 from src/libpar2internal.h:224,
                 from src/par2repairer.cpp:21:
/usr/include/c++/11/bits/shared_ptr_base.h: In function ‘foreach_parallel<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, unsigned int, std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&)void’:
/usr/include/c++/11/bits/shared_ptr_base.h:735:15: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  735 |         _M_pi = __tmp;
      |         ~~~~~~^~~~~~~
In file included from /usr/include/c++/11/vector:72,
                 from parpar/gf16/controller.h:5,
                 from parpar/gf16/controller_cpu.h:4,
                 from parpar/gf16/controller_cpu.cpp:1:
/usr/include/c++/11/bits/vector.tcc: In member function ‘std::vector<MessageThread, std::allocator<MessageThread> >::_M_default_append(unsigned long)’:
/usr/include/c++/11/bits/vector.tcc:611:5: note: the layout of aggregates containing vectors with 2-byte alignment has changed in GCC 5
  611 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [Makefile:1251: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j4 returned exit code 2
animetosho commented 1 year ago

Thanks for reporting!

Don't quite understand the cause, and not sure if it covers 20.04, but hopefully the latest Git code works now.

jcfp commented 1 year ago

I backported the fix and all builds now went fine, including the one on 20.04. Thanks again!