-
Notifications
You must be signed in to change notification settings - Fork 39
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
How to compile JAERO on MacOS #44
Comments
Thanks for that, I'm sure there will be others that will find this helpful. I thought it should work on a Mac but haven't got a Mac to test on. It's nice to see it running on a Mac. |
Turned out there is also a slight difficulty if you want to use libaeroambe to decode voice. The library should be compiled according to README but before executing
After compiling the library place it to the application folder under aeroambe.so name:
Now the problem is that on MacOS applications are executed not from their path in /Applications directory, thus JAERO will not find aeroambe.so in current directory unless it's executed like this:
In this case "Can't find or load all the libraries necessary for aeroambe. You will not get audio." message disappears. |
Ah I see. A solution might be getting the path of the JAERO executable add adding that to what is searched for. Currently what is looked for is... QLibrary library("aeroambe.dll");
if(!library.load())library.setFileName("aeroambe.so");
if(!library.load())
{
aeroambe_object_error_str="Can't find or load all the libraries necessary for aeroambe. You will not get audio.";//library.errorString() is a usless description and can be missleading, not using
ambe=new QObject;
ambe->setObjectName("NULL");
} So maybe... QLibrary library("aeroambe.dll");
if(!library.load())library.setFileName("aeroambe.so");
if(!library.load())library.setFileName(QDir::currentPath()+"/aeroambe.dll");
if(!library.load())library.setFileName(QDir::currentPath()+"/aeroambe.so");
if(!library.load())
{
aeroambe_object_error_str="Can't find or load all the libraries necessary for aeroambe. You will not get audio.";//library.errorString() is a usless description and can be missleading, not using
ambe=new QObject;
ambe->setObjectName("NULL");
} https://doc.qt.io/qt-5/qdir.html#currentPath says I'll add that to the next release if that works for you. |
@afiskon tried the linked compiled app, but crashed at startup on macOS High Sierra. Is there a minimum version of macOS required? |
@Vinz87 I'm afraid I have little experience of developing for MacOS.... My best guess is that it requires some libraries that were not included to .app |
I would add an edit to step 5
Then all is good! |
I don't have access to a Mac so can't test things out. GitHub has something called GitHub actions that allow building for Mac on their servers (macOS Big Sur 11.0 and macOS Catalina 10.15 are currently being used) , you tell it how to build the thing and it will build it for you. It would be nice if someone who has a Mac could put together a build script for GitHub actions to add Mac OS. Here is the current Linux one https://github.com/jontio/JAERO/blob/master/ci-linux-build.sh which could be used for a guide as to how to make one suitable for Mac. I'm not sure how many commands are the same on Mac and Linux but I would think quite a few of them would be the same so someone with a Mac should be able to relatively easily modify for Mac OS. |
I followed the instructions but qmake fails when qmqtt module is not found. I thought it might be a variation with respect to 1.0.4.11 built in 2019 and tried it. But that fails due to an audio function whose syntax must have changed when qt5 became qt6 (which I have). I’ll try to install the qmqtt module, but I don’t know what to do with the function. Can I ask for this MacOS how-to to be updated to the new QT reality? It’s beyond my overall skills. Thanks! |
I'll comment one thing you mentioned; however, it's not your core issue.
Go back and install As I said, that may not be your core issue. Good luck! |
Thank you mahtin, that's what I intended to do as well. With qt5
"-lacars" reference is something I've already seen while compiling (successfully) dumpvdl2 or acarsdec. In JAERO.pro, it is referenced in:
I simply tried to comment it out, but after this make all stopped at
so I suspect I won't go anywhere near my building goals on a M1 machine with no significant help Any suggestion or positive build stories? Andy |
If I may add something, having perused jontio link to a bash script for generating a Linux binary, maybe only a similar approach for MacOS on M1 would do. He suggests it shouldn't be difficult to adapt it to MacOS terminal commands, but it's far beyond my capacity. https://github.com/jontio/JAERO/blob/master/ci-linux-build.sh For instance I suppose one could go through every dependency installed with "apt-get" and build or brew each one, but than there would be problems with linking. Sending over an SOS... Andy |
@lawendel - my thoughts ...
OH! I missed the M1 part of this. Yeah - that changes things; but sometimes not in a bad way. I still keep an Intel Mac just because some thing still only work on that platform. But I think you're ok. Read on. When it comes to paths,
Wait a second - that library is within the JAERO build. So that's not the fully the issue above. Do you see the error:
undoing the
So I'm guessing that you didn't build the
It's not that hard, both MacOS and Linux share the same Hope that helps. |
That sounds extremely helpful, thanks a lot! Before trying to follow your hint let me confirm libacars (libacars-2, actually) was installed, indeed following szpajders guidelines, in order to build Tomasz's decoder for Acars. |
Yes - I'm sure you did download it and install it .. but was it built and installed within the right place? The |
I'm deeply ashamed of my lack of Unix literacy... I do find both libacars.h and libacars.pc.in in this path:
As per Tomasz directions, a "libacars" folder containing libacars.h was installed - during build - in this path /usr/local/include/libacars-2 Now it looks like I'm even more confused than the make command! |
I think if you do this, you will get a good setup. You placed/build
Then go back into the JAERO build folder and try again. I could be wrong; however, I think this may work. |
I'm so grateful for your kind help, I see your rationale nut unfortunately your suggestion did not work, the compiler is still warning about not being able to locate libacars. I thought again about all this situation, prompted by your observation on my successful (Iso I believed) attempt to build szpajder's libacars for his acars-decoder. My current failures to make of JAERO a fully fledged app, makes me reflect that qmake is complaining about a source code, not a binary! It still doesn't explain why it cannot find a source in a location which seems quite obvious to me, but it prompted me to search for the .dylib files that a supposedly successful build would have placed somewhere. And indeed there they was, both in the folder in which I had git cloned szpajder's code in my home directory: ~/libacars/build/libacars and in /usr/local/lib I can list libacars-2.dylib and libacars-2.2.dylib. Only at that point I realized that szpajder's notes on building libacars for MacOS in the readme.md file were originally yours! In szpajder/libacars#11 you warned about the need to brew-install cmake while avoing a final Linux command to install the compiled libraries. Szpajder on the other hand acknowledged that he was going to update the readme.md accordingly. So far so good, as I mentioned above, this tells me I'd better to check if acarsdec (which seems to be working nicely) is indeed making good use of libacars. But doesn't explains why libacars sources included in JAERO are not properly recognized. Unless... One more thing I've just realized is that szpajder profile in GitHub hosts as a project a personal fork of jontio JAERO. This fork, according to szpajder "switches to more generic libacars API, drop ARINC622-specific calls". Now my final question for you is the following: what if I substitute this fork for jontio original 1.0.4.11 source, while keeping to follow afiskon guidelines and his mods for JAERO.pro project file? |
I managed to build JAERO on MacOS. There were a few problems in a process, that I would like do describe here.
Here is how I did it.
Also remove the following files from SOURCES list to avoid "duplicate symbol" errors:
Finally, comment this line because you don't have this directory (it's outside of the archive):
The application starts and seems to work, although I don't have an antenna yet to properly test it. The most difficult and time consuming part was to download QTCreator. If anyone is looking for a MacOS build: https://afiskon.ru/s/JAERO-1.0.4.11-MacOS-x64-build-by-afiskon.zip
The text was updated successfully, but these errors were encountered: