Skip to content

libdir config & pkg-config file are incorrect in source build #41

@ghost

Description

on a source build

cd /develop/
mkdir tmp
cd tmp
git clone https://github.com/Pulse-Eight/platform
cd platform
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/develop/tmp/P8 -DCMAKE_INSTALL_LIBDIR=lib64 -DBUILD_SHARED_LIBS=1

creates a PKG-CONFIG file

cat P8.pc
	prefix=/develop/tmp/P8
	libdir=/develop/tmp/P8//develop/tmp/platform/build/lib64
	includedir=/develop/tmp/P8/include
	DEPENDENCIES=-lpthread

	Name: P8
	Description: Pulse-Eight platform support library 2.1
	Version: 2.1.0
	Libs: -L${libdir} -lP8
	Cflags: -I${includedir}

where the value for libdir

	libdir=/develop/tmp/P8//develop/tmp/platform/build/lib64

is wrong. it should be just

	libdir=/develop/tmp/P8/lib64

and then

make
make install

never installs the .pc file , or the LIBS, in the target dir

make install
	[100%] Built target P8
	Install the project...
	-- Install configuration: ""
	-- Up-to-date: /develop/tmp/platform/build/lib64/libP8.so.2.1.0
	-- Up-to-date: /develop/tmp/platform/build/lib64/libP8.so.2
	-- Up-to-date: /develop/tmp/platform/build/lib64/libP8.so
	-- Installing: /develop/tmp/P8/include/P8/os.h
	-- Installing: /develop/tmp/P8/include/P8/posix/os-socket.h
	-- Installing: /develop/tmp/P8/include/P8/posix/os-threads.h
	-- Installing: /develop/tmp/P8/include/P8/posix/os-types.h
	-- Installing: /develop/tmp/P8/include/P8/sockets/cdevsocket.h
	-- Installing: /develop/tmp/P8/include/P8/sockets/socket.h
	-- Installing: /develop/tmp/P8/include/P8/sockets/tcp.h
	-- Installing: /develop/tmp/P8/include/P8/threads/atomics.h
	-- Installing: /develop/tmp/P8/include/P8/threads/mutex.h
	-- Installing: /develop/tmp/P8/include/P8/threads/threads.h
	-- Installing: /develop/tmp/P8/include/P8/util/atomic.h
	-- Installing: /develop/tmp/P8/include/P8/util/buffer.h
	-- Installing: /develop/tmp/P8/include/P8/util/StringUtils.h
	-- Installing: /develop/tmp/P8/include/P8/util/StdString.h
	-- Installing: /develop/tmp/P8/include/P8/util/timeutils.h
	-- Installing: /develop/tmp/P8/include/P8/util/util.h
	-- Up-to-date: /develop/tmp/platform/build/lib64/pkgconfig/P8.pc
	-- Up-to-date: /develop/tmp/platform/build/lib64/P8/P8-config.cmake

	find /develop/tmp/P8 | grep pc
		empty result
	```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions