CarVac / filmulator-gui

Filmulator --- Simplified raw editing with the power of film
https://filmulator.org
Other
669 stars 31 forks source link

Build fails on aarch64 #128

Closed hfiguiere closed 3 years ago

hfiguiere commented 3 years ago

When building on aarch64 (Raspberry Pi 400 with the 64-bit OS) I get this error:

g++ -c -pipe -std=c++14 -DTOUT -O3 -fprefetch-loop-arrays -fno-strict-aliasing -ffast-math -DLF_GIT -fopenmp -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -Iqtquick2applicationviewer -I/usr/include/QtQuick -I/usr/include/QtWidgets -I/usr/include/QtGui -I/usr/include/QtQmlModels -I/usr/include/QtQml -I/usr/include/QtNetwork -I/usr/include/QtSql -I/usr/include/QtCore -I. -I/usr/lib/mkspecs/linux-g++ -o colorSpaces.o core/colorSpaces.cpp
In file included from core/interface.h:3,
                 from core/lut.hpp:25,
                 from core/filmSim.hpp:31,
                 from core/colorCurves.cpp:1:
core/matrix.hpp:24:10: fatal error: emmintrin.h: No such file or directory
   24 | #include <emmintrin.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:1400: colorCurves.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from core/interface.h:3,
                 from core/lut.hpp:25,
                 from core/filmSim.hpp:31,
                 from core/agitate.cpp:19:
core/matrix.hpp:24:10: fatal error: emmintrin.h: No such file or directory
   24 | #include <emmintrin.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:1394: agitate.o] Error 1
In file included from core/interface.h:3,
                 from core/lut.hpp:25,
                 from core/filmSim.hpp:31,
                 from core/colorSpaces.cpp:1:
core/matrix.hpp:24:10: fatal error: emmintrin.h: No such file or directory
   24 | #include <emmintrin.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:1406: colorSpaces.o] Error 1
In file included from ui/../core/interface.h:3,
                 from ui/../core/lut.hpp:25,
                 from ui/../core/filmSim.hpp:31,
                 from ui/../core/imagePipeline.h:3,
                 from ui/filmImageProvider.h:11,
                 from main.cpp:13:
ui/../core/matrix.hpp:24:10: fatal error: emmintrin.h: No such file or directory
   24 | #include <emmintrin.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:1388: main.o] Error 1
Error: module filmulator: Child process exited with code 2

This is a problem with intrinsics.

CarVac commented 3 years ago

I won't be able to test this, but try this commit:

https://github.com/CarVac/filmulator-gui/commit/6bcf7589d2a32c168b1f868d9d3643ba249d9abf

I ifdef'd the SSE code away.

hfiguiere commented 3 years ago

It builds.

hfiguiere commented 3 years ago

But for the record, ARM NEON has similar SIMD intrinsics.

CarVac commented 3 years ago

Yeah there's an SSE to NEON translation header.

For now I'm focusing on adding a new feature, though.

hfiguiere commented 3 years ago

Using https://github.com/simd-everywhere/simde seem to work. It's header only. I'll see about making a PR for it.

hfiguiere commented 3 years ago

Notes on how it works https://simd-everywhere.github.io/blog/2020/06/22/transitioning-to-arm-with-simde.html

b- commented 3 years ago

I just ran into this same error on a Pinebook Pro. I didn't notice this issue, but I was able to successfully build using sse2neon and either replacing #include <emmintrin.h> with #include "sse2neon.h, or by copying sse2neon.h into /usr/local/include and then making links to it called *mmintrin.h. I don't recommend the latter; I think that ideally Filmulator would bundle/require sse2neon or simdeverywhere on Arm itself (or not use architecture-specific instructions)

CarVac commented 3 years ago

Which version did you build? It should have been ifdef'd out in the latest version.

b- commented 3 years ago

Let me try building again -- I have no idea. Will report back.

b- commented 3 years ago

It worked just fine @CarVac. I guess that fixes this issue?

CarVac commented 3 years ago

Good to have confirmation, at least. I'll close it.