Xmrig: Error compiling by clang in freebsd 11

Created on 30 Aug 2019  ·  15Comments  ·  Source: xmrig/xmrig

[ 11%] Building C object src/3rdparty/argon2/CMakeFiles/argon2.dir/lib/argon2.c.o
/usr/home/andrey/1/xmrig/src/3rdparty/argon2/lib/argon2.c:91:52: error: use of undeclared identifier 'ARGON2_FLAG_GENKAT'
instance.print_internals = !!(context->flags & ARGON2_FLAG_GENKAT);
^
1 error generated.
* Error code 1

Stop.
make[2]: stopped in /usr/home/andrey/1/xmrig/build
* Error code 1

Stop.
make[1]: stopped in /usr/home/andrey/1/xmrig/build
* Error code 1

Stop.

Gcc9 compile without any errors.

bug

Most helpful comment

All 15 comments

If you don't need Argon2 support you can disable it by -DWITH_ARGON2=OFF, otherwise probably wrong header used, I will check it later.
Thank you.

Xmrig V. 3.1.3 on FreeBSD 12 has the same problem.

why don't you just compile it from ports?
/usr/ports/net-p2p/xmrig

I was tried to compile from ports, but the same error appears.

пн, 23 сент. 2019 г., 17:17 lisergey notifications@github.com:

why don't you just compile it from ports?
/usr/ports/net-p2p/xmrig


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/xmrig/xmrig/issues/1150?email_source=notifications&email_token=ACHQYZE4TXF4NE3VHM5SYWTQLCCS5A5CNFSM4ISJ2QAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7KICMA#issuecomment-534020400,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACHQYZES3XBDAMLDAVSFCCDQLCCS5ANCNFSM4ISJ2QAA
.

In version 3.2.0
appears new one error
" instance.print_internals = !!(context->flags & ARGON2_FLAG_GENKAT);
^
1 error generated.
ninja: build stopped: subcommand failed.
"

that's really strange.
I've just successfully upgraded xmrig from ports on 11.3-RELEASE-p3 GENERIC amd64

# pkg inf -q | grep -E "ninja|xmrig"
ninja-1.9.0,2
xmrig-3.2.0

try to reinstall ninja & cmake, run make clean && make cleandir twice in /usr/src, and make delete-old, and freebsd-update to latest patches.

Xmrig V. 3.1.3 on FreeBSD 12 has the same problem.

I have several FreeBSD 12 machines, where I've tried to compile xmrig-3.1.3 from ports.
That's really strange, but it did successfully on most and stopped with errors on two.
They should be identical by means of updates, libs, /usr/src, but conclusion is they are not.
These hidden difference is villain and causing the compile error, not the code.

Maybe some another argon2 package installed with argon2.h header? potentially it can make conflict.

Maybe some another argon2 package installed with argon2.h header? potentially it can make conflict.

seems it does.
There is installed /usr/ports/security/libargon2 as a dependency for php72 where compile fails.
So maybe to adapt cmake files to pick the right one?

pkg info -q | grep ninja
ninja-1.9.0,2

portsnap fetch update - OK
/usr/ports/security/libargon2 make reinstall clean - OK
/usr/ports/devel/ninja make distclean - OK
/usr/ports/devel/ninja make reinstall clean -
===> Building for ninja-1.9.0,2
bootstrapping ninja...
warning: A compatible version of re2c (>= 0.11.3) was not found; changes to src/.in.cc will not affect your build.
Installing ninja-1.9.0,2... - OK
/usr/ports/net-p2p/xmrig make install clean - The same error:
2: error: use of undeclared identifier 'ARGON2_FLAG_GENKAT'
instance.print_internals = !!(context->flags & ARGON2_FLAG_GENKAT);
^
1 error generated.
ninja: build stopped: subcommand failed.
*
* Error code 1

Stop.
make[1]: stopped in /usr/ports/net-p2p/xmrig
* Error code 1

freebsd-update fetch
freebsd-update install - Installing updates... done.
Nothing has changed...

Maybe some another argon2 package installed with argon2.h header? potentially it can make conflict.

Which program can installed another argon2.h ?

@lisergey yep this is it, fixed in evo branch.
Thank you.

https://github.com/xmrig/xmrig/releases/tag/v4.2.1-beta

Thanks! v4.2.1-beta compiled without error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

difunktor picture difunktor  ·  47Comments

davidtavarez picture davidtavarez  ·  15Comments

losiel picture losiel  ·  16Comments

worm001 picture worm001  ·  15Comments

gennadicho picture gennadicho  ·  32Comments