NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: buildworld failure due to md5 not supported by openssl3



Am 23.11.23 um 10:21 schrieb Ede Wolf:
Am 22.11.23 um 17:00 schrieb Martin Husemann:
On Wed, Nov 22, 2023 at 04:21:01PM +0100, Ede Wolf wrote:
My build says somethig different about warnings and errors (Marking by me,
of course):

/data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c: In function
'saslc__crypto_md5_hex':
/data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c:233:2:
error: 'MD5' is deprecated: Since OpenSSL 3.0
[-Werror=deprecated-declarations]
   233 |  (void)MD5((const unsigned char *)buf, buflen, digest);
       |  ^

My build says:

#   compile  lib/crypto.o
/work/tools/bin/alpha--netbsd-gcc -O2   -std=gnu99    -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  -Wsystem-headers   -Wno-traditional -Wa,--fatal-warnings  -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wsign-compare -Wformat=2  -Wno-format-zero-length  -Werror -mieee     --sysroot=/work/hosts/alpha -I/work/src/crypto/external/bsd/libsaslc/lib/../dist/include  -c -Wno-error=deprecated-declarations /work/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c -o crypto.o



Note that it has:  -Wno-error=deprecated-declarations

(which comes from COPTS.crypto.c in the Makefile there).

So something in your setup must override that, but it is not obvious to me
right now.

If you go into src/crypto/external/bsd/libsaslc/lib and invoke your
$TOOLDIR/bin/nbmake-alpha with "-v COPTS.crypto.c" - what does it say?
Or it may override the construction of the final flags from that variable,
maybe due to your CPUFLAGS settings?



The output is, as you have expected:


buildbsd# cd /data/src/crypto/external/bsd/libsaslc/lib/
buildbsd# /data/obj/data/src/tooldir.NetBSD-10.0_RC1-amd64/bin/nbmake-alpha -v COPTS.crypto.c
-Wno-error=deprecated-declarations
buildbsd#


And it is not the CPUFLAGS, I've just tried a rebuild without any COPT/CPU- or CFAGS at all (with objdir completely clean) and am running into the same error:

--- crypto.pico ---
/data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c: In function 'saslc__crypto_md5_hash': /data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c:218:3: error: 'MD5' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
   218 |   (void)MD5((const unsigned char *)buf, buflen, digest);
       |   ^
In file included from /data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c:50:
/data/destdir/usr/include/openssl/md5.h:52:38: note: declared here
   52 | OSSL_DEPRECATEDIN_3_0 unsigned char *MD5(const unsigned char *d, size_t n,
       |                                      ^~~
/data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c: In function 'saslc__crypto_md5_hex': /data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c:233:2: error: 'MD5' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
   233 |  (void)MD5((const unsigned char *)buf, buflen, digest);
       |  ^




Btw, this does not seem to be alpha-port specific. I've just tried to compile on amd64 for amd64, exactly the same mk.conf (with the obvious exception of CPUFLAGS) and of course changing -a and -m for build.sh:


#   compile  lib/crypto.pico
/data/obj/data/src/tooldir.NetBSD-10.0_RC1-amd64/bin/x86_64--netbsd-gcc -O2 -fdebug-prefix-map=\$DESTDIR= -fdebug-prefix-map=\$NETBSDSRCDIR=/usr/src -fdebug-prefix-map=\$X11SRCDIR=/usr/xsrc -fdebug-prefix-map=\$NETBSDOBJDIR=/usr/obj -fdebug-regex-map='/usr/src/(.*)/obj$=/usr/obj/\1' -fdebug-regex-map='/usr/src/(.*)/obj/(.*)=/usr/obj/\1/\2' -fdebug-regex-map='/usr/src/(.*)/obj\..*=/usr/obj/\1' -fdebug-regex-map='/usr/src/(.*)/obj\..*/(.*)=/usr/obj/\1/\2' -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wsystem-headers -Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wsign-compare -Wformat=2 -Wno-format-zero-length -Werror -march=znver2 -mtune=znver2 -fPIE --sysroot=/data/destdir -I/data/src/crypto/external/bsd/libsaslc/lib/../dist/include -Wp,-iremap,/data/destdir: -Wp,-fno-canonical-system-headers -Wp,-iremap,/data/src:/usr/src -Wp,-iremap,/usr/xsrc:/usr/xsrc -c -fPIC /data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c -o crypto.pico /data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c: In function 'saslc__crypto_md5_hash': /data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c:218:3: error: 'MD5' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  218 |   (void)MD5((const unsigned char *)buf, buflen, digest);
      |   ^
In file included from /data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c:50:
/data/destdir/usr/include/openssl/md5.h:52:38: note: declared here
52 | OSSL_DEPRECATEDIN_3_0 unsigned char *MD5(const unsigned char *d, size_t n,
      |                                      ^~~
/data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c: In function 'saslc__crypto_md5_hex': /data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c:233:2: error: 'MD5' is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  233 |  (void)MD5((const unsigned char *)buf, buflen, digest);
      |  ^
In file included from /data/src/crypto/external/bsd/libsaslc/lib/../dist/src/crypto.c:50:
/data/destdir/usr/include/openssl/md5.h:52:38: note: declared here
52 | OSSL_DEPRECATEDIN_3_0 unsigned char *MD5(const unsigned char *d, size_t n,
      |                                      ^~~
cc1: all warnings being treated as errors
*** Failed target: crypto.pico
*** Failed commands:
        ${_MKTARGET_COMPILE}




Home | Main Index | Thread Index | Old Index