Page 1 of 1

4.2.1: Compile Error

Posted: Sat Dec 29, 2018 4:45 pm
by vectr0n
Hello,

I went to upgrade our ircd's when I ran into the following error when trying to compile on Debian Stretch:

Code: Select all

vectr0n@ircd1:~/src/unrealircd-4.2.1$ make
Building src
make[1]: Entering directory '/home/vectr0n/src/unrealircd-4.2.1/src'
gcc -I/home/vectr0n/src/unrealircd-4.2.1/include -pthread -Wdate-time -D_FORTIFY_SOURCE=2    -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -Wno-invalid-source-encoding -Wno-format-zero-length -Wno-format-truncation   -fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector --param ssp-buffer-size=1   -fPIE -c timesynch.c
gcc -I/home/vectr0n/src/unrealircd-4.2.1/include -pthread -Wdate-time -D_FORTIFY_SOURCE=2    -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -Wno-invalid-source-encoding -Wno-format-zero-length -Wno-format-truncation   -fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector --param ssp-buffer-size=1   -fPIE -c res.c
gcc -I/home/vectr0n/src/unrealircd-4.2.1/include -pthread -Wdate-time -D_FORTIFY_SOURCE=2    -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -Wno-invalid-source-encoding -Wno-format-zero-length -Wno-format-truncation   -fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector --param ssp-buffer-size=1   -fPIE -c s_bsd.c
gcc -I/home/vectr0n/src/unrealircd-4.2.1/include -pthread -Wdate-time -D_FORTIFY_SOURCE=2    -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -Wno-invalid-source-encoding -Wno-format-zero-length -Wno-format-truncation   -fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-all -Wstack-protector --param ssp-buffer-size=1   -fPIE -c auth.c
auth.c: In function ‘authcheck_argon2’:
auth.c:318:14: error: ‘Argon2_id’ undeclared (first use in this function)
   hashtype = Argon2_id;
              ^~~~~~~~~
auth.c:318:14: note: each undeclared identifier is reported only once for each function it appears in
auth.c: In function ‘mkpass_argon2’:
auth.c:687:8: warning: implicit declaration of function ‘argon2id_hash_encoded’ [-Wimplicit-function-declaration]
  ret = argon2id_hash_encoded(UNREALIRCD_ARGON2_DEFAULT_TIME_COST,
        ^~~~~~~~~~~~~~~~~~~~~
auth.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-format-truncation’
cc1: warning: unrecognized command line option ‘-Wno-invalid-source-encoding’
Makefile:98: recipe for target 'auth.o' failed
make[1]: *** [auth.o] Error 1
make[1]: Leaving directory '/home/vectr0n/src/unrealircd-4.2.1/src'
Makefile:140: recipe for target 'build' failed
make: *** [build] Error 2
Thanks,
Ken

Re: 4.2.1: Compile Error

Posted: Tue Jan 01, 2019 8:26 am
by Syzop
Sorry for responding late, I don't watch the forums as closely as the bug tracker.

1. I see suspiciously few -I parameters in your gcc command line from 'make', which makes me wonder... did you run './Config' ?
2. Did you use any special configure parameters (last question in ./Config), like for system libs or something similar?
3. And could you put your config.log somewhere (eg: pastebin)?

Re: 4.2.1: Compile Error

Posted: Tue Jan 01, 2019 10:24 pm
by vectr0n
Syzop wrote:
Tue Jan 01, 2019 8:26 am
Sorry for responding late, I don't watch the forums as closely as the bug tracker.

1. I see suspiciously few -I parameters in your gcc command line from 'make', which makes me wonder... did you run './Config' ?
2. Did you use any special configure parameters (last question in ./Config), like for system libs or something similar?
3. And could you put your config.log somewhere (eg: pastebin)?
No problem, I'm not sure it's a bug so I didn't post to the bug tracker.

1. I have ran ./Config -advanced with no issues
2. I have used "--with-system-tre --with-system-pcre2"
3. config.log: https://pastebin.com/SJg6MVN4

I had no issues with 4.2.0.

Re: 4.2.1: Compile Error

Posted: Wed Jan 02, 2019 3:45 pm
by Syzop
Would it be possible for me to get shell access on this machine (just a user account)? syzop@unrealircd.org

Re: 4.2.1: Compile Error

Posted: Wed Jan 02, 2019 5:19 pm
by vectr0n
Syzop wrote:
Wed Jan 02, 2019 3:45 pm
Would it be possible for me to get shell access on this machine (just a user account)? syzop@unrealircd.org
I also have issues on 2 other debian stretch vm's so I am not sure what logging into my vm will resolve anything, but none the less, I will follow up via email.

Re: 4.2.1: Compile Error

Posted: Wed Jan 02, 2019 6:32 pm
by Syzop
Fixed in latest git, which will be in next UnrealIRCd release. Thanks for the report!

Apparently Debian 9.6 ships with a libargon2 that just falls short of providing Argon2id. It has version 20160821, while version 20161029 would have been fine. The new version of the configure script now correctly detects this and uses the version shipped with UnrealIRCd in such a case.

To anyone in the same problem, that is.. until we release a new UnrealIRCd version:
During ./Config you will get this question at the end:

Code: Select all

Would you like to pass any custom parameters to configure?
See  `./configure --help' and write them here:
[] -> 
You must answer: --without-system-argon2

And then things will compile fine.

Re: 4.2.1: Compile Error

Posted: Wed Jan 02, 2019 6:40 pm
by vectr0n
Syzop wrote:
Wed Jan 02, 2019 6:32 pm
Fixed in latest git, which will be in next UnrealIRCd release. Thanks for the report!

Apparently Debian 9.6 ships with a libargon2 that just falls short of providing Argon2id. It has version 20160821, while version 20161029 would have been fine. The new version of the configure script now correctly detects this and uses the version shipped with UnrealIRCd in such a case.

To anyone in the same problem, that is.. until we release a new UnrealIRCd version:
During ./Config you will get this question at the end:

Code: Select all

Would you like to pass any custom parameters to configure?
See  `./configure --help' and write them here:
[] -> 
You must answer: --without-system-argon2

And then things will compile fine.
No problem, glad you were able to get to the bottom of it. Thanks for the help! :)

Re: 4.2.1: Compile Error

Posted: Thu Jan 03, 2019 8:18 am
by Syzop
UnrealIRCd 4.2.1.1 is now available for download from www.unrealircd.org. It fixes this compile issue on Debian stretch.