Bug 253089

Summary: zlib appears mis-versioned in pkg-config as 1.2.10 releng12.1 src versions the library at 1.2.11 as does zlib.h
Product: Base System Reporter: alt2600
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Many People CC: delphij, emaste
Priority: ---    
Version: 12.1-RELEASE   
Hardware: Any   
OS: Any   

Description alt2600 2021-01-30 03:36:24 UTC
12.1-RELEASE-p12 FreeBSD 12.1-RELEASE-p12 r368528

/usr/src/sys/contrib/zlib/zlib.h   snippet

#ifndef ZLIB_H
#define ZLIB_H

#include "zconf.h"

#ifdef __cplusplus
extern "C" {
#endif

#define ZLIB_VERSION "1.2.11"
#define ZLIB_VERNUM 0x12b0
#define ZLIB_VER_MAJOR 1
#define ZLIB_VER_MINOR 2
#define ZLIB_VER_REVISION 11
#define ZLIB_VER_SUBREVISION 0


# $FreeBSD: releng/12.1/lib/libz/zlib.pc 311285 2017-01-04 16:09:08Z delphij $
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
sharedlibdir=${libdir}
includedir=${prefix}/include

Name: zlib
Description: zlib compression library
Version: 1.2.10

Requires:
Libs: -L${libdir} -L${sharedlibdir} -lz
Cflags: -I${includedir}


pkg-config --modversion zlib
1.2.10

found this while trying to upgrade a port that now explicitly requires zlib 1.2.11 and thought I had to update to 12.2 instead of just waiting for 13, but everything I am seeing is suggesting 1.2.11 is in the base of releng12.1 but the pc file is versioned incorrectly. Not sure if maybe there was a reason it was held at 1.2.10, or if it should in fact be 1.2.11

when i edit /usr/libdata/pkgconfig/zlib.pc to reflect version 1.2.11 the port builds and runs fine, but not sure this is correct and will be clobbered on any new patches to releng12.1 during install. releng12.2 no longer has the lib/libz/zlib.pc file which may be the issue, perhaps it uses the sys/contrib/zlib.pc.in file to dynamically produce the pkg-config pc file? else the library source files seem to be identical in the git repo. 12.1 is old in the tooth, but it is still listed as a supported version so I figured I post the potential bug. I didn't check the 11.4 branch.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2021-02-02 22:07:48 UTC
Imported in ca6e7a016c4d0b38ec2f2baf6837450b782a05ad