CMake cannot find Jack + workaround

Building and customizing Audacity from the source code.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
audingo
Posts: 3
Joined: Fri May 07, 2021 6:14 pm
Operating System: Linux Debian

CMake cannot find Jack + workaround

Post by audingo » Fri May 07, 2021 6:25 pm

Hi there,

I'm using the tarball audacity-minsrc-3.0.2.tar.xz, CMake binary download cmake-3.20.2-linux-x86_64.tar.gz, on Debian 10.9.

CMake fails to find Jack giving this warning message:
CMake Warning at cmake-proxies/portaudio-v19/CMakeLists.txt:91 (find_package):
By not providing "Findjack.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "jack", but
CMake did not find one.

Could not find a package configuration file provided by "jack" with any of
the following names:

jackConfig.cmake
jack-config.cmake

Add the installation prefix of "jack" to CMAKE_PREFIX_PATH or set
"jack_DIR" to a directory containing one of the above files. If "jack"
provides a separate development package or SDK, be sure it has been
installed.
I managed to find the file lib-src/portaudio-v19/cmake_support/FindJack.cmake and renamed it to Findjack.cmake (uppercase J to lowercase j). CMake seemed happy with this and gave no warning. Audacity built with no problems and I was able to use Jack.

I don't know if this is a bug with CMake or a configuration issue with Audacity, however. I hope this is a valid bug report!

steve
Site Admin
Posts: 81336
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: CMake cannot find Jack + workaround

Post by steve » Fri May 07, 2021 6:54 pm

This fixed it for me:
https://github.com/audacity/audacity/co ... ae389ce713
audingo wrote:
Fri May 07, 2021 6:25 pm
I managed to find the file lib-src/portaudio-v19/cmake_support/FindJack.cmake and renamed it to Findjack.cmake
I didn't need to do that, and I don't know if that will cause problems.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

audingo
Posts: 3
Joined: Fri May 07, 2021 6:14 pm
Operating System: Linux Debian

Re: CMake cannot find Jack + workaround

Post by audingo » Sat May 08, 2021 2:42 am

That was also one of the things I tried, i.e. changing find_package( Jack ) to find_package( jack ). That did not work for me.

I agree it may cause a problem. Could it be a bug with case-handling in recent versions of cmake? I could not find an older version of cmake to test with.

steve
Site Admin
Posts: 81336
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: CMake cannot find Jack + workaround

Post by steve » Sat May 08, 2021 11:35 am

audingo wrote:
Sat May 08, 2021 2:42 am
Could it be a bug with case-handling in recent versions of cmake?
No, it's because "find_package( Jack )" was incorrectly changed to "find_package( jack )"here:
https://github.com/audacity/audacity/co ... b5b34cb812


Id suggest that you delete the entire Audacity source code and extract audacity-minsrc-3.0.2.tar.xz again, then make this change only:
https://github.com/audacity/audacity/co ... ae389ce713

Create a "build" folder, then run cmake from the build folder.

The cmake options that I use are:

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_ffmpeg=loaded -DwxWidgets_CONFIG_EXECUTABLE=/opt/wxWidgets/bin/wx-config ..
Note that this points to Audacity's version of wxWidgets that I installed to /opt/wxWidgets.

Alternatively, if you have not built and installed Audacity's version of wxWidgets, you could use:

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_wxwidgets=local -Daudacity_use_ffmpeg=loaded ..
This will clone a local copy of Audacity's wxWidgets.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

audingo
Posts: 3
Joined: Fri May 07, 2021 6:14 pm
Operating System: Linux Debian

Re: CMake cannot find Jack + workaround

Post by audingo » Sat May 08, 2021 3:41 pm

Thanks very much! I edited the correct file and used
cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_ffmpeg=loaded ..
and it built like a dream.

Sorry for misreading the github log - I did not notice that I was changing the wrong CMakeLists.txt. The tip about using the local wxWidgets is great as well. I installed the Audacity patched wxWidgets to /usr/local because it would not step on anything on my system, but if it does become an issue I know what to do now.

Post Reply