Strange path lookups resulting in no directories or files found #89

Closed
opened 2016-04-23 12:30:54 +00:00 by Earnestly · 4 comments
Earnestly commented 2016-04-23 12:30:54 +00:00 (Migrated from github.com)

To cut things short, I packaged this with ./configure --prefix=/usr along with make, make DESTDIR="$pkgdir" install and included the pkg-config symlink.

However I get the following errors:

% pkg-config --cflags --libs wlc
Package wlc was not found in the pkg-config search path.
Perhaps you should add the directory containing `wlc.pc'
to the PKG_CONFIG_PATH environment variable
Package 'wlc', required by 'world', not found

[What is this 'world' that pkgconf is referring to?]

So I threw it at strace and found it looking in rather odd places:

open("${exec_prefix}/lib/pkgconfig/wlc-uninstalled.pc", O_RDONLY) = -1 ENOENT (No such file or directory)
open("${exec_prefix}/lib/pkgconfig/wlc.pc", O_RDONLY) = -1 ENOENT (No such file or directory)
open("${datarootdir}/pkgconfig/wlc-uninstalled.pc", O_RDONLY) = -1 ENOENT (No such file or directory)
open("${datarootdir}/pkgconfig/wlc.pc", O_RDONLY) = -1 ENOENT (No such file or directory)

It seems as if these strings are not being expanded correctly in the Makefile and ending up in the final binary:

% strings pkgconf | grep exec
${exec_prefix}/lib
...

I suppose a work around for this might be to explicitly set these via ./configure. Ideally I'd not want to define PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig explicitly in my environment when those should be the defaults.

PS: If you need any more information about my environment just ask, I wasn't sure what to include, if it was relevant.

To cut things short, I packaged this with `./configure --prefix=/usr` along with `make`, `make DESTDIR="$pkgdir" install` and included the `pkg-config` symlink. However I get the following errors: ``` % pkg-config --cflags --libs wlc Package wlc was not found in the pkg-config search path. Perhaps you should add the directory containing `wlc.pc' to the PKG_CONFIG_PATH environment variable Package 'wlc', required by 'world', not found ``` _[What is this 'world' that `pkgconf` is referring to?]_ So I threw it at strace and found it looking in rather odd places: ``` open("${exec_prefix}/lib/pkgconfig/wlc-uninstalled.pc", O_RDONLY) = -1 ENOENT (No such file or directory) open("${exec_prefix}/lib/pkgconfig/wlc.pc", O_RDONLY) = -1 ENOENT (No such file or directory) open("${datarootdir}/pkgconfig/wlc-uninstalled.pc", O_RDONLY) = -1 ENOENT (No such file or directory) open("${datarootdir}/pkgconfig/wlc.pc", O_RDONLY) = -1 ENOENT (No such file or directory) ``` It seems as if these strings are not being expanded correctly in the Makefile and ending up in the final binary: ``` % strings pkgconf | grep exec ${exec_prefix}/lib ... ``` I suppose a work around for this might be to explicitly set these via `./configure`. Ideally I'd not want to define `PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/share/pkgconfig` explicitly in my environment when those should be the defaults. _PS: If you need any more information about my environment just ask, I wasn't sure what to include, if it was relevant._
Earnestly commented 2016-04-23 13:08:14 +00:00 (Migrated from github.com)

Edit: I can workaround this issue by explicitly setting --datadir=/usr/share and --libdir=/usr/lib.

Edit: I can workaround this issue by explicitly setting `--datadir=/usr/share` and `--libdir=/usr/lib`.

What version did you build, what shell?

What version did you build, what shell?
Earnestly commented 2016-05-19 23:30:19 +00:00 (Migrated from github.com)

The build was from commit 7e6fa325eb IIRC and the shell used was bash.

This issue still affects up to commit a7893e7572.

The build was from commit https://github.com/pkgconf/pkgconf/commit/7e6fa325eb668c3462981a16fb4c36270832e00f IIRC and the shell used was bash. This issue still affects up to commit https://github.com/pkgconf/pkgconf/commit/a7893e75728abeb302c5e7aa6b80fe5298766752.
Earnestly commented 2016-05-20 09:51:55 +00:00 (Migrated from github.com)

Lovely, that works. Thank you o/

Lovely, that works. Thank you o/
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#89
There is no content yet.