XapaJIaMnu / translateLocally

Fast and secure translation on your local machine, powered by marian and Bergamot.
MIT License
501 stars 28 forks source link

Build failure on aarch64 #150

Closed pacien closed 1 year ago

pacien commented 1 year ago

Build seems to fail for aarch64. This seems to be due to 3rd party dependencies (sqlite in marian).

Build log: https://logs.ofborg.org/?key=nixos/nixpkgs.251051&attempt_id=59cfb6f3-9818-4ff3-8172-a2903dda85e5

XapaJIaMnu commented 1 year ago

Hmmm, it used to work but we lost our arm automatic runner.

Will try to get it running again soon, sorry about that.

kpu commented 1 year ago

And we should cut out sqlite.

XapaJIaMnu commented 1 year ago

I removed sqlite from the build, try again?

pacien commented 1 year ago

Quoting Nikolay Bogoychev (2023-09-11 18:01:31)

I removed sqlite from the build, try again?

Still seems to fail on aarch64-linux, due to other clock-related errors this time (need to scroll up in the log): https://logs.ofborg.org/?key=nixos/nixpkgs.254580&attempt_id=92ac380b-c503-44cf-8b0b-91d68876299f

It still builds fine on x86_64-linux.

XapaJIaMnu commented 1 year ago

You are missing the fix_ruy step from ARM's build. tl;dr; QT MOC messes up header inclusion order, and ruy itself has a time.h header which clashes with the system time.h. I couldn't figure out how to fix inside cmake, so before building arm there's an intermediate step for fixing the header include order. https://github.com/XapaJIaMnu/translateLocally/blob/master/.github/workflows/build.yml#L330

There is a cmake message to prompt you to do this:

Make Warning at CMakeLists.txt:332 (message):
  Building on ARM.  You need to manually fix the broken build due to RUY
  using bad header names and QT's MOC.  Please run:
/build/source/cmake/fix_ruy_build.sh /build/source /build/source/build
CMake Warning at CMakeLists.txt:334 (message):
  Before building the project

I should include this in the README.md as well.

pacien commented 1 year ago

Oops I missed that warning. It now builds fine on aarch64-linux with the fix script. Thanks!