VectorCamp / vectorscan

A portable fork of the high-performance regular expression matching library
https://www.vectorcamp.gr/project/vectorscan/
Other
505 stars 54 forks source link

challenges build on graviton3 (ubuntu 20.04 and ubuntu 22.04) #176

Closed sambercovici closed 1 year ago

sambercovici commented 1 year ago

All was done on two graviton3 VMs in AWS one with ubuntu 20.04 and the other ubuntu 22.04 and on master branch.

for both did the following: PREREQ:

BUILD:

ISSUE-1: with ubuntu 20.04 (ubuntu 22.04 did not have this issue)

ISSUE-2:

ISSUE-3:

sambercovici commented 1 year ago

Hi,

For ISSUUE-1, is the change (to also #include "/usr/include/aarch64-linux-gnu/asm/hwcap.h") is correct?

markos commented 1 year ago

question, why do you enable FAT_RUNTIME but disable SVE/SVE2? FAT_RUNTIME implicitly enables both.

However, the bug here is that SVE2 should implicitely enable SVE as well, for this reason this is an actual bug report.

ubuntu 22.04: /home/ubuntu/src/vectorscan/src/util/arch/arm/simd_utils_sve.h:35:22: error: ACLE function ‘svptrue_b8’ requires ISA extension ‘sve’

As a note, we don't plan to support Ubuntu 20.04 right now. It's already almost 3y old and there exists another LTS version which is also >1y old. We will continue to support so 20.04 for the near future. If there is enough demand we might add another configuration for 20.04 but so far no one else has asked. If you absolutely need 20.04 support, we might provide a support contract, in which case, please contact us.

sambercovici commented 1 year ago

As you know, I am working to add Vectorscan to Envoyproxy. The build container for Envoyproxy is based on ubuntu 20.04

markos commented 1 year ago

I see, we'll have to investigate how hard it is to support one more distro. The problem is that supporting one more distro means supporting it on all architectures (x86, arm, ppc64le) and all compilers, on all configurations (debug/release for all, sse/avx2/avx512/fat for x86, neon/sve/sve2/fat on arm, and plain vsx on ppc64le). Add to those the soon-to-be added ASAN builds, this is a significant effort. We cannot just support 20.04 on Arm. In any case, it would be ideal if you could switch to 22.04, at the moment we cannot promise 20.04, but we will consider it. Even if it happens, it will happen after the next release (5.4.11), which is expected by the end of this month.

sambercovici commented 1 year ago

question, why do you enable FAT_RUNTIME but disable SVE/SVE2? FAT_RUNTIME implicitly enables both.

I started with only enabling FAT_RUNTIME and compiling on graviton3 + ubuntu 20.04. this failed then tried to compile with enabling FAT_RUNTIME and compiling on graviton3 + ubuntu 22.04 which also failed what you see is the result of enabling / disabling different flags.

markos commented 1 year ago

I mentioned that becasue in issue 2, I see that you enable FAT_RUNTIME but disable both SVE/SVE2.

sambercovici commented 1 year ago

AFAIK, there is NO plan in Envoyproxy to move to build containers using ubuntu 22.04 anytime soon. I was able to compile for basic Neon support by adding the include noted above. Is this something that will work?

markos commented 1 year ago

FAT_RUNTIME for sure will not work on 20.04, as it requires to build both SVE and SVE2, but 20.04 does not have compiler SVE2 support. So if you need 20.04 you have to completely disable FAT, SVE, SVE2. In that case, yes, such a simple hack might work and I have no objections to include it. Actually, as these are 2 different issues, would you mind filing another one for Ubuntu 20.04 support and just mention this bug report?

markos commented 1 year ago

With #180 and #181 closed/merged, this is considered fixed.