Skip to content

OpenAL gives wrong include and libs path with pkg-config #167528

@necessarily-equal

Description

@necessarily-equal

Describe the bug

The pkg-config file for OpenAL is unusable.

Steps To Reproduce

Steps to reproduce the behavior:

  1. open a devshell with pkg-config and openal (works both with the stable and unstable release of nixpkgs)
  2. pkg-config --cflags
  3. notice that the flags are not correct: « -I/nix/store/iccwkh7yacv40zyqnj1mah73616mid5s-openal-soft-1.21.1//nix/store/iccwkh7yacv40zyqnj1mah73616mid5s-openal-soft-1.21.1/include -I/nix/store/iccwkh7yacv40zyqnj1mah73616mid5s-openal-soft-1.21.1//nix/store/iccwkh7yacv40zyqnj1mah73616mid5s-openal-soft-1.21.1/include/AL »

in a single command, nix-shell -E 'with (import <nixpkgs> {}); stdenv.mkDerivation{name="foo"; buildInputs=[pkg-config openal];}' --run 'pkg-config --cflags openal'

here is the result on unstable: -I/nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1//nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1/include -I/nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1//nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1/include/AL

Expected behavior

Include path is

  • /nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1/include
  • /nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1/include/AL
    instead of
  • /nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1//nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1/include
  • /nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1//nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1/include/AL

Likewise for --libs, -L/nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1//nix/store/dvb8l321pvzdyb2c2ljpc9wvrfzs335w-openal-soft-1.21.1/lib should not contain the path twice.

Notify maintainers

@ftrvxmtrx

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.106, NixOS, 21.11 (Porcupine)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.4`
 - channels(root): `"nixos-21.11.336340.2ebb6c1e5ae, nixpkgs-git"`
 - channels(afontain): `"nixos-20.09-20.09.4407.1c1f5649bb9, nixpkgs-unstable-22.05pre342949.28d58b97925, nixpkgs-20.09-20.09.4407.1c1f5649bb9"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions