wallix / redemption

A GPL RDP proxy
GNU General Public License v2.0
213 stars 88 forks source link

SSE3 and ARM builds? #163

Closed sdbbs closed 1 year ago

sdbbs commented 1 year ago

Hi all,

Not really a bug, more of a question.

I had tried to build redemption under Raspbian Stretch on Raspberry Pi 3B+ (which has ARMv7 CPUs), which involved building gcc 10 for this platform, which took like 24+ hours :)

First thing I noticed there was:

E: Unable to locate package libhyperscan-dev

... and https://packages.debian.org/sid/libhyperscan-dev says:

libhyperscan only runs on processors with at least SSSE3 support.

I tried https://unix.stackexchange.com/questions/131954/check-sse3-support-from-bash, and the command:

grep '^flags.*\(sse3\|pni\)' /proc/cpuinfo

... returns nothing in Raspbian. (btw, on my Ubuntu 20.04 machine, I also do not get sse3 reported, but instead sse3; https://linustechtips.com/topic/1041293-sse3-and-ssse3-supplemental-sse3-whats-the-main-difference/ indicates it's more-less the same thing). https://www.quora.com/Does-ARM-have-SSE-instructions confirms:

ARM doesn't have SSE instructions which are Intel's.

Further on, I had to comment <cxxflags>-msse3 in jam/cxxflags.jam ... then I got stuck there. But in any case, when I tried building on Ubuntu, without libhyperscan-dev it started compiling and even built something, but ultimately I got:

...skipped <pbin/gcc-9/release>libredrec.so for lack of <pbin/gcc-9/release>src/capture/utils/pattern_searcher.o...
...skipped <pbin/gcc-9/release>rdpproxy for lack of <pbin/gcc-9/release>src/capture/utils/pattern_searcher.o...

... so the most important stuff cannot be built without libhyperscan-dev.

Then again, if I look at Installation on Debian 10.0 · Issue #45 · wallix/redemption, there is no mention of libhyperscan-dev; so in Aug 2019 there was probably a version that could be built without.

So I was wondering: what are the chances of introducing, say, a switch or a define, to be able to choose use of SSE3 vs use without SSE3 - the primary purpose being allowing an ARM build of rdpproxy and redrec for a headless Raspberry Pi (3B+ in my case)?

jonathanpoelen commented 1 year ago

There is the vectorscan project which allows to have the hyperscan lib on ARM. I haven't tried it, but I guess it's fine.

jonathanpoelen commented 1 year ago

There is now NO_HYPERSCAN option (bjam -s NO_HYPERSCAN=1 .....). The keyboard/title bar pattern detection will not work anymore (but I don't think you use it).