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

Compilation error: Apparent missing file #5771

Open
evertvorster opened this issue Dec 11, 2023 · 22 comments
Open

Compilation error: Apparent missing file #5771

evertvorster opened this issue Dec 11, 2023 · 22 comments
Labels
bug An error, undesired behaviour, or missed functionality

Comments

@evertvorster
Copy link

Bug description

When compiling the latest master of Audacity as of 2023-12-11, a compilation error pops up:

[ 13%] Linking CXX shared library ../../Release/lib/audacity/lib-utility.so
/mnt/int/system/aur/audacity-local-git/src/audacity/libraries/lib-music-information-retrieval/tests/MusicInformationRetrievalTests.cpp:2:10: fatal error: catch2/catch.hpp: No such file or directory
    2 | #include <catch2/catch.hpp>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.

It would appear that catch.hpp is missing, according to the error message.

Steps to reproduce

Compile Audacity from git master.

Expected behavior

A clean compile.

Actual behavior

The error described in the description.

Audacity Version

current master / alpha / nightly build

Operating system

Linux

Additional context

About my system:

Operating System: Arch Linux 
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Kernel Version: 6.6.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 32 × 13th Gen Intel® Core™ i9-13900HX
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: TUXEDO
Product Name: PD5x_7xSNC_SND_SNE
System Version: Not Applicable

Version of catch2 installed: 3.4.0, from Arch binary repos, second release.

@evertvorster evertvorster added the bug An error, undesired behaviour, or missed functionality label Dec 11, 2023
@crsib
Copy link
Contributor

crsib commented Dec 12, 2023

Arch build is quite broken right now, I had no time to check so far

@evertvorster
Copy link
Author

Just checked, and Audacity from the latest master still does not build.

@evertvorster
Copy link
Author

I am still unable to compile the sources from current master on Arch Linux. Is this related to something missing in Arch? Is anyone able to build current master on other flavors of Linux?

@crsib
Copy link
Contributor

crsib commented Jan 4, 2024

Arch support is still not fixed. We build Linux on CI continuously, AFAIK wx 3.2 build is broken.

Unfortunately I have no resources right now to fix the Arch build and I am alone working on that.

Generally I wouldn't recommend using master ATM, it's rather unstable

@evertvorster
Copy link
Author

Building on Arch just follows the build instructions listed on the Audacity site.

Would it help if I can pinpoint the commit that broke compilation?

@evertvorster
Copy link
Author

Hmm, it definitely seems Arch related. I see that the Arch repo version of Catch2 does not install catch2.hpp

In the compile instructions, it seems to be compiled with -DBUILD_SHARED_LIBS=OFF

I'm now trying the git version on Arch to see if that installs the catch2.hpp. There is not much point in talking to the Arch package maintainers, their reasons for doing whatever they are doing with the packages are usually very good, and it is only a matter of time before the other distrobutions out there follow suit.

So, it is quite likely that catch2.hpp will go away on other distrobutions as well. What is it used for in Audacity, and is there not a different way of getting the same functionality?

@crsib
Copy link
Contributor

crsib commented Jan 4, 2024

You can disable unit testing in Audacity. I doesn't need Catch to run.

I think the Catch version in Arch Linux just went to far away from what Audacity can use.

@evertvorster
Copy link
Author

I found the reason that this header disappeared:
https://stackoverflow.com/questions/65098604/catch2-installation-on-ubuntu-20-04-include-catch2-catch-hpp

How do I disable the unit testing, please?

@crsib
Copy link
Contributor

crsib commented Jan 4, 2024

-Daudacity_has_tests=Off I think

@evertvorster
Copy link
Author

Hmm, that works.

OK, so on the aur version of audacity that I maintain (audacity-local-git) I have turned off the tests like you suggested, and it's building away now.

I am now in the process of removing catch2 from the build requirements.
There is a catch2-v2 AUR package that will install a version of catch2 that Audacity can build with, but unless there is a very specific reason to include the unit tests, I would rather leave it out.

@christian-heusel
Copy link
Contributor

You can use extra/catch2-v2 (what a weird name) to compile the tests 😄
But ofc it would be the best if audacity ist just compatible with the catch2 package 😄 👍🏻

matoro added a commit to matoro/gentoo that referenced this issue Jan 16, 2024
matoro added a commit to matoro/gentoo that referenced this issue Jan 16, 2024
matoro added a commit to matoro/gentoo that referenced this issue Jan 16, 2024
matoro added a commit to matoro/gentoo that referenced this issue Jan 16, 2024
matoro added a commit to matoro/gentoo that referenced this issue Jan 16, 2024
matoro added a commit to matoro/gentoo that referenced this issue Jan 17, 2024
matoro added a commit to matoro/gentoo that referenced this issue Jan 17, 2024
matoro added a commit to matoro/gentoo that referenced this issue Jan 17, 2024
gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Jan 17, 2024
See: audacity/audacity#5771
See: audacity/audacity#5841 (reply in thread)
Bug: https://bugs.gentoo.org/916258
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
@evertvorster
Copy link
Author

@christian-heusel
Thanks for the contribution. I am aware that I can built audacity with catch2-v2, but I don't want to introduce a new and possibly conflicting dependancy.

I would rather wait for this issue to be fixed. :)

1 similar comment
@evertvorster
Copy link
Author

@christian-heusel
Thanks for the contribution. I am aware that I can built audacity with catch2-v2, but I don't want to introduce a new and possibly conflicting dependancy.

I would rather wait for this issue to be fixed. :)

@crsib
Copy link
Contributor

crsib commented Jan 17, 2024

I don't see this issue as a priority. We will likely update to Catch 3, but there is no goal to have unit tests to be buildable with the system version of Catch.

@evertvorster
Copy link
Author

evertvorster commented Jan 17, 2024 via email

@crsib
Copy link
Contributor

crsib commented Jan 17, 2024

  1. This is a library for unit testing. It is used only during the development and mainly concerns developers' setup and CI. This library is used by most of the team, most actively by @saintmatthieu and me. It does not pose any security issues for the end-user binaries.
  2. I don't know how bad the migration from version 2 to version 3 would be, but migration from 1 to 2 was infeasible on a project I worked on previously. Distros should not expect (and do not expect) that software will adopt a new major version of the dependency promptly, if at all. For this reason, there are multiple versions of Qt, GTK, and Catch2-v2
  3. Generally speaking, keeping all the dependencies up to date and having a working build that only uses "Linux system package manager provided packages" are very polar ideas. Not all Linux distributions use rolling release models.

@crsib
Copy link
Contributor

crsib commented Jan 17, 2024

BTW, you are having this issue because you use Conan for one of the dependencies, but try to use system libraries for the rest. Making a "system only" build effectively disables unit testing.

@christian-heusel
Copy link
Contributor

christian-heusel commented Jan 17, 2024

Making a "system only" build effectively disables unit testing.

Yes, but that is the reason why I opened #5841 in the first place as it is very confusing to enable the tests via -D audacity_has_tests=ON but don't get any after building. I think that linking these two options automatically is a mistake 😊

As downstream packagers especially given the rolling nature of Arch Linux it is a good thing to run the tests of any upstream packages in order to detect issues with the functionality of the package when a new library version is released. That's why I patched this out in the official package extra/audacity.

Distros should not expect (and do not expect) that software will adopt a new major version of the dependency promptly, if at all. For this reason, there are multiple versions of Qt, GTK, and Catch2-v2
Generally speaking, keeping all the dependencies up to date and having a working build that only uses "Linux system package manager provided packages" are very polar ideas. Not all Linux distributions use rolling release models.

I agree however that compatibility with the latest versions happens on a best effort basis, so don't get this wrong :)

Also I agree that the setup that lead to this very issue (mixing system / conan packages) is not a good idea, which is why we disable conan entirely for the official package.

@crsib
Copy link
Contributor

crsib commented Jan 17, 2024

which is why we disable conan entirely for the official package.

Yep, that was for Evert :-)

@evertvorster
Copy link
Author

Slightly off topic for this bug, but if there was a way to build Audacity without Conan and still have the ui of the various plugins show up, I would do that in a heartbeat.

@crsib
Copy link
Contributor

crsib commented Jan 18, 2024

I'm pretty sure that gtk2 only affects Calf

@evertvorster
Copy link
Author

Sorry for the delay in answering.
I have not used Calf for a while now, and have switched over to LSP plugins. They are still VST type plugins, and provide the graphical equalizer with Q controls that I require, among quite a few nice effects.

If I use the Audacity build from Arch/extra, the graphical elements of the plugins are not aligned with their boxes on this Wayland system, whereas on the build from AUR where Conan is used with the ancient WxWidgets it all works properly.

It's only WxWidgets and Portaudio that is pulled from Conan on this build, and the rest of the dependencies are system. I know it's not preferable mixing old and new libraries, but for me having functional software is more important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error, undesired behaviour, or missed functionality
Projects
None yet
Development

No branches or pull requests

3 participants