Giter Site home page Giter Site logo

Comments (13)

ifratric avatar ifratric commented on July 25, 2024 1

Is there a possibility of adding TinyInst as a module to the repo so just one clone is needed?

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.

from jackalope.

ifratric avatar ifratric commented on July 25, 2024

Hi,

Interesting, can you paste the error(s) you get when compiling as instructed in the README?

A couple of questions:

  • did you use the -G Xcode flag as written in the README?
  • did you ever open XCode UI before trying to compile Jackalope? Note: XCode installs some tools on the first run / first run after update.
  • do you have multiple compiler toolchains installed?

from jackalope.

stackotter avatar stackotter commented on July 25, 2024

Answers

  1. With the instructions from the readme I get the following errors:
    cmake -G Xcode ..
    -- The C compiler identification is unknown
    -- The CXX compiler identification is unknown
    CMake Error at TinyInst/third_party/CMakeLists.txt:30 (project):
      No CMAKE_C_COMPILER could be found.
    
    CMake Error at TinyInst/third_party/CMakeLists.txt:30 (project):
      No CMAKE_CXX_COMPILER could be found.
    
    -- Configuring incomplete, errors occurred!
    See also "/Users/stackotter/*/Jackalope/build/CMakeFiles/CMakeOutput.log".
    See also "/Users/stackotter/*/Jackalope/build/CMakeFiles/CMakeError.log".
  2. Yes
  3. No

More about the answer to 1

I tried both suggestions from the readme and neither worked. The following two options solve those two particular errors: -D CMAKE_C_COMPILER="$(xcrun -find cc)" -D CMAKE_CXX_COMPILER="$(xcrun -find c++)".

However, if I only use those options (along with -G Xcode) I get lots of compilation errors later on when running cmake --build . --config Release. See the attached build log.

buildlog.txt

Some more context

Xcode version: Xcode 14.0 beta 1
CMake version: 3.23.2 (the latest version from homebrew)

from jackalope.

ifratric avatar ifratric commented on July 25, 2024

Can you run sudo xcode-select --reset and check if the problem persists?

from jackalope.

stackotter avatar stackotter commented on July 25, 2024

Yep I tried that before creating the issue and it didn’t seem to do anything. Exact same situation.

from jackalope.

ifratric avatar ifratric commented on July 25, 2024

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

from jackalope.

stackotter avatar stackotter commented on July 25, 2024

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.

from jackalope.

ifratric avatar ifratric commented on July 25, 2024

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.

from jackalope.

stackotter avatar stackotter commented on July 25, 2024

Ok sounds good, thanks for the quick responses!

from jackalope.

ifratric avatar ifratric commented on July 25, 2024

Update: I encountered this issue after upgrading to Ventura. It got resolved after updating cmake.

from jackalope.

fuomag9 avatar fuomag9 commented on July 25, 2024

You might also want to add a cd TinyInst in the below section of the guide, otherwise the commands will fail

Run the following commands:

git clone --recurse-submodules [email protected]:googleprojectzero/TinyInst.git
(alternately: git clone --recurse-submodules https://github.com/googleprojectzero/TinyInst.git)
mkdir build
cd build
cmake <generator arguments> ..
cmake --build . --config Release

from jackalope.

ifratric avatar ifratric commented on July 25, 2024

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 cd Jackelope on top to make it more clear?

from jackalope.

fuomag9 avatar fuomag9 commented on July 25, 2024

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 cd Jackelope on top to make it more clear?

Yes, as I discovered later I was supposed to clone TinyInst inside Jackelope (I was tired and the missing cd confused me)

Is there a possibility of adding TinyInst as a module to the repo so just one clone is needed?

Also I agree on adding the cd, I'd also add the git clone of Jackelope as well and remove the precedent step

from jackalope.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.