Hello,
On 4/18/23 10:18 AM, Bastian Germann wrote:
>> I looked into this when I first started packaging xmrig.
>> Unfortunately, for many of these third party libraries, Debian's
>> packaging of them won't work because the version included in xmrig is
>> specially modified and contains lots of xmrig-specific functions that
>> aren't easy to work around. For example, many of argon2's functions
>> directly have xmrig in the name, and work a bit differently to those
>> of the original project.
>
> The missing thing is hugepages support:
>
https://github.com/xmrig/xmrig/commit/b1db0803cfdcb25fd51cef1df2dba46dc63fb0f7
>
> src/crypto/randomx/dataset.cpp relies on some private argon2
> implementation details.
> But as far as I can see you can just have some definitions to satisfy
> these needs.
Ah, I see. I'm very inexperienced with C(++), so I didn't understand how
easy or hard it would be to replace those specifics.
> Either patch or build with WITH_ARGON2=OFF.
I wish I knew how to patch. I would build with argon2 off, but looking
at cmake/randomx.cmake it seems like randomx, essential for mining XMR,
requires argon2 to be enabled.
>> The source also directly includes headers that exist in the original
>> source but not a packaged version, and which are also modified
>> specifically for xmrig. If I were to get rid of all the third party
>> libraries that don't work easily with Debian's packaged versions,
>> there wouldn't be much xmrig functionality left.
>
> The only thing that is not easily replacable from the original list is
> llhttp. Just keep this one. I have done the trivial replacements for CL,
> fmt, and rapidjson. hwloc is built with the system library anyway and
> adl is only used on Windows.
Okay, there's my inexperience again. When I was first packaging this, I
took a look at argon2 and assumed most of the other libraries were as
hard to replace as it. Thanks for showing me how easy it really was.
I've pushed what I have so far to Salsa; unless randomx is disabled, it
won't build without argon2, and I don't know how to patch it. Can you
please help me?
Thanks,
--
Ben Westover