Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build arm64 image #173

Open
LeeEirc opened this issue May 24, 2024 · 1 comment
Open

How to build arm64 image #173

LeeEirc opened this issue May 24, 2024 · 1 comment

Comments

@LeeEirc
Copy link

LeeEirc commented May 24, 2024

I want to create an arm64 docker image, but I got error messages like as below:

0.603 ...failed gcc.compile.c++ bin/gcc-13/release/ppocr_strategies_hgravity2.o...
0.603 Jamfile</gcc>.gettext_install bin/install-gettext
0.604 gcc.compile.c++ bin/gcc-13/release/src/acl/session_logfile.o
0.604 g++: error: unrecognized command-line option '-msse3'
0.605 
0.605     "g++"   -fPIC -O3 -finline-functions -Wno-inline -Wall -DREDEMPTION_DISABLE_NO_BOOST_PREPROCESSOR_WARNING -Waligned-new -Wall -Walloc-zero -Walloca -Warray-bounds=2 -Wcast-align -Wcast-qual -Wclass-memaccess -Wconditionally-supported -Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Werror=literal-suffix -Werror=narrowing -Werror=write-strings -Wextra -Wfloat-conversion -Wfloat-equal -Wformat-overflow=2 -Wformat-security -Wformat-signedness -Wformat=2 -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wno-conversion -Wno-mismatched-tags -Wno-shadow -Wno-sign-compare -Wno-sign-conversion -Wnon-virtual-dtor -Wnull-dereference -Wold-style-cast -Woverloaded-virtual -Wpacked -Wpointer-arith -Wredundant-decls -Wstrict-null-sentinel -Wsuggest-attribute=noreturn -Wsuggest-override -Wswitch-enum -Wtrampolines -Wundef -Wunused-macros -Wuseless-cast -Wvector-operation-performance -Wzero-as-null-pointer-constant -fdiagnostics-color=always -ffold-simple-inlines -fno-rtti -msse3 -pedantic -pipe -std=c++2a -DNDEBUG -DREDEMPTION_NO_FFMPEG=1   -I"include" -I"projects/ocr1/include" -I"projects/ppocr" -I"projects/redemption_configs/autogen/include" -I"projects/redemption_configs/redemption_src" -I"src" -I"src/system/linux"  -c -o "bin/gcc-13/release/src/acl/session_logfile.o" "src/acl/session_logfile.cpp"
0.605 
0.605 ...failed gcc.compile.c++ bin/gcc-13/release/src/acl/session_logfile.o...
0.605 gcc.compile.c++ bin/gcc-13/release/ppocr_strategies_proportionality_zone.o
0.605 g++: error: unrecognized command-line option '-msse3'

Could redemption support running on ARM64?

@jonathanpoelen
Copy link
Contributor

There's very little to do, but it doesn't work as such:

  • Remove the line containing -msse3 from jam/cxxflags.jam.
  • delete the entire contents of src/utils/primitives/primitives_sse2.cpp (but keep the file)
  • delete from src/utils/primitives/primitives.cpp the lines between #ifndef __EMSCRIPTEN__ and #endif (there are 2 of them)
    And that's all...

On the other hand, there will probably be a problem with hyperscan, which to my knowledge doesn't have an arm version. Unless the vectorscan library does what's necessary to be named hyperscan on arm, you'll have to disable its use with bjam -s NO_HYPERSCAN=1 (this disables detection of keyboard and OCR patterns. If you don't know what they are, then don't use them).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants