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

cadence doesn't see jack #55574

Closed
magnetophon opened this issue Feb 11, 2019 · 19 comments · Fixed by #81098
Closed

cadence doesn't see jack #55574

magnetophon opened this issue Feb 11, 2019 · 19 comments · Fixed by #81098

Comments

@magnetophon
Copy link
Member

Issue description

cc maintainer: @bignaux

Some of the tools included with cadence need jack.
For example catia.
When I run it, I get a dialog saying: JACK is not available in this system, cannot use this application.

Steps to reproduce

nix-env -iA nixos.cadence 
catia

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.19.15-rt12, NixOS, 19.03pre168781.929cc78363e (Koi)
  • multi-user?: no
  • sandbox: yes
  • version: nix-env (Nix) 2.2
  • channels(bart): ""
  • channels(root): "nixos-19.03pre168781.929cc78363e"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
@deliciouslytyped
Copy link
Contributor

A temporary workaround is to call cadence like the following, I don't remember what the correct way to deal with .so libraries and python is; LD_LIBRARY_PATH=$(nix-build -E "(import <unstable> {}).libjack2" --no-out-link)/lib cadence

@deliciouslytyped
Copy link
Contributor

It still can't see jackdbus and I don't know how to get the dbus.mainloop.pyqt5 thing, see also #50610

The current tree seems to have a patch for it 1eab402

@jtojnar
Copy link
Member

jtojnar commented Jan 6, 2020

Libraries are generally patched like this:

patches = [
(substituteAll {
src = ./vlc-paths.patch;
libvlcPath="${vlc}/lib/libvlc.so.5";
})
];

The place to patch:

https://github.com/falkTX/Cadence/blob/9324d24e065f23de4fd1036f1c760e8f1ed3d218/src/jacklib.py#L34

@sjfloat
Copy link
Contributor

sjfloat commented Feb 25, 2020

Is this held up because we don't know what to do or because we don't have time to do it?

Also, is there known work-around?

@jtojnar
Copy link
Member

jtojnar commented Feb 25, 2020

See my comment above for how to fix it. I use neither JACK or cadence so I cannot test it but I would expect it to work.

Workaround is described in the second comment.

@sjfloat
Copy link
Contributor

sjfloat commented Feb 25, 2020

Thanks!

I didn't get the impression that it worked for @deliciouslytyped.

@bignaux
Copy link

bignaux commented Feb 26, 2020

I think we can close this after merging #81098 . The problem with cadence, author has not enough time and it's full of bug, you fix one you'll discover 2.

@sjfloat
Copy link
Contributor

sjfloat commented Feb 26, 2020

I can confirm that, having tested your change (thanks very much!), it gets past the error dialog, but still has issues communicating with jack. However, this is only one of several jack clients in nixpkgs that exhibit the same issue. IOW, I believe this is a larger problem that just this instance.

In general, I'm finding that some jack client pkgs work with the jack service and many others do not.

Stated another way, jack functionality in NixOS seem largely (though not totally) to be broken in general.

@sjfloat
Copy link
Contributor

sjfloat commented Feb 26, 2020

I'll add that, with this change, cadence is definitely able to communicate with the jack server. However, cadence is essentially a launcher. @bignaux likely did fix cadence, but the individual apps that it launches within the pkg remain broken. In particular, catia still seems to be broken.

@bignaux
Copy link

bignaux commented Feb 26, 2020

Yes, did you have some :

  • Cannot connect to server socket err = No such file or directory
    Cannot connect to server request channel
    jack server is not running or cannot be started

or Client name = xxxxx conflits with another running client

Im not able to use jack anymore, but same with jack_control, i don't think it's cadence problem here.

@sjfloat
Copy link
Contributor

sjfloat commented Feb 26, 2020

I did indeed.

And I've seen that kind of thing with several other jack apps. I think you did fix the cadence issue, but I believe it's more widespread.

My own experience is with jack1 (vs jack2/jackdbus) and that in Debian. I'm not very knowledgeable about jack2 and I wonder if there's some subtle differences in the way the clients interact with the respective jack versions that accounts for some working and others not.

@bignaux
Copy link

bignaux commented Feb 26, 2020

And it's works with pulseaudio bridge, renoise jack ... I think we have dirty bug in jack2/dbus yes, try to figure out what.

@sjfloat
Copy link
Contributor

sjfloat commented Feb 26, 2020

Off-hand, I can say that ardour, hydrogen, bristol, patchage all work for me. Ingen and ecasound are examples of apps with similar issues to the above.

I'm pretty new to NixOS, but I'd be happy to contribute in whatever way I can -- testing, etc.

@bignaux
Copy link

bignaux commented Feb 26, 2020

Move on #74742 :D

@sjfloat
Copy link
Contributor

sjfloat commented Feb 26, 2020

I wonder if this long-standing issue is related #11079

@bignaux
Copy link

bignaux commented Feb 28, 2020

The issue is a breaking ABI . The jack server and the clients have to be compiled against the same toolchain. So if you use a nixos cached client, like zynaddsubfx with a libjack2's jackdbus from nixpkgs cache, you'll get such errors :

before : nixos cache /nix/store/7l573r73dqfisf6mjngsyg2xg3dsfvc9-zynaddsubfx-3.0.5/bin/zynaddsubfx

Cannot read socket fd = 3 err = No such file or directory
CheckRes error
Could not read result type = 22
Client name = temp-client conflits with another running client
Cannot connect to the server

after install from nixpkgs : /nix/store/sqb7cjb0gjv503k8nrpqjz0fi11r6qgq-zynaddsubfx-3.0.5/bin/zynaddsubfx

Starting Audio: JACK
Jack buffer resized
Audio Started

@sjfloat
Copy link
Contributor

sjfloat commented Feb 28, 2020 via email

@bignaux
Copy link

bignaux commented Feb 28, 2020

Sorry i didn't investigate more, i'd be interesting if people can fix theirs bugs with that, anyway, time to close this issue.

@magnetophon
Copy link
Member Author

Yes, when #81098 is merged, this can be closed as far as I'm concerned. Thanks @bignaux !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants