Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Testing - Bookworm][SOLVED] Is it normal to not have /usr/lib/x86_64-linux-gnu/pkgconfig in PKG_CONFIG_PATH?

- - ALL UNSTABLE / TESTING THREADS SHOULD BE POSTED HERE - -
This sub-forum is the dedicated area for the ongoing Unstable/Testing releases of Debian. Advanced, or Experienced User support only. Use the software, give, and take advice with caution.
Post Reply
Message
Author
MultiplexLayout
Posts: 56
Joined: 2020-09-23 19:21
Has thanked: 7 times

[Testing - Bookworm][SOLVED] Is it normal to not have /usr/lib/x86_64-linux-gnu/pkgconfig in PKG_CONFIG_PATH?

#1 Post by MultiplexLayout »

As the title suggests, a lot of cmake projects were failing. Upon inspection I found that running "PGK_CONFIG_PATH=/usr/lib/x86-64-linux-gnu cmake .." worked. My questions are:
Did I mess up my install somehow by not having this path by default?
Do I have to add it in .xsessionrc if I want to permanently add this path to pkg-config?
Last edited by MultiplexLayout on 2023-03-25 20:01, edited 1 time in total.

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Testing - Bookworm] Is it normal to not have /usr/lib/x86_64-linux-gnu/pkgconfig in PKG_CONFIG_PATH?

#2 Post by Aki »

Hello,

I'm not an expert of pkg-config, therefore for me this is an interesting topic.

In my Debian Stable, pkg-config outputs:

Code: Select all

$ pkg-config --variable pc_path pkg-config
/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
and the variable PKG_CONFIG_PATH in not set:

Code: Select all

$ if [ -z ${PKG_CONFIG_PATH+x} ]; then echo "var is unset"; else echo "var is set to '$var'"; fi
var is unset
In my Debian installation, the *.pc files (used by pkg-config) currently are in /usr/lib/x86_64-linux-gnu/pkgconfig and in /usr/share/pkgconfig . Therefore, pkg-config should be able to find the "*.pc" files (if any) with debian standard packages without the PKG_CONFIG_PATH variable, for example:

Code: Select all

$ pkg-config --modversion udev
247
$ pkg-config --print-variables udev
pcfiledir
udev_dir
udevdir
$ pkg-config --variable pcfiledir udev
/usr/share/pkgconfig
Can you give an example of a project (simple, if it is possible) that is affected by what you reported ?

Hope that helps.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

MultiplexLayout
Posts: 56
Joined: 2020-09-23 19:21
Has thanked: 7 times

Re: [Testing - Bookworm] Is it normal to not have /usr/lib/x86_64-linux-gnu/pkgconfig in PKG_CONFIG_PATH?

#3 Post by MultiplexLayout »

Aki wrote: 2022-12-17 12:39 Hello,

I'm not an expert of pkg-config, therefore for me this is an interesting topic.

In my Debian Stable, pkg-config outputs:

Code: Select all

$ pkg-config --variable pc_path pkg-config
/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
and the variable PKG_CONFIG_PATH in not set:

Code: Select all

$ if [ -z ${PKG_CONFIG_PATH+x} ]; then echo "var is unset"; else echo "var is set to '$var'"; fi
var is unset
In my Debian installation, the *.pc files (used by pkg-config) currently are in /usr/lib/x86_64-linux-gnu/pkgconfig and in /usr/share/pkgconfig . Therefore, pkg-config should be able to find the "*.pc" files (if any) with debian standard packages without the PKG_CONFIG_PATH variable, for example:

Code: Select all

$ pkg-config --modversion udev
247
$ pkg-config --print-variables udev
pcfiledir
udev_dir
udevdir
$ pkg-config --variable pcfiledir udev
/usr/share/pkgconfig
Can you give an example of a project (simple, if it is possible) that is affected by what you reported ?

Hope that helps.
I'm sorry for the extremely late reply. dosbox-staging is a project I built recently that fails without PKG_CONFIG_PATH set. Running "meson setup build" ultimately gives:

Code: Select all

Run-time dependency opusfile found: NO (tried pkgconfig and cmake)

meson.build:400:0: ERROR: Dependency "opusfile" not found, tried pkgconfig and cmake
It's referring to libopusfile-dev, which is installed on my machine. In fact running "PKG_CONFIG_PATH=/lib/x86_64-inux-gnu/pkgconfig meson setup build" causes it to run perfectly.

Once again sorry for not responding. For some reason your quote didn't bring up a notification.

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Testing - Bookworm] Is it normal to not have /usr/lib/x86_64-linux-gnu/pkgconfig in PKG_CONFIG_PATH?

#4 Post by Aki »

Hello,

I tried to recompile the git repository and I did not incurred in errors (Debian Stable 11.6 with meson from Debian Backports):

Code: Select all

$ meson compile -C build
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /home/aki/Scaricati/dosbox-staging/build
ninja: Entering directory `/home/aki/Scaricati/dosbox-staging/build'
[62/388] Compiling C object subprojects/fluidsynth-2.3.0/libfluidsynth.a.p/src_midi_fluid_midi.c.o
../subprojects/fluidsynth-2.3.0/src/midi/fluid_midi.c: In function ‘fluid_player_set_bpm’:
../subprojects/fluidsynth-2.3.0/src/midi/fluid_midi.c:2494:5: warning: ‘fluid_player_set_midi_tempo’ is deprecated [-Wdeprecated-declarations]
 2494 |     return fluid_player_set_midi_tempo(player, 60000000L / bpm);
      |     ^~~~~~
../subprojects/fluidsynth-2.3.0/src/midi/fluid_midi.c:2471:5: note: declared here
 2471 | int fluid_player_set_midi_tempo(fluid_player_t *player, int tempo)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[388/388] Linking target dosbox
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

MultiplexLayout
Posts: 56
Joined: 2020-09-23 19:21
Has thanked: 7 times

Re: [Testing - Bookworm] Is it normal to not have /usr/lib/x86_64-linux-gnu/pkgconfig in PKG_CONFIG_PATH?

#5 Post by MultiplexLayout »

Aki wrote: 2023-03-06 21:04 Hello,

I tried to recompiled the git repository and I did not incurred in errors (Debian Stable 11.6 with meson from Debian Backports):

Code: Select all

$ meson compile -C build
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /home/aki/Scaricati/dosbox-staging/build
ninja: Entering directory `/home/aki/Scaricati/dosbox-staging/build'
[62/388] Compiling C object subprojects/fluidsynth-2.3.0/libfluidsynth.a.p/src_midi_fluid_midi.c.o
../subprojects/fluidsynth-2.3.0/src/midi/fluid_midi.c: In function ‘fluid_player_set_bpm’:
../subprojects/fluidsynth-2.3.0/src/midi/fluid_midi.c:2494:5: warning: ‘fluid_player_set_midi_tempo’ is deprecated [-Wdeprecated-declarations]
 2494 |     return fluid_player_set_midi_tempo(player, 60000000L / bpm);
      |     ^~~~~~
../subprojects/fluidsynth-2.3.0/src/midi/fluid_midi.c:2471:5: note: declared here
 2471 | int fluid_player_set_midi_tempo(fluid_player_t *player, int tempo)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[388/388] Linking target dosbox
This is clearly something on my end. I found that I have /usr/lib/x86_64-linux-gnu/pkgconfig, /usr/lib/pkgconfig and /usr/share/pkgconfig. Running "pkgconf --list-all" give me registered directories from /usr/share/pkgconfig and /usr/lib/pkgconfig, but not /usr/lib/x86_64-linux-gnu. This would explain why I have to add it to the env variable every time, but I have no idea how this happened or how to add the latter path to pkg-config's default paths without having to set it in .xsessionrc.

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Testing - Bookworm] Is it normal to not have /usr/lib/x86_64-linux-gnu/pkgconfig in PKG_CONFIG_PATH?

#6 Post by Aki »

What is your installed Debian version ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

MultiplexLayout
Posts: 56
Joined: 2020-09-23 19:21
Has thanked: 7 times

Re: [Testing - Bookworm] Is it normal to not have /usr/lib/x86_64-linux-gnu/pkgconfig in PKG_CONFIG_PATH?

#7 Post by MultiplexLayout »

Aki wrote: 2023-03-06 22:53 What is your installed Debian version ?
cat /etc/debian_version and neofetch both say bookworm/sid.

MultiplexLayout
Posts: 56
Joined: 2020-09-23 19:21
Has thanked: 7 times

Re: [Testing - Bookworm] Is it normal to not have /usr/lib/x86_64-linux-gnu/pkgconfig in PKG_CONFIG_PATH?

#8 Post by MultiplexLayout »

I have a small update on this. When I use "pkg-config --path" on a module I know is in /usr/lib/x85-64/pkgconfig, a double slash appears before the filename like so:

Code: Select all

pkg-config --path libcrypto++
/usr/lib/x86_64-linux-gnu/pkgconfig//libcrypto++.pc
This doesn't happen with the other two pkgconfig paths

Code: Select all

pkg-config --path wcf
/usr/lib/pkgconfig/wcf.pc
pkg-config --path adwaita-icon-them
/usr/share/pkgconfig/adwaita-icon-theme.pc
Have I done something wrong, or should I report this as a bug?

MultiplexLayout
Posts: 56
Joined: 2020-09-23 19:21
Has thanked: 7 times

Re: [Testing - Bookworm] Is it normal to not have /usr/lib/x86_64-linux-gnu/pkgconfig in PKG_CONFIG_PATH?

#9 Post by MultiplexLayout »

I'm sorry for tripleposting. But I finally fixed it. For some reason I had pkgconf and pkg-config installed alongside pkgconf-bin:i386 and libpkgconf3:i386 (my architecture is amd64). No idea how that happened.

Post Reply