trendmicro / tlsh

Other
732 stars 136 forks source link

Library will not compile on CENTOS 7 (use of CREATE_LINK in cmake) #115

Closed jonjoliver closed 2 years ago

jonjoliver commented 2 years ago

CentOS 7 will use cmake version 2.8.12.2 by default

So this results in the error.

CMake Error at test/CMakeLists.txt:103 (file): file does not recognize sub-command CREATE_LINK

There are workarounds, but they are not ideal https://stackoverflow.com/questions/48831131/cmake-on-linux-centos-7-how-to-force-the-system-to-use-cmake3

This problem was introduced in version 4.8.1 of TLSH

cgull commented 2 years ago

I'm working on updating the FreeBSD port to 4.11.2. I was about to complain "but this change breaks builds that don't use build.sh!"

...but it doesn't, at least for the FreeBSD port, which uses the tlsh tlsh_unittest targets. So I think those lines I wrote were redundant to begin with. Having the last line as (CODE "...") handles that case, and manages to insulate cmake 2 from the problem, it looks like.

Still, I'm puzzled as to why you say "There are workarounds, but they are not ideal"? It's your software, you control the build. Centos 7 seems to have a cmake3 package available. You could change make.sh to run cmake3 on Centos7, or if found, or something, and require cmake3 as a build dependency for the TLSH build on older OSes, which doesn't seem very difficult.

Also: cmake < 3.0 is really old. The cmake team doesn't seem to explicitly document their support strategy, but their development seems to be linear, and 2.8.9 was released in 2012, so it's pretty certainly unsupported. RHEL/Centos 7 is also really old too, initial release in 2014.