-
Notifications
You must be signed in to change notification settings - Fork 127
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
Update README instructions for building on macOS #35
Comments
Hi, Interesting, can you paste the error(s) you get when compiling as instructed in the README? A couple of questions:
|
Answers
More about the answer to 1I tried both suggestions from the readme and neither worked. The following two options solve those two particular errors: However, if I only use those options (along with Some more contextXcode version: |
Can you run |
Yep I tried that before creating the issue and it didn’t seem to do anything. Exact same situation. |
Hmm well, the issue seems to be that cmake can't identify the C/C++ compiler, which seems unrelated to Jackalope itself, but I have no idea what the reason could be. This stack overflow thread has some other suggestions https://stackoverflow.com/questions/33998853/the-cxx-compiler-identification-is-unknown-xcode |
Yeah I found that thread, I tried all of the suggestions. I think it is something about the Jackalope cmake configuration that my cmake installation doesn't like because other cmake projects work fine. Adding those flags I presented in the original issue completely solves the issue for me, so my suggestion is just that they could be added to the readme as a last resort that people can try when building on macOS (unless someone can find out the root cause of course, but given that it's only affecting me at the moment that would probably be unnecessary). Or if zero other macOS users with Xcode 14 and macOS Monterey are getting this issue, maybe this issue can just be closed. My main motivation for opening this issue was just to help other people not spend so long if they run into the same weird situation. |
Indeed, and thanks for raising the issue. Let's leave it open for now, as anyone encountering the same issue can find it more easily. If anyone else encounters the same issue, please let us know here. |
Ok sounds good, thanks for the quick responses! |
Update: I encountered this issue after upgrading to Ventura. It got resolved after updating cmake. |
You might also want to add a Run the following commands:
|
Hmm wait, that was not the intended way to build. How does your directory structure looks like? The idea was to run all of these commands starting from the Jackalope directory, which would then place TinyInst as a subdirectory of Jackalope. TinyInst should then build without the need to explicitly cd into it because of https://github.com/googleprojectzero/Jackalope/blob/main/CMakeLists.txt#L31 Perhaps instead, we should add |
Yes, as I discovered later I was supposed to clone Is there a possibility of adding Also I agree on adding the |
The problem with submodules is that (AFAIK) a submodule ends up linking to a specific commit. I always want to use the latest TinyInst and I don't want to have to update Jackalope every time I update TinyInst. |
The build commands in the README required some tweaking for me to build the project on macOS. It might just be my machine, but if this is a recurring issue here are the commands that worked for me (with the latest Xcode 14.0 beta installed). It might be worthwhile adding this to the README (I'm happy to PR if other mac users can reproduce the same issues).
Issues this fixed
Without
CMAKE_C_COMPILER
andCMAKE_CXX_COMPILER
set to those values, I get the error briefly mentioned in the README. Without theCMAKE_CXX_FLAGS
that set the standard to c++17 I run into a lot of syntax errors (it seems to compile with something from before c++11 by default). It should be noted that theCMAKE_CXX_STANDARD
option didn't seem to change anything at all so I had to useCMAKE_CXX_FLAGS
instead.I hardly ever touch cpp, so there might be something weird about those commands, but at least they work. Feel free to suggest changes.
The text was updated successfully, but these errors were encountered: