-
Notifications
You must be signed in to change notification settings - Fork 138
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
Make tlsh_unittest shared-linkable #111
Comments
Oh, right. In my mind another option would be to stop shipping tlsh_unittest, and instead create a new |
There were 2 problems. (1) When introducing people to the tool, they would sometimes (or quite often) not set the LD_LIBRARY_PATH correctly. (2) sdhash (another fuzzy hash) had problems with shared libraries / environment. Our approach to avoid problems like this was that TLSH should be
|
I think lets do your solution |
Hi! Thanks for following up! :)
Though this is really due to them probably being new to compiled programs. I think this can easily be a problem for people building the tool themselves indeed. That said it can't be problems for distributors since they would place the shared library in a standard location anyway.
This is concerning though. But how would this be fixed by statically linking the tool? Was that perhaps a bug in their libc implementation (which went away since you started to use (incidentally, this could most likely be attributed to LC_COLLATE which changes the behaviour of many sorting algorithms) |
Do you have a preferred way to |
Mh, perhaps it wasn't quite as obvious what I was meaning. In my mind I was thinking of a tool (which I suppose would be pretty much what tlsh_unittest is today) that makes use only of public API functions, leaving private functions needed for the testsuite into the current binary. Now I actually looked into how tlsh_unittest is done and the flow of it, and I'm not sure if that's actually a proper way forward for this. mh. |
I agree with @mapreri that a I also want to point out that working with packaging and distributions has a lot of benefits for you as the original developer. Packaging that installs into standard system locations will address most of the problems you've mentioned, such as shared libraries. It tends to split work between you (the original developer) and groups of users (using different OSes, with different needs, who need to port and package for their environment). It greatly reduces the work needed for new OS versions, and now that tlsh is building in a way that works well with packaging, it also reduces the work to upgrade to new tlsh versions. It reduces duplicated work. It tends to bring wider usage of your software, more bug reports, and more eyeballs. Distros and users will do various sorts of automated fuzzing and static analysis and other testing that will be an unexpected benefit to you. That doesn't necessarily mean less work for you, but it often means you do better, more meaningful work. |
Hi!
I understand that you don't seem to appreciate shared linked binaries, but in Debian we tend to at least have a preference for them.
Currently forcing tlsh_unittest to link libtlsh.so fails with this:
This is a partial result of using -fvisibility=internal (which is great!), but it also means that the tlsh_unittest binary is making use of functions that are not part of the public API nor ABI.
I made it build with this patch, that exposes the missing function in the library:
However, that's clearly not an optimal solution. I think it would be best if one of the followings could happen (this is not exhaustive, just what came to my mind):
Besides this, it would be nice if you could elaborate on what "problems" it was causing when "compiling / testing tools on Linux", as it's mentioned in src/CMakeLists.txt.
Thank you for considering at least! :)
The text was updated successfully, but these errors were encountered: