N64Recomp / N64Recomp

Tool to statically recompile N64 games into native executables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error involving rabbitizer

mattthemich opened this issue · comments

When building N64 recomp with the latest available version including the default versions of it's dependencies, I get the following error:

~/N64Recomp/build$ cmake --build .
[ 79%] Built target rabbitizer
[ 85%] Built target fmt
[ 87%] Building CXX object CMakeFiles/N64Recomp.dir/src/recompilation.cpp.o
/home/user/N64Recomp/src/recompilation.cpp: In function ‘bool process_instruction(const RecompPort::Context&, const RecompPort::Config&, const RecompPort::Function&, const RecompPort::FunctionStats&, const std::unordered_set&, size_t, const std::vectorrabbitizer::InstructionCpu&, std::ofstream&, bool, bool, int, size_t, bool&, bool&, std::span<std::vector >)’:
/home/user/N64Recomp/src/recompilation.cpp:831:19: error: ‘cpu_c_deq_d’ is not a member of ‘InstrId’ {aka ‘rabbitizer::InstrId::UniqueId’}; did you mean ‘cpu_c_eq_d’?
831 | case InstrId::cpu_c_deq_d: // TODO rename to c_seq_d when fixed in rabbitizer
| ^~~~~~~~~~~
| cpu_c_eq_d
gmake[2]: *** [CMakeFiles/N64Recomp.dir/build.make:118: CMakeFiles/N64Recomp.dir/src/recompilation.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:149: CMakeFiles/N64Recomp.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

Is there any way to fix this line such that the program compiles properly?

This shouldn't happen since the repo has rabbitizer as a submodule to a commit known to be usable for building N64Recomp.

How did you clone this repository? Please specify the exact steps you followed.

Your comment helped me figure out the problem, thank you!

I originally went into N64Recomp/lib, noticed there were folders for the dependencies (including rabbitizer), and ran "git clone https://github.com/Decompollaborate/rabbitizer.git" in the lib directory, along with similar git clones for the other libraries. Then, I went into N64Recomp/build, and ran "cmake .." and "cmake --build .".

I didn't realize I actually had to just add the "--recurse-submodules" flag to my original git clone for N64Recomp as a whole, instead of manually cloning each individual dependency. Doing that fixed my problem.