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

'common-sdl.h' file not found — MacOS Sonoma #1336

Closed
joshfarrant opened this issue Sep 30, 2023 · 4 comments · Fixed by #1400
Closed

'common-sdl.h' file not found — MacOS Sonoma #1336

joshfarrant opened this issue Sep 30, 2023 · 4 comments · Fixed by #1400
Labels
question Further information is requested

Comments

@joshfarrant
Copy link

When trying to make any of the examples requiring common-sdl.h I run into

command.cpp:9:10: fatal error: 'common-sdl.h' file not found

I've installed sdl2 using brew, and I've even tried building from source, but no joy.

Any suggestions appreciated, thanks

@DissonanceTK
Copy link

DissonanceTK commented Oct 5, 2023

Same issue - MacOS Sonoma. Macbook Air M1.
make stream
c++ stream.cpp -o stream
stream.cpp:5:10: fatal error: 'common-sdl.h' file not found
#include "common-sdl.h"
^~~~~~~~~~~~~~
1 error generated.
make: *** [stream] Error 1

@bobqianic bobqianic added the bug Something isn't working label Oct 10, 2023
@ai-at-home
Copy link
Contributor

It seems likely that this error comes from not compiling in the root directory. I am on Linux however if you attempt to compile from within the directory this is the error you get:

whisper.cpp/examples/stream$ make stream
g++     stream.cpp   -o stream
stream.cpp:6:10: fatal error: common/sdl.h: No such file or directory
    6 | #include "common/sdl.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: stream] Error 1

The solution is simply to cd ../../ to go to the root dir then compile.

As such I don't think its a bug so much as perhaps a clarification needed in the docs.

@bobqianic bobqianic added question Further information is requested and removed bug Something isn't working labels Oct 29, 2023
@bobqianic bobqianic linked a pull request Oct 29, 2023 that will close this issue
@joyyang1215
Copy link

"The solution is simply to cd ../../ to go to the root dir then compile." --- it works

@gabriel-Oak
Copy link

Wich command should I run from the root directory to compile? I've never worked with cmake before, I'm trying to run make command, make command -C examples/command, but it isn't working.

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

Successfully merging a pull request may close this issue.

6 participants