Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
necessarily-equal opened this issue Apr 6, 2022 · 9 comments
Closed

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

necessarily-equal opened this issue Apr 6, 2022 · 9 comments
Labels
0.kind: bug Something is broken

Comments

@necessarily-equal
Copy link
Contributor

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`
@necessarily-equal necessarily-equal added the 0.kind: bug Something is broken label Apr 6, 2022
@jtojnar
Copy link
Member

jtojnar commented Apr 13, 2022

See https://github.com/jtojnar/cmake-snips on how to fix this.

@jtojnar
Copy link
Member

jtojnar commented Apr 30, 2022

cc @fufexan @ilya-fedin

@fufexan
Copy link
Contributor

fufexan commented Apr 30, 2022

@jtojnar I'd happily work on this but I have no experience with CMake. Perhaps with some guidance I could try to make it work.

Would it need a patch on our side, or maybe a fix upstream?

@jtojnar
Copy link
Member

jtojnar commented Apr 30, 2022

Ideally, it would be fixed upstream. These are the offending lines (variables are absolute paths):

https://github.com/kcat/openal-soft/blob/22e6c0df6017aa86e2cd83d8073e4d490c55dd11/CMakeLists.txt#L1256-L1258

@ilya-fedin
Copy link
Contributor

kcat/openal-soft#696

@Artturin
Copy link
Member

Artturin commented Sep 8, 2022

#181875 merged

@Artturin Artturin closed this as completed Sep 8, 2022
@ilya-fedin
Copy link
Contributor

Why not to update it to 1.22.2 rather than patching? 🤔

@Artturin
Copy link
Member

Artturin commented Sep 8, 2022

Why not to update it to 1.22.2 rather than patching? thinking

looks like it was already done. i added a commit removing the patch in #172347

@ilya-fedin
Copy link
Contributor

Does search-out.patch actually apply? The code in 1.22.2 is different, so it's very surprising if it applies cleanly. It's possible to set -DALSOFT_SEARCH_INSTALL_DATADIR=ON instead of the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants