N64Recomp / N64Recomp

Tool to statically recompile N64 games into native executables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ubuntu build instructions?

LinuxnoobR opened this issue · comments

The build instructions are a bit hard to understand, sorry.

  1. clone the N64Recomp repo and move into the repo
  2. set up submodules using git clone --recurse-submodules or git submodule update --init --recursive
  3. make a build folder and run cmake .. (if the build folder is a child of the cloned repo, point to the root of the repo if not)
  4. cmake --build . from that build folder
  1. clone the N64Recomp repo and move into the repo

    1. set up submodules using git clone --recurse-submodules or git submodule update --init --recursive

    2. make a build folder and run cmake .. (if the build folder is a child of the cloned repo, point to the root of the repo if not)

    3. cmake --build . from that build folder

Ok thanks, how do I launch it?

to run the N64Recomp, you will need a .toml and an .elf of the game you want to get the code from or for the RSPRecomp you will need a (possibly uncompressed) z64 of a game (probably banjo-tooie not? un-compressed if you didnt edit the RSPRecomp code) if you want the RSP aspMain.cpp

Yeah, that's all correct. As mentioned in #17 I'll be setting up a minimal example soon which should help clear this up.

Building it on Ubuntu doesn't seem to be working due to libraries being incompatible with the python version or something stupid. I forget what it was. But I've been trying forever.
A possible workaround is to clone the repository to your account and use github actions to create an executable online.
The reason I'm saying it's a possible workaround is because I personally haven't tried it yet. I've been going through online compilers to see if any of them work, but neither of them have the required library dependencies.

EDIT! For reference, here's the error in question:

/home/chris/Downloads/N64Recomp-main/src/recompilation.cpp: In function ‘bool process_instruction(const RecompPort::Context&, const RecompPort::Config&, const RecompPort::Function&, const RecompPort::FunctionStats&, const std::unordered_set<unsigned int>&, size_t, const std::vector<rabbitizer::InstructionCpu>&, std::ofstream&, bool, bool, int, size_t, bool&, bool&, std::span<std::vector<unsigned int> >)’:
/home/chris/Downloads/N64Recomp-main/src/recompilation.cpp:795:19: error: ‘cpu_c_deq_d’ is not a member of ‘InstrId’ {aka ‘rabbitizer::InstrId::UniqueId’}; did you mean ‘cpu_c_eq_d’?
  795 |     case InstrId::cpu_c_deq_d: // TODO rename to c_seq_d when fixed in rabbitizer
      |                   ^~~~~~~~~~~
      |                   cpu_c_eq_d
make[2]: *** [CMakeFiles/N64Recomp.dir/build.make:118: CMakeFiles/N64Recomp.dir/src/recompilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:131: CMakeFiles/N64Recomp.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

bash: cmake: command not found
I keep getting this error message when i do the last step
I just copy pasted 'cmake --build .' and this happened
Do i need to put anything else like the location of the .z64 file?

bash: cmake: command not found
I keep getting this error message when i do the last step
I just copy pasted 'cmake --build .' and this happened
Do i need to put anything else like the location of the .z64 file?

You need to install cmake. Try

sudo apt install cmake

I was able to get the binaries created in Ubuntu:

git clone ....N64Recomp.git
cd N64Recomp/
git submodule update --init --recursive
mkdir build
cd build
cmake ..
$ cmake --build .
[  2%] Building CXX object CMakeFiles/rabbitizer.dir/lib/rabbitizer/cplusplus/src/analysis/LoPairingInfo.cpp.o
[  4%] Building CXX object CMakeFiles/rabbitizer.dir/lib/rabbitizer/cplusplus/src/analysis/RegistersTracker.cpp.o
[  6%] Building CXX object CMakeFiles/rabbitizer.dir/lib/rabbitizer/cplusplus/src/instructions/InstrId.cpp.o
[  8%] Building CXX object CMakeFiles/rabbitizer.dir/lib/rabbitizer/cplusplus/src/instructions/InstrIdType.cpp.o
[ 10%] Building CXX object CMakeFiles/rabbitizer.dir/lib/rabbitizer/cplusplus/src/instructions/InstructionBase.cpp.o
[ 12%] Building CXX object CMakeFiles/rabbitizer.dir/lib/rabbitizer/cplusplus/src/instructions/InstructionCpu.cpp.o
[ 14%] Building CXX object CMakeFiles/rabbitizer.dir/lib/rabbitizer/cplusplus/src/instructions/InstructionR3000GTE.cpp.o
[ 16%] Building CXX object CMakeFiles/rabbitizer.dir/lib/rabbitizer/cplusplus/src/instructions/InstructionR5900.cpp.o
[ 18%] Building CXX object CMakeFiles/rabbitizer.dir/lib/rabbitizer/cplusplus/src/instructions/InstructionRsp.cpp.o
[ 20%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/analysis/RabbitizerLoPairingInfo.c.o
[ 22%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/analysis/RabbitizerRegistersTracker.c.o
[ 25%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/analysis/RabbitizerTrackedRegisterState.c.o
[ 27%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/common/RabbitizerConfig.c.o
[ 29%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/common/RabbitizerVersion.c.o
[ 31%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/common/Utils.c.o
[ 33%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstrCategory.c.o
[ 35%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstrDescriptor.c.o
[ 37%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstrId.c.o
[ 39%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstrIdType.c.o
[ 41%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstrSuffix.c.o
[ 43%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstructionCpu/RabbitizerInstructionCpu_OperandType.c.o
[ 45%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstructionR3000GTE/RabbitizerInstructionR3000GTE.c.o
[ 47%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstructionR3000GTE/RabbitizerInstructionR3000GTE_OperandType.c.o
[ 50%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstructionR3000GTE/RabbitizerInstructionR3000GTE_ProcessUniqueId.c.o
[ 52%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstructionR5900/RabbitizerInstructionR5900.c.o
[ 54%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstructionR5900/RabbitizerInstructionR5900_OperandType.c.o
[ 56%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstructionR5900/RabbitizerInstructionR5900_ProcessUniqueId.c.o
[ 58%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstructionRsp/RabbitizerInstructionRsp.c.o
[ 60%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstructionRsp/RabbitizerInstructionRsp_OperandType.c.o
[ 62%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstructionRsp/RabbitizerInstructionRsp_ProcessUniqueId.c.o
[ 64%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstruction/RabbitizerInstruction.c.o
[ 66%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstruction/RabbitizerInstruction_Disassemble.c.o
[ 68%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstruction/RabbitizerInstruction_Examination.c.o
[ 70%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstruction/RabbitizerInstruction_Operand.c.o
[ 72%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerInstruction/RabbitizerInstruction_ProcessUniqueId.c.o
[ 75%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerRegister.c.o
[ 77%] Building C object CMakeFiles/rabbitizer.dir/lib/rabbitizer/src/instructions/RabbitizerRegisterDescriptor.c.o
[ 79%] Linking CXX static library librabbitizer.a
[ 79%] Built target rabbitizer
[ 81%] Building CXX object lib/fmt/CMakeFiles/fmt.dir/src/format.cc.o
[ 83%] Building CXX object lib/fmt/CMakeFiles/fmt.dir/src/os.cc.o
[ 85%] Linking CXX static library libfmt.a
[ 85%] Built target fmt
[ 87%] Building CXX object CMakeFiles/N64Recomp.dir/src/analysis.cpp.o
[ 89%] Building CXX object CMakeFiles/N64Recomp.dir/src/config.cpp.o
[ 91%] Building CXX object CMakeFiles/N64Recomp.dir/src/main.cpp.o
[ 93%] Building CXX object CMakeFiles/N64Recomp.dir/src/recompilation.cpp.o
[ 95%] Linking CXX executable N64Recomp
[ 95%] Built target N64Recomp
[ 97%] Building CXX object CMakeFiles/RSPRecomp.dir/RSPRecomp/src/rsp_recomp.cpp.o
[100%] Linking CXX executable RSPRecomp
[100%] Built target RSPRecomp