ispc icon indicating copy to clipboard operation
ispc copied to clipboard

Failure to build examples on i586: i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_sse2.o: No such file or directory

Open vt-alt opened this issue 4 years ago • 11 comments

While building the new version of ispc there is build failure on i586:

builder@i586:/tmp/BUILD3$ cmake /usr/share/doc/ispc-1.16.0/examples/cpu
...
builder@i586:/tmp/BUILD3$ make
Scanning dependencies of target aobench
[  1%] Building ISPC object aobench/CMakeFiles/aobench.dir/ao.ispc.o
Warning: No --target specified on command-line. Using default system target "avx2-i32x8".
[  2%] Building CXX object aobench/CMakeFiles/aobench.dir/ao.cpp.o
[  4%] Building CXX object aobench/CMakeFiles/aobench.dir/ao_serial.cpp.o
[  5%] Building CXX object aobench/CMakeFiles/aobench.dir/usr/share/doc/ispc-1.16.0/examples/common/tasksys.cpp.o
[  6%] Linking CXX executable aobench
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_sse2.o: No such file or directory
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_sse4.o: No such file or directory
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_avx.o: No such file or directory
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_avx2.o: No such file or directory
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_avx512knl.o: No such file or directory
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_avx512skx.o: No such file or directory
make[2]: *** [aobench/CMakeFiles/aobench.dir/build.make:154: aobench/aobench] Error 1
make[1]: *** [CMakeFiles/Makefile2:407: aobench/CMakeFiles/aobench.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

builder@i586:/tmp/BUILD3$ make VERBOSE=1
/usr/bin/cmake -S/usr/share/doc/ispc-1.16.0/examples/cpu -B/tmp/BUILD3 --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /tmp/BUILD3/CMakeFiles /tmp/BUILD3//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/tmp/BUILD3'
make  -f aobench/CMakeFiles/aobench.dir/build.make aobench/CMakeFiles/aobench.dir/depend
make[2]: Entering directory '/tmp/BUILD3'
cd /tmp/BUILD3 && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /usr/share/doc/ispc-1.16.0/examples/cpu /usr/share/doc/ispc-1.16.0/examples/cpu/aobench /tmp/BUILD3 /tmp/BUILD3/aobench /tmp/BUILD3/aobench/CMakeFiles/aobench.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/tmp/BUILD3'
make  -f aobench/CMakeFiles/aobench.dir/build.make aobench/CMakeFiles/aobench.dir/build
make[2]: Entering directory '/tmp/BUILD3'
[  1%] Linking CXX executable aobench
cd /tmp/BUILD3/aobench && /usr/bin/cmake -E cmake_link_script CMakeFiles/aobench.dir/link.txt --verbose=1
/usr/bin/c++ -O2 -DNDEBUG CMakeFiles/aobench.dir/ao.ispc.o CMakeFiles/aobench.dir/ao.cpp.o CMakeFiles/aobench.dir/ao_serial.cpp.o CMakeFiles/aobench.dir/usr/share/doc/ispc-1.16.0/examples/common/tasksys.cpp.o CMakeFiles/aobench.dir/ao.ispc_sse2.o CMakeFiles/aobench.dir/ao.ispc_sse4.o CMakeFiles/aobench.dir/ao.ispc_avx.o CMakeFiles/aobench.dir/ao.ispc_avx2.o CMakeFiles/aobench.dir/ao.ispc_avx512knl.o CMakeFiles/aobench.dir/ao.ispc_avx512skx.o -o aobench  -lpthread
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_sse2.o: No such file or directory
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_sse4.o: No such file or directory
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_avx.o: No such file or directory
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_avx2.o: No such file or directory
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_avx512knl.o: No such file or directory
i586-alt-linux-g++: error: CMakeFiles/aobench.dir/ao.ispc_avx512skx.o: No such file or directory
make[2]: *** [aobench/CMakeFiles/aobench.dir/build.make:154: aobench/aobench] Error 1
make[2]: Leaving directory '/tmp/BUILD3'
make[1]: *** [CMakeFiles/Makefile2:407: aobench/CMakeFiles/aobench.dir/all] Error 2
make[1]: Leaving directory '/tmp/BUILD3'
make: *** [Makefile:103: all] Error 2

There is no failure on x86_64/aarch64/armh.

vt-alt avatar Jun 14 '21 10:06 vt-alt

What is i586? Is it 32 bit x86?

dbabokin avatar Jun 14 '21 17:06 dbabokin

What is i586? Is it 32 bit x86?

Yes.

vt-alt avatar Jun 14 '21 17:06 vt-alt

This nomenclature seems from gcc::

           i586
           pentium
               Intel Pentium CPU with no MMX support.

vt-alt avatar Jun 14 '21 18:06 vt-alt

Going forward we'd like to maintain a set of Dockerfiles with the platforms that we care about, so we can test all combinations before the release. We have centos, ubuntu and fedora right now. Could you add a draft of Dockerfile with alt-linux, so we have issue like that easily reproducible?

Our existing Dockerfiles are here: https://github.com/ispc/ispc/tree/main/docker

dbabokin avatar Jun 14 '21 18:06 dbabokin

Even though it says 'no MMX support' this is just a baseline, and these binaries would run on any 32-bit x86 with any extensions.

vt-alt avatar Jun 14 '21 18:06 vt-alt

Could you add a draft of Dockerfile with alt-linux, so we have issue like that easily reproducible?

Thanks. I will try to make it a bit later.

vt-alt avatar Jun 14 '21 18:06 vt-alt

Even though it says 'no MMX support' this is just a baseline, and these binaries would run on any 32-bit x86 with any extensions.

Yeah, "no MMX" part is historical and kinda irrelevant. Without vector instructions ISPC doesn't make sense and the minimum we target is SSE2. Anyway, when we need to distinguish "x86", I'm assume it's wither i386, i486, i586, i686, or x86.

dbabokin avatar Jun 14 '21 18:06 dbabokin

I'm looking at 32 bit support in other Linux distributions and see that the last Ubuntu to support 32 bit is 18.04, the last CentOS to support 32 bit is 7. Both are pretty old. And I'm not aware of any customers who's like to use 32 bit x86 targets.

Do you know if ALT Linux is going to drop 32 bit support any time soon?

It should not be a big deal for us to ensure that 32 bit build is working, but would be good to understand if there's any real use of it.

dbabokin avatar Jun 14 '21 18:06 dbabokin

Debian is still supporting 32-bit x86. And AFAIK Gentoo too. As far as I'm (authoritatively) informed we don't plan to drop 32-bit x86 support any time sooner than Debian.

vt-alt avatar Jun 14 '21 18:06 vt-alt

JFYI Since this is not fixed for v1.16.1 I am temporary disabling build of ispc for i586 for ALT.

vt-alt avatar Sep 06 '21 09:09 vt-alt

I see at least three use cases for ISPC without vector support:

  • as a baseline, why write a mandelbrot_serial.c if ISPC cant generate it from mandelbrot.ispc?
  • for using multicore
  • for unsupported architectures, e.g. RISC-V

Having ISPC even on unsupported architectures helps uniformity.

StefanBruens avatar Oct 19 '22 23:10 StefanBruens