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

fix compilation with 'AUDIO_PORT_SUPPORT' #5841

Merged
merged 2 commits into from Dec 21, 2020
Merged

fix compilation with 'AUDIO_PORT_SUPPORT' #5841

merged 2 commits into from Dec 21, 2020

Conversation

fogti
Copy link
Contributor

@fogti fogti commented Dec 11, 2020

As this only affects the JACK audio backend, I think this PR won't be affected by #5592.
I added a check for jack_port_set_name (deprecated) vs jack_port_rename.
see also hydrogen-music/hydrogen#365 (2016 !)

@LmmsBot
Copy link

LmmsBot commented Dec 11, 2020

🤖 Hey, I'm @LmmsBot from github.com/lmms/bot and I made downloads for this pull request, click me to make them magically appear! 🎩

Linux

Windows

🤖
{"platform_name_to_artifacts": {"Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://11620-15778896-gh.circle-artifacts.com/0/lmms-1.3.0-alpha.1.51%2Bg8e00c73-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/11620?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "Windows": [{"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://11623-15778896-gh.circle-artifacts.com/0/lmms-1.3.0-alpha.1.51%2Bg8e00c7364-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/11623?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://11622-15778896-gh.circle-artifacts.com/0/lmms-1.3.0-alpha.1.51%2Bg8e00c7364-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/11622?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/bdrswm7cc654vy5n/artifacts/build/lmms-1.3.0-alpha-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/36827330"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/205b9hleon47wakr/artifacts/build/lmms-1.3.0-alpha-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/36827330"}]}, "commit_sha": "307636099d8f819b60eb6df2167ecd6f37d77e96"}

@PhysSong
Copy link
Member

Thanks for the note! It seems like jack_port_rename was introduced in JACK1 0.125.0 and JACK2 1.9.11, but Ubuntu 16.04 still ships with the version of JACK1 without the function while JACK2 is okay.
When using weakjack(enabled by default), it dispatches calls to jack_port_rename using jack_port_set_name internally on runtime, so it's always okay when using weakjack.

If you're interested in adding the checks to CMakeLists.txt, I can help you. Otherwise, I will add relevant changes to this.

@fogti
Copy link
Contributor Author

fogti commented Dec 13, 2020

I think I should add the appropriate check_library_exists check to the IF(WANT_JACK) { IF(WANT_WEAKCHECK) ... ELSE ... [here] } section in the /CMakeLists.txt file. The lines added would be

SET(CMAKE_REQUIRED_LIBRARIES_BACKUP "${CMAKE_REQUIRED_LIBRARIES}")
SET(CMAKE_REQUIRED_LIBRARIES "${JACK_LIBRARIES}")
CHECK_LIBRARY_EXISTS(jack jack_port_rename "" HAVE_JACK_PORT_RENAME)
SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES_BACKUP}")
UNSET(CMAKE_REQUIRED_LIBRARIES_BACKUP)

I'm unsure in which header file or such I should place the following line, if at all (I haven't found an appropriate configure_file statement in any CMakeLists.txt)

#cmakedefine HAVE_JACK_PORT_RENAME

@fogti
Copy link
Contributor Author

fogti commented Dec 14, 2020

Oh, the macos CI is broken...

@PhysSong PhysSong merged commit eeec3f8 into LMMS:master Dec 21, 2020
@fogti fogti deleted the jack-ports-minfix branch December 21, 2020 14:00
IanCaio pushed a commit to IanCaio/lmms that referenced this pull request Mar 28, 2021
Co-authored-by: PhysSong <tteu.ingog@gmail.com>
devnexen pushed a commit to devnexen/lmms that referenced this pull request Apr 10, 2021
Co-authored-by: PhysSong <tteu.ingog@gmail.com>
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
Co-authored-by: PhysSong <tteu.ingog@gmail.com>
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 this pull request may close these issues.

None yet

3 participants