I was finally able to produce a build on macOS 10.15! Took a few nights of tinkering to figure it out. I'll do my best to remember how I worked through it, but it was kind of tedious. Basically each time an error showed up during `make` or `make install`, I'd just have to look at the terminal output really closely and try to understand what went wrong, and address each issue one at a time until it finally worked.
I'm using macOS 10.15, Xcode 12.3, and Qt5.15.2. I built QLC+ from source at the "QLC+_4.12.3" tag.
My intentions were to make a small code addition to the 4.12.3 build. More about that is discussed here:
https://www.qlcplus.org/forum/posting.p ... 33&t=14754
I used `brew install qt5` to install Qt. I couldn't figure out the offline installer for 5.15.2, I tried building it from source, but ran into issues. Ultimately using homebrew to install made it super easy, however, it installs it to /usr/local/Cellar/qt/5.15.2, which I suspect may have caused some trouble, but I was able to work through it.
With everything installed, I followed the QLC+ macOS build instructions
https://github.com/mcallegari/qlcplus/w ... -build-Qt5
I installed port and used the commands suggested to install dependencies, but I'm not sure that worked correctly- I definitely ran into issues with some dependencies and had to try installing them via port again later. Particularly libftdi - the instructions say to install libftdi0 via port, but I'm pretty sure I ended up needing to install libftdi1, and I ended up using homebrew to install it instead.
I specified my Qt directory with
Code: Select all
export QTDIR=/usr/local/Cellar/qt/5.15.2/bin
Then from within the qlcplus directory, I ran
Code: Select all
/usr/local/Cellar/qt/5.15.2/bin/qmake
Then I ran `make`. This initially runs into problems- I can't remember which occurred first, there were issues in maybe a handful of files that had deprecation warnings that would cause make to error out and stop. I can't remember exactly which files.. but each time I'd run into this, I'd identify which file it was that was last attempted to be compiled in the log output before the deprecation warning/errors occurred, then I'd search the qlcplus project directory for that file to figure out which Makefile it was referenced in. Then I'd open that Makefile, towards the top it would have a line that starts with "CXXFLAGS". I'd find the end of that line and append
to it. Then I'd run `make` again, let it go until it hit the next spot with deprecation warnings, then I'd do that same process again and again. Ultimately did that maybe 7+ times, to Makefiles for rgbtext, E1.31, osc, ola, qlcplus, macos... probably a couple more, I didn't document it as I did it. Maybe there is an easier way to handle this by specifying "-Wno-deprecated-declarations" at a higher level or something where it would apply to everything, instead of one by one.... I'm not certain. I am software developer, but I don't work in c++ and I'm not super familiar with Makefiles and this type of build process, so maybe my approach here is a little kludgey.
But, eventually, I made it though `make` without any further issues.
Then on to `make install` where there were further issues. Particularly issues where usage of `install_name_tool` would fail because it couldn't find a file it was trying to use. When that happens, I'd have to figure out which file it was bombing on and figure out why. libftdi1.2.dylib was troublesome... I think at first maybe I didn't install that correctly. I tried `sudo port install libftdi1`, but I think I ended up in a situation where I had libftdi1.2.5.0.dylib and not 1.2. I think I installed with `brew install libtdi1`, which puts it in the homebrew cellar folder rather than something like /opt/local/lib . In the end I had kind of a mess between those two directories, and something created symlinks from libftdi1.2.dylib pointing to libftdi1.2.5.0.dylib, but install_name_tool did not like that.
So, I ended up modifying qlcplus/platforms/macOS/Makefile, the 2nd line below "install_LIBFTDI" so that it would point to the libftdi1.2.5.0.dylib that I had in the cellar dir:
Code: Select all
$(QINSTALL) /usr/local/Cellar/libftdi/1.5/lib/libftdi1.2.5.0.dylib $(INSTALL_ROOT)/Users/jhays/QLC+.app/Contents/Frameworks/libftdi1.2.dylib
I think I finally got past that issue..there were more, but at this point its was pretty late and my memory is foggy..
Now the QLC+.app is appearing in my user dir after make install, but the process was still erroring out, still usually due to `install_name_tool` not being able to find something.
Next was QtCore.framework... and then a bunch of other Qt frameworks. Each time, the directory it should appear in inside QLC+.app/Contents/Frameworks would get created, but the framework just wasn't getting copied there, and make install would bomb. So I'd go locate the framework in /usr/local/Cellar/qt/5.15.2/lib/, copy the .framework, paste it inside the QLC+.app/Contents/Frameworks (in whatever respective directory in there that each framework belonged in. Then I'd run make install again, it would get past that and bomb at the next Qt___.framework. So I copied each one as needed, and a couple other files for the same issue. I'm suspecting this was because Qt was installed to the homebrew Cellar and for some reason the build process couldn't find frameworks it was looking for, despite the fact that I specified the QTDIR at the beginning of this process.
And then finally, make install produced a QLC+.app in my user directory that I could successfully open and run.
One other note- although the build is working, the final line in the terminal output says this:
Code: Select all
lrelease, lrelease-qt4 and lrelease-qt5 are not present in this system ! Aborting.
I'm not sure if this is any concern... but the build was produced and the app does run, so maybe it isn't an issue?
I then made a minor tweak to a cpp file, ran make and then make install again, ran the app, and my change was reflected. Success!
To any other poor souls that go down this path of trying to build on macOS 10.15... best advice I can give is to read the terminal output closely whenever it bombs. Figure out why it is bombing and try to address it step by step.. eventually it
is possible to build QLC+ 4.12.3 on macOS 10.15.