Skip to content

hiredis pkg-config file incorrectly ignores multiarch libdir spec'n #767

Closed
@pgnd

Description

@pgnd

building hiredis

	cmake \
	 -DCMAKE_INSTALL_PREFIX=/usr/local \
	 -DCMAKE_INSTALL_LIBDIR=lib64 \
	..
	make
	make install

installs in correct multiarch-specified lib dir, == lib64

	ls -al /usr/local/lib*/*hiredis*
		lrwxrwxrwx 1 root root  18 Feb 20 11:31 /usr/local/lib64/libhiredis.so -> libhiredis.so.0.14*
		-rwxr-xr-x 1 root root 88K Feb 20 11:31 /usr/local/lib64/libhiredis.so.0.14*

but the installed pkg-config .pc points to incorrect lib path

	pkg-config hiredis --libs
		-L/usr/local/lib -lhiredis

checking

	cat /usr/local/lib64/pkgconfig/hiredis.pc
		prefix=/usr/local
		exec_prefix=${prefix}
		libdir=${exec_prefix}/lib
		includedir=${prefix}/include
		pkgincludedir=${includedir}/hiredis

		Name: hiredis
		Description: Minimalistic C client library for Redis.
		Version: 0.14.0
		Libs: -L${libdir} -lhiredis
		Cflags: -I${pkgincludedir} -D_FILE_OFFSET_BITS=64

sourced from

	cat /usr/local/src/hiredis/hiredis.pc.in
		prefix=@CMAKE_INSTALL_PREFIX@
		exec_prefix=${prefix}
!!		libdir=${exec_prefix}/lib
		includedir=${prefix}/include
		pkgincludedir=${includedir}/hiredis

		Name: hiredis
		Description: Minimalistic C client library for Redis.
		Version: @PROJECT_VERSION@
		Libs: -L${libdir} -lhiredis
		Cflags: -I${pkgincludedir} -D_FILE_OFFSET_BITS=64

incorrectly ignores set multiarch libdir -- and misdirects from actually-installed lib

which breaks any downstream app (e.g., suricata) using pkg-config for hiredis config & linking

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions