bingmann / sound-of-sorting

The Sound of Sorting - "Audibilization" and Visualization of Sorting Algorithms
http://panthema.net/2013/sound-of-sorting/
GNU General Public License v3.0
853 stars 120 forks source link

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

Open dubaaron opened 6 years ago

dubaaron commented 6 years ago

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 commented 5 years ago

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

equal-l2 commented 4 years ago

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 commented 4 years ago

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

ierye commented 3 years ago

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 commented 2 years ago

@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 commented 2 years ago

@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 commented 1 year ago

See this https://github.com/ggerganov/whisper.cpp/issues/139 I think something is wrong with your SDL2 installation