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

Mac OS: Builds and runs, but window not showing: "[NSApplication transformToForegroundApplication]: unrecognized selector sent to instance" #14

Open
dubaaron opened this issue Jun 13, 2018 · 7 comments

Comments

@dubaaron
Copy link

Was able to successfully build, using brew to install SDL (1.2.15) and wxMac (3.0.4) ...

Upon running "sound-of-sorting", the program appears to be running (shows on dock and in Activity Monitor, etc), but no window shows up on the screen. The following messages are displayed in the console:

aaron:~/Code/sound-of-sorting (master)
$ sound-of-sorting
2018-06-12 21:44:54.386 sound-of-sorting[53404:645234] -[NSApplication transformToForegroundApplication]: unrecognized selector sent to instance 0x7f9a1b70de40
2018-06-12 21:44:54.387 sound-of-sorting[53404:645234] -[NSApplication transformToForegroundApplication]: unrecognized selector sent to instance 0x7f9a1b70de40
^C

So, not sure what's going on, but looks like a mac-specific wxWidgets thing?

Running OS X El Capitan 10.11.6.

Posting in case anybody else has built/run on Mac or has any additional insights.

Thank you very much.

@AlexisEspinosaGayosso
Copy link

I'm facing the same issue, can anyone help, please! Many tahnks

@equal-l2 equal-l2 mentioned this issue Sep 30, 2020
@equal-l2
Copy link
Contributor

This is fixed by using SDL2(#19).

If you want to try, apply the following change and run autoreconf -i.
https://github.com/bingmann/sound-of-sorting/pull/19/files#diff-67e997bcfdac55191033d57a16d1408a

@equal-l2
Copy link
Contributor

equal-l2 commented Oct 5, 2020

As #19 is now merged, the master branch should work on macOS out of the box.

@ierye
Copy link

ierye commented Feb 17, 2021

Build on macOS Catalina 10.15.x
$ brew install sdl2 wxWidgets
$ ./configure --with-sdl-prefix="/usr/local/Cellar/sdl2/2.0.14_1"
$ make
$ make install
$ sound-of-sorting

@Landsailor
Copy link

Landsailor commented Oct 11, 2022

@ierye
The current sdl2 it installs is 2.24.1. Any idea why the config.log is showing this as the reason for failure? It's a fresh install that exists at /usr/local/Cellar/sdl2/2.24.1/

It looks like it might not handle the M1 CPU without additional configuration, perhaps? (https://stackoverflow.com/questions/67118759/sdl2-m1-mac-the-linked-and-embedded-framework-sdl2-image-framework-is-missin)

./configure --with-sdl-prefix="/usr/local/Cellar/sdl2/2.24.1" output

*** Could not run SDL test program, checking why... *** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means SDL was incorrectly installed *** or that you have moved SDL since it was installed. In the latter case, you *** may want to edit the sdl2-config script: /usr/local/Cellar/sdl2/2.24.1/bin/sdl2-config

From config.log...

/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/crc32intrin.h:53:10: error: use of undeclared identifier '__builtin_ia32_crc32hi'; did you mean '__builtin_arm_crc32h'? return __builtin_ia32_crc32hi(__C, __D); ^ /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/crc32intrin.h:53:10: note: '__builtin_arm_crc32h' declared here /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/crc32intrin.h:73:10: error: use of undeclared identifier '__builtin_ia32_crc32si' return __builtin_ia32_crc32si(__C, __D); ^ In file included from conftest.cpp:15: In file included from /usr/local/Cellar/sdl2/2.24.1/include/SDL2/SDL.h:38: In file included from /usr/local/Cellar/sdl2/2.24.1/include/SDL2/SDL_cpuinfo.h:110: In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/immintrin.h:21: /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture" #error "This header is only meant to be used on x86 and x64 architecture" ^ /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:37:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'? __builtin_ia32_emms(); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:670:12: note: '__builtin_isless' declared here return isless(__lcpp_x, __lcpp_y);

@equal-l2
Copy link
Contributor

equal-l2 commented Oct 12, 2022

@Landsailor
Did you install brew using rosetta2?
If so, SDL2 might enable Intel-specific features and give you errors under native compilation.

(Guessed from that your prefix is /usr/local, which should be /opt if you are on M1 and using the default settings)

@fast01
Copy link

fast01 commented Jun 29, 2023

See this ggerganov/whisper.cpp#139
I think something is wrong with your SDL2 installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants