On 6/21/2020 2:32 AM, Xin LI wrote:
> Author: delphij
> Date: Sat Jun 20 21:32:07 2020
> New Revision: 362452
> URL: https://svnweb.freebsd.org/changeset/base/362452
> 
> Log:
>   liblzma: Make liblzma use libmd implementation of SHA256.
I'm trying to update from r362172 (GENERIC-NODEBUG) to r362468 (a custom
KERNCONF), and failing on buildworld:

===> lib/liblzma (obj,all,install)
make[4]: /usr/obj/usr/src/i386.i386/lib/liblzma/.depend, 1: ignoring
stale .depend for /usr/obj/usr/src/i386.i386/tmp/usr/lib/libmd.a
building shared library liblzma.so.5
cc -target i386-unknown-freebsd13.0
--sysroot=/usr/obj/usr/src/i386.i386/tmp ... tsort -q` -lmd -lpthread

ld: error: unable to find library -lmd
cc: error: linker command failed with exit code 1 (use -v to see
invocation)
*** Error code 1

Stop.
make[4]: stopped in /usr/src/lib/liblzma

As I've already mentioned I run FreeBSD 13.0-CURRENT x86 r362172
GENERIC-NODEBUG.  The kernel/user land were built with the default
kernel config and empty make.conf and src.conf.  Now I'm trying to
update to r362468 with custom kernel config, make.conf and src.conf.
What should I show you from those files in order you can help me to fix
the error?  I just don't understand why libmd isn't built.  Because the
library currently exists as /lib/libmd.so.6 (therefore, it was build on
the previous update to r362172), I believe I missed something in my
config files.

Thanks!

>   
>   MFC after:  2 weeks
>   PR:         200142
> 
> Deleted:
>   head/contrib/xz/src/liblzma/check/sha256.c
> Modified:
>   head/lib/liblzma/Makefile
>   head/lib/liblzma/Symbol.map
>   head/lib/liblzma/config.h
>   head/share/mk/src.libnames.mk
> 
> Modified: head/lib/liblzma/Makefile
> ==============================================================================
> --- head/lib/liblzma/Makefile Sat Jun 20 21:06:02 2020        (r362451)
> +++ head/lib/liblzma/Makefile Sat Jun 20 21:32:07 2020        (r362452)
> @@ -78,8 +78,7 @@ SRCS+=      common.c \
>  .PATH: ${LZMADIR}/check
>  SRCS+=       check.c \
>       crc32_table.c \
> -     crc64_table.c \
> -     sha256.c
> +     crc64_table.c
>  .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386"
>  SRCS+=       crc32_x86.S \
>       crc64_x86.S
> @@ -125,11 +124,11 @@ SRCS+=  simple_coder.c \
>  
>  .PATH: ${LZMADIR}
>  
> -VERSION_MAJOR!=      awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MAJOR" 
> {print $$3 } ' \
> +VERSION_MAJOR!=      sed -n '/define.*LZMA_VERSION_MAJOR/{s,[^0-9.],,gp;q;}' 
> \
>                       ${LZMADIR}/api/lzma/version.h
> -VERSION_MINOR!=      awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MINOR" 
> {print $$3 } ' \
> +VERSION_MINOR!=      sed -n '/define.*LZMA_VERSION_MINOR/{s,[^0-9.],,gp;q;}' 
> \
>                       ${LZMADIR}/api/lzma/version.h
> -VERSION_PATCH!=      awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_PATCH" 
> {print $$3 } ' \
> +VERSION_PATCH!=      sed -n '/define.*LZMA_VERSION_PATCH/{s,[^0-9.],,gp;q;}' 
> \
>                       ${LZMADIR}/api/lzma/version.h
>  
>  WARNS?=      3
> @@ -147,7 +146,7 @@ CFLAGS+=  -DHAVE_CONFIG_H \
>               -I${LZMADIR}/simple \
>               -I${LZMADIR:H}/common
>  
> -LIBADD+=     pthread
> +LIBADD+=     md pthread
>  
>  VERSION_DEF= ${.CURDIR}/Versions.def
>  SYMBOL_MAPS= ${.CURDIR}/Symbol.map
> @@ -160,10 +159,11 @@ FILESDIR=       ${LIBDATADIR}/pkgconfig
>  
>  liblzma.pc: liblzma.pc.in
>       sed -e 's,@prefix@,/usr,g ; \
> -             s,@exec_prefix@,/usr,g  ; \
> +             s,@exec_prefix@,/usr,g ; \
>               s,@libdir@,/usr/lib,g ; \
>               s,@includedir@,/usr/include,g ; \
> -             s,@PACKAGE_URL@,http://tukaani.org/xz/,g ; \
> +             s,@LIBS@,-pthread -lmd,g ; \
> +             s,@PACKAGE_URL@,https://tukaani.org/xz/,g ; \
>               
> s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \
>               s,@PTHREAD_CFLAGS@,,g ; \
>               s,@PTHREAD_LIBS@,,g' ${.ALLSRC} > ${.TARGET}
> 
> Modified: head/lib/liblzma/Symbol.map
> ==============================================================================
> --- head/lib/liblzma/Symbol.map       Sat Jun 20 21:06:02 2020        
> (r362451)
> +++ head/lib/liblzma/Symbol.map       Sat Jun 20 21:32:07 2020        
> (r362452)
> @@ -180,9 +180,6 @@ XZprivate_1.0 {
>       lzma_raw_coder_memusage;
>       lzma_raw_decoder_init;
>       lzma_raw_encoder_init;
> -     lzma_sha256_finish;
> -     lzma_sha256_init;
> -     lzma_sha256_update;
>       lzma_simple_arm_decoder_init;
>       lzma_simple_arm_encoder_init;
>       lzma_simple_armthumb_decoder_init;
> 
> Modified: head/lib/liblzma/config.h
> ==============================================================================
> --- head/lib/liblzma/config.h Sat Jun 20 21:06:02 2020        (r362451)
> +++ head/lib/liblzma/config.h Sat Jun 20 21:32:07 2020        (r362452)
> @@ -211,16 +211,13 @@
>  /* #undef HAVE_SHA256INIT */
>  
>  /* Define to 1 if the system has the type `SHA256_CTX'. */
> -/* FreeBSD - disabled libmd SHA256 for now */
> -/* #undef HAVE_SHA256_CTX */
> +#define HAVE_SHA256_CTX 1
>  
>  /* Define to 1 if you have the <sha256.h> header file. */
> -/* FreeBSD - disabled libmd SHA256 for now */
> -/* #undef HAVE_SHA256_H */
> +#define HAVE_SHA256_H 1
>  
>  /* Define to 1 if you have the `SHA256_Init' function. */
> -/* FreeBSD - disabled libmd SHA256 for now */
> -/* #undef HAVE_SHA256_INIT */
> +#define HAVE_SHA256_INIT 1
>  
>  /* Define to 1 if the system has the type `SHA2_CTX'. */
>  /* #undef HAVE_SHA2_CTX */
> 
> Modified: head/share/mk/src.libnames.mk
> ==============================================================================
> --- head/share/mk/src.libnames.mk     Sat Jun 20 21:06:02 2020        
> (r362451)
> +++ head/share/mk/src.libnames.mk     Sat Jun 20 21:32:07 2020        
> (r362452)
> @@ -350,7 +350,7 @@ _DP_heimipcs=     heimbase roken pthread
>  _DP_kafs5=   asn1 krb5 roken
>  _DP_krb5+=   asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc
>  _DP_gssapi_krb5+=    gssapi krb5 crypto roken asn1 com_err
> -_DP_lzma=    pthread
> +_DP_lzma=    md pthread
>  _DP_ucl=     m
>  _DP_vmmapi=  util
>  _DP_opencsd= cxxrt
> _______________________________________________
> svn-src-head@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
> 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to