Ineffective '--with-path' parameter in pkg-config call #214

Closed
opened 2021-03-08 16:59:32 +00:00 by PierreARM · 2 comments
PierreARM commented 2021-03-08 16:59:32 +00:00 (Migrated from github.com)

The pkgconf/pkg-config command provided by ubuntu doesn't have the --with-path parameter [1]. The build system of trace-cmd however relies on it, cf in make-trace-cmd.sh.

Another issue is that the --with-path parameter doesn't modify the paths the pkg-config command uses to look for packages.
Indeed:

[Cmd line]>
pkg-config --with-path /home/a_path --variable pc_path pkg-config
[Result]>
/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

The paths pkg-config uses are not modified. This means that in the Makefile of libtraceevent [2] and libtracefs [3] repositories, the following bit:

pkgconfig_dir ?= $(word 1,$(shell $(PKG_CONFIG)                \
                       --variable pc_path pkg-config | tr ":" " "))

are not picking the path where to install the libraries correctly, and using the '--with-path' parameter in 'make-trace-cmd.sh' is not effective.

It should be possible to reproduce this issue when coming to building libtracefs when following the steps in the PACKING file:

[Cmd line]>
INSTALL_PATH=/tmp/install ../trace-cmd/make-trace-cmd.sh install
[Result]>
Package libtraceevent was not found in the pkg-config search path.
Perhaps you should add the directory containing `libtraceevent.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libtraceevent', required by 'virtual:world', not found
Makefile:70: *** libtraceevent.so not installed.  Stop.

[1] http://manpages.ubuntu.com/manpages/hirsute/man1/pkg-config.1.html
[2] https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git
[3] https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git

The pkgconf/pkg-config command provided by ubuntu doesn't have the `--with-path` parameter [1]. The build system of trace-cmd however relies on it, cf in `make-trace-cmd.sh`. Another issue is that the `--with-path` parameter doesn't modify the paths the pkg-config command uses to look for packages. Indeed: ``` [Cmd line]> pkg-config --with-path /home/a_path --variable pc_path pkg-config [Result]> /usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig ``` The paths pkg-config uses are not modified. This means that in the `Makefile` of libtraceevent [2] and libtracefs [3] repositories, the following bit: ``` pkgconfig_dir ?= $(word 1,$(shell $(PKG_CONFIG) \ --variable pc_path pkg-config | tr ":" " ")) ``` are not picking the path where to install the libraries correctly, and using the '--with-path' parameter in 'make-trace-cmd.sh' is not effective. It should be possible to reproduce this issue when coming to building `libtracefs` when following the steps in the `PACKING` file: ``` [Cmd line]> INSTALL_PATH=/tmp/install ../trace-cmd/make-trace-cmd.sh install [Result]> Package libtraceevent was not found in the pkg-config search path. Perhaps you should add the directory containing `libtraceevent.pc' to the PKG_CONFIG_PATH environment variable Package 'libtraceevent', required by 'virtual:world', not found Makefile:70: *** libtraceevent.so not installed. Stop. ``` [1] http://manpages.ubuntu.com/manpages/hirsute/man1/pkg-config.1.html [2] https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git [3] https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git
PierreARM commented 2021-03-08 17:18:34 +00:00 (Migrated from github.com)

Closed as I filled the issue for the wrong project

Closed as I filled the issue for the wrong project

--with-path is a pkgconf addition. ubuntu uses freedesktop pkg-config, unless you explicitly install pkgconf itself.

`--with-path` is a pkgconf addition. ubuntu uses freedesktop pkg-config, unless you explicitly install pkgconf itself.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ariadne/pkgconf#214
There is no content yet.