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

build: fix symlinks in lv2dir #290

Merged
merged 1 commit into from Jan 13, 2024

Conversation

puleglot
Copy link
Contributor

@puleglot puleglot commented Apr 7, 2021

Fixes loading of lv2 plugin and its gui.

@falkTX
Copy link
Collaborator

falkTX commented Apr 7, 2021

Which ticket/issue does this fix?
It has been working so far as-is for many people, I think applying these changes will break existing setups.

@puleglot
Copy link
Contributor Author

puleglot commented Apr 7, 2021

This should fix regression introduced by d18a873 and 75f33e0

@puleglot
Copy link
Contributor Author

puleglot commented Apr 7, 2021

Downstream bug: https://bugs.gentoo.org/779343

@gitterdude
Copy link

The last working git version in Ubuntu 18.04 right now is 4e69944; just prior to d18a873
The newer ones fail as stated in the gentoo report.

@falkTX
Copy link
Collaborator

falkTX commented May 21, 2021

So seems fine to me, a regression from a recent commit.
I added a little comment about something that needs attention, rest seems fine.
Thanks

@boomshop
Copy link
Member

Great, thanks a bunch for taking care of this one @falkTX and @puleglot

Please let me know when this fix is in a state able to be merged and I'll pull the trigger on it.

Fixes loading of lv2 plugin and its gui.
@falkTX
Copy link
Collaborator

falkTX commented May 23, 2021

The changes look good
Though I did not verify if the build is indeed fixed (would be great to have some CI/automated testing..)

@nick87720z
Copy link

nick87720z commented Jun 9, 2021

Fixes #294

I tried to edit symlink to point to libcalf.so. This made it loadable in carla, but without special gui.
PulseEffects keeps telling that these plugins (incl bass_enhancer) was not found.

Update: I can confirm, that commit from PR fixes both plugin loading and custom gui, at least in carla.
But pulseeffects still cries.
Tested puleglot's repo/branch/commit with live ebuild in gentoo:

EVCS_OFFLINE= \
EGIT_OVERRIDE_REPO_CALF_STUDIO_GEAR_CALF=https://github.com/puleglot/calf \
EGIT_OVERRIDE_BRANCH_CALF_STUDIO_GEAR_CALF=fix-symlinks \
EGIT_OVERRIDE_COMMIT_CALF_STUDIO_GEAR_CALF=078f24797183acc21d49730b33fa96c103f4aaa4 \
emerge -av1 --nodeps --quiet-build=n calf

@puleglot
Copy link
Contributor Author

puleglot commented Jun 27, 2021

But pulseeffects still cries.

What problem with pulseeffects? I tested with Ardour only, but in theory calf should be loadable by any other LV2 host.

@zettberlin
Copy link

I tried to edit symlink to point to libcalf.so. This made it loadable in carla, but without special gui.

Same here.
I created a symlink from libcalf.so to calf.so. Plugins load and can be edited with a generic host UI but their own GUI does not load. No entry in Carlas log and none in Ardours log either...

@zettberlin
Copy link

Tried again with this branch, to no avail...
Filenames are as wrong as before in /usr/local/lib/calf (no calf.so but libcalf.so) and Carla and Ardour complain.

What do I do wrong?

@zettberlin
Copy link

I now set a symlink from python to python3, it does look a little different in Carla, as in, now I get something in the logs:

Will use UI-Bridge for 'GxAmplifier-Stereo-X', binary: "/usr/lib/carla/carla-bridge-lv2-x11"
ALL OK!
Will use UI-Bridge for 'Calf Flanger', binary: "/usr/lib/carla/carla-bridge-lv2-gtk2"
ALL OK!
Carla assertion failure: "fLibFilename.isNotEmpty()" in file CarlaBridgeFormat.cpp, line 104
Failed to load UI binary, error was:
(null)

As you see: the Guitarix GUI loads OK, Calf Flanger does not...

@kisaragi-hiu
Copy link

Arch Linux, but this should also replicate everywhere else:

  • git clone https://github.com/calf-studio-gear/calf calf
  • cd calf
  • Remove the existing Calf installation, if any
  • ./autogen.sh
  • make
  • sudo make install
  • Open Ardour and insert Calf Compressor
  • Observe the error --- Ardour's log only shows one line, that it failed to instantiate
  • Open REAPER, for that matter, and insert Calf Compressor
  • Observe even the generic UI fails to load

This patch seems to be necessary to get master builds to load again.


Filenames are as wrong as before in /usr/local/lib/calf (no calf.so but libcalf.so)

.../lib/calf/libcalf.so is the correct name. .../lib/lv2/calf.lv2/calf.so being a symlink to inexistant .../lib/calf/calf.so is the incorrect part.

I tried to edit symlink to point to libcalf.so
I created a symlink from libcalf.so to calf.so

Creating symlinks for libraries yourself is generally not a reliable way to get things to load properly.


Would it help if GitHub Actions is set up to at least check that ./autogen.sh; make succeeds?

@JohannesLorenz
Copy link
Collaborator

As requested, I was able to run this PR in CI (on a temporary branch) with success for linux-gcc, linux-clang, macos and mingw64: https://github.com/calf-studio-gear/calf/actions/runs/6578998596 .

If I understand the comments right, this is safe to merge now?

@JohannesLorenz JohannesLorenz added this to the 0.90.4 milestone Oct 21, 2023
@JohannesLorenz
Copy link
Collaborator

Friendly reminder that I have an open question in the above post. Would be nice if anyone could help here.

@kisaragi-hiu
Copy link

Thank you for the maintenance; I'll take a look tomorrow to see how Calf builds on my machine (now using KDE Neon) before and after this patch.

@kisaragi-hiu
Copy link

kisaragi-hiu commented Oct 29, 2023

I've tested again and the results still agree with my previous result, where the plugin does not load without this PR, and does with it applied.

With current master (4c0d805):

git clone https://github.com/calf-studio-gear/calf calf
cd calf

./autogen.sh
./configure
make # assuming lv2 and other dependencies are already present
sudo make install

Then open a DAW and try to load a Calf plugin. It fails to load.

With this PR applied:

# cleanup
sudo make uninstall
git clean -Xdf
# apply this PR onto the just-cloned copy
gh pr checkout 290 # using github cli
git rebase origin/master # just fast forward for the test

./autogen.sh
./configure
make # assuming lv2 and other dependencies are already present
sudo make install

Now open eg. Ardour and try to load a Calf plugin. It loads successfully.

As an aside, distro-provided Calf packages don't (yet) hit this issue because they generally use the latest tagged release, which is 41a2b7f (0.90.3) before the commits introducing the regression identified by OP.

@JohannesLorenz
Copy link
Collaborator

@kisaragi-hiu Thanks a lot! I guess we can just merge this PR then?

@JohannesLorenz
Copy link
Collaborator

Will merge in 3 days if no one will disagree.

@JohannesLorenz JohannesLorenz merged commit 0f567ee into calf-studio-gear:master Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants