Remove Conan
Describe the bug A Conan should be removed because building Saucedacity from scratch can take quite a while when building from scratch. This is because Conan has to build wxWidgets (and others) from source. This can be quite unnecessary and especially bogs down build times.
To Reproduce Steps to reproduce the behavior:
- Install required dependencies (including Conan)
- Clone this repo w/ submodules
- Build Saucedacity using only local libraries (i.e, Conan libraries),
- Observe long build times if this is your first time building Saucedacity.
Expected behavior A clear and concise description of what you expected to happen.
Additional information (please complete the following information):
- OS: Any supported OS
- Version: any version as of this latest commit
Additional context Of course, this is highly dependent on the machine Saucedacity is being built on. Conan might not slow down the build process on faster machines because of the extensive resources available. Nevertheless, for initial builds, and even on these machines, it should still help save some time as Conan will not be building dependencies from scratch.
Currently, from my tests, it appears that Saucedacity cannot fully be built against system libraries. This is namely because of zlib, which ld complains of undefined symbols. Additionally, upstream Audacity uses private PortAudio APIs, so building against the system's PortAudio will not work until this is resolved (we can still build against our own PortAudio in lib-src for the time being, however).
~~This will also be a blocking issue for writing new Qt code in an experimental branch. Once Conan is fully removed or made optional, I will start adding Qt code into an experimental branch and will eventually merge this one by one into main. I prefer that we have Conan removed/disabled/made optional at that point.~~
UPDATE: I originally made this a blocking issue because I thought this would be a relatively easy thing to do. However, it appears that I need to study more about Saucedacity's CMake build system in order to fully remove Conan.
UPDATE 2: At the very least, Conan should be removed by the time we are fully ready by Conan. Again, this is at the very least, so I an expecting that Conan will probably be removed before then.
So the one issue I've been having here is how building is going to work on Windows moving forward (i.e., without Conan). I will be honest with you, I don't build too many things on Windows (except for Saucedacity of course).
I have recently looked at vcpkg as a solution to building without Conan on Windows. I am currently testing this, and so far things are going along smoothly, but I haven't gotten Saucedacity to build yet. If all goes well, this will become an officially supported method.
After some work, it appears that libmp3lame and libmad are blocking libraries. Although they can be installed through vcpkg, they are unable to be found by CMake even after specifying the custom toolchain file. More work needs to be investigated through this.
UPDATE: As of 3aaa9d2, we are now using Tenacity's libmad fork. This is an informal indicator of progress that we've started to move away from Conan. Previously, libmad was resolved through Conan. As of that commit, it is no longer resolved that way..
Ew...libmad apparently hasn't been updated ever since 2004...
So what? If it ain't broken, don't fix it, right? Well, there have been several security vulnerabilities discovered since then, which is a little concerning, to say the least...
...but fear not! Our friendly neighbors have forked libmad, incorporating patches from Debian and Fedora, fixing these security issues and even switching to CMake. Horray for Tenacity!
So what this all have to do with removing Conan? Well, to make it clear first, we plan on using Tenacity's libmad as a local library, but we will still allow for building against the system's libmad. This is for security issues, but we will allow build against the system's libmad because using a local libmad might be redundant (e.g. on FreeBSD). Second, this relates to Conan removal because we are no longer using Audacity's libmad from Conan. Additionally, this helps solve the vcpkg problem (unless one builds against the system's libmad on Windows, which will not work).
We'll see how far we get from here...
🍿
Okay, so here's the plan with this:
I will merge Tenacity's build system into Saucedacity, replacing our current build system. I will do this when the time is right.
There is one concern: wxWidgets 3.1.3 or later is required. Building Saucedacity against wxWidgets 3.0 will fail. My concern is mostly on Linux, but I believe that this can be mitigated through vcpkg, as I see a git submodule in Tenacity's source tree.
I am pretty sure leio did some backwards compatibility work specifically for 3.0, as many distros required that version.