-
Notifications
You must be signed in to change notification settings - Fork 4
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
[macOS] Build error: common.h: error: expected identifier before '(' token
#12
Comments
MacOS? ...I'm afraid I have no experience with the system and no access to such a machine. You are bravely wandering into the unknown here :D I just pushed a tiny commit that should fix this one specific name clash. You can try again, but there might be more problems ahead. I guess Also the internal plugin compiler is currently only designed for x86 CPUs. If you have a M1/2 CPU, using an audio effect or synthesizer will definitely lead to a crash. But even on x86 there might be incompatibilities. Good luck! |
@momentarylapse Thank you for responding. I was in fact building this on a PowerPC, but I have M1 and x86 hardware too. Usually ppc is the harder case to fix, though Sonoma has issues at the moment too. Everything in between is usually more trivial. We do have pulseaudio, but not too up-to-date one. I actually planned on updating it to current version, but postponed it due to a mess with switching to Meson. But it should work. I will try the build again today. |
@momentarylapse Your fix worked, I got to here now:
Will keep you posted on the progress. |
@momentarylapse So I just removed unsupported flags as a dirty hack for now (and defined MAP_ANONYMOUS to MAP_ANON, this is a credible fix), and got here:
Perhaps either OpenGL has to be disabled for old macOS (AFAIK no proper support for it before 10.7) or |
In fact it would be nice to have CMake options to turn on linkage to specific libraries, not let the build decide to link to whatever it randomly happens to find. |
And it actually built through completion without OpenGL:
|
wow, that is quite a lot of progress.
Thanks for the effort! Please keep me updated. I'm very curious if it can run on your system |
seems you were faster fixing the linker problem than me replying :D That looks like the build succeeded? |
And the binary crashes on launch:
However, this may have nothing to do with I can try the build on Sonoma aarch64 now. |
10.6 has some sort of initial OpenGL, as far as I recall, but it may not be functional. PowerPC also got an early development build of 10.6, which may not support something which 10.6.8 does. For mmap flags, just removing those is fine? It appears they are not supported on macOS at all. |
On a side note, this is rather weird:
Unrelated to the topic, but I will look into what is going on there. |
Yes, removing Hmm, the stacktrace first looked like it is a pure gtk issue. But yes, that line is weird indeed. Maybe I am missing some default linking targets that are required on Mac. Or the linking process is completely different. This is hard to debug without direct access, but I'll do some online research after work today. |
OpenGL issue seems to be general: I get the same error on Sonoma:
|
Unfortunately, while with OpenGL disabled it builds fine, it again fails at launch, though differently:
(This is on macOS 14.2 on M1.) |
P. S. Just to confirm, those two flags are not recognized on Sonoma too:
|
There are 3 problems in your log:
|
Btw. can you get other gtk applications to run (like the gtk4-demo)? Since tsunami does some evil things, it might be better to check simpler/more standard-conforming programs first. |
@momentarylapse On Sonoma yes, at least GTK3 worked. (On PowerPC I think it is broken.) |
Seeing a window is definitely progress! I've pushed some commits to the
I also included a fix for the case if From your screenshots I suspect, that the automatic color scheme detection might have failed too. If the program starts, you can try explicitly selecting a scheme (the "hamburger" button on the right side of the header bar opens a menu with a "settings" entry). Then the grid should become visible. |
@momentarylapse Now it actually fails from 5e0e8be commit on Sonoma:
|
ok, I was very stupid there - making the macros distinguish between linux and mac, but then never handling the mac case... hopefully fixed now. |
@momentarylapse Got it. Will update on results tomorrow, thank you! |
@momentarylapse This is still there:
|
ok, out of paranoia, I don't set those flags on MacOS for now. (devel branch) As for pulse audio, do you have other programs that are able to connect to the pulse server? |
To be honest I need to look for something that uses it. It is not something I used (besides building the thing). I would generally expect maintained ports to work on current versions of MacOS, but Do I need to do something proactively for it to connect to whatever it needs? I merely installed it in the default config, as it is: https://github.com/macports/macports-ports/blob/master/audio/pulseaudio/Portfile |
From ef06eb7 it builds on Sonoma with no patches from my side, I get window on start, but also the crash:
|
To be honest, I am not sure. Configuring the pulseaudio server is somewhat dark magic to me. In a post here Homebrew/homebrew-core#30062 they used Somewhere else ( https://stackoverflow.com/questions/53272935/e-cannot-create-pulseaudio-stream-connection-refused ) their server was simply not running. In theory, tsunami should be able to connect to pulse on its own. Worst case, there is some internal firewall to block connections between processes, requiring explicit configuration or special privileges. If pulseaudio keeps not working, you can also try and recompile with the |
If I disable
|
my apologies. Should be fixed now |
(in general it was a bad idea, trying to hastily repair things during 5min tea breaks from work. At least this time, I tried rebuilding with different audio libraries disabled) |
It built now, but still crashes once I close Help window:
P. S. Sorry, I understand this can be annoying when same errors keep repeating. |
not at all, just embarrassed of my sloppy work :P thanks for the patience I also just tried the gtk3 version again, and there seems to be a bug, crashing when closing a window. I'll try to fix it tomorrow. It won't help too much, but as a workaround simply to disable the Help window, you can create a file |
I'm carefully optimistic that the gtk3 crash is now solved. |
@momentarylapse Indeed, built from 601ecbe against GTK3, In the terminal I got this:
But the app runs (well, I did not test functionality, but I clicked some menus, everything looked fine and no more crashes). |
But on 10.6 with gcc13 (setting of the build are the same as on 14.2) I got the error now:
This should have worked (whether the app will work is a different question), since originally I could compile it. |
not sure, which header interferes here. So I simply added safety macros wherever |
Yes, it builds fine now on 10.6. Thank you! I will see if I can make X11 work there. It was using XQuartz version, apparently, I will try switching to Macports one. |
A quick update: gtk3 build works, portaudio output works, but it is lagging badly (on Sonoma on M1, so it is not a slow machine). pulseaudio seems to be broken for completely unrelated reasons, i.e. just broken on MacOS at the moment. I cannot get it to work anywhere. |
My experiences with portaudio are not the best either. On windows it plays back at 10% speed. But portaudio will find each physical device multiple times through different APIs. And some of them will play just fine. I'm considering to drop portaudio and switch to a native API on windows instead. But doing the same for macos is probably not feasable without an actual mac to develop on. If pulseaudio is not working, do you know if there is a port of pipewire on mac? |
Apparently not, since it requires |
Some major news on this topic! I recently managed to get my hands on a used MacBook M1. There now is a preferred way to build, see the readme:
DISCLAIMER: this will only run the base program (UI, playback, recording, basic editing) - the plugin compiler does not work yet (i.e. audio fx, synthesizers, etc.)! I have plans to also get this working, but that will still take a couple of months. Progress will happen in the repo of the actual JIT compiler. I've also added a (highly experimental) CoreAudio backend (branch |
@momentarylapse Oh, this is awesome! I will try it out. If we could make coreaudio work on legacy systems too, that will be great. |
Ok, with CoreAudio is does not build for me now:
|
Without CoreAudio, trying to build from 0afd47d commit, I get this error now:
UPD. That is available in 10.7+: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_allow-jit And |
And afterwards this:
|
wow, thank you very much for the experiments and the pull request! That is valuable MacOS development info! The big mess you report from including CoreAudio, I was expecting that and was very surprised it didn't already show up for me. The problem is, that CoreAudio defines Symbols in the global namespace colliding with tsunami's. My quick hack was to wrap the As for the |
Sorry for the long silence. At least, I now got most of the internal JIT compiler ported to aarch64 (momentarylapse/kaba#1) and with that most of the plugins are now also usable. I'll soon close this ticket here, since the original problem (simply compiling the program) has been fixed for a while. For any specific problems or requests, you can always open new issues. The development of the CoreAudio backend continue here: #15 |
Thank you! |
Something does not work here, at least with
gcc
andgtk4
:The text was updated successfully, but these errors were encountered: