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

Ubuntu build instructions? #20

Open
LinuxnoobR opened this issue May 12, 2024 · 8 comments
Open

Ubuntu build instructions? #20

LinuxnoobR opened this issue May 12, 2024 · 8 comments

Comments

@LinuxnoobR
Copy link

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

@Fondant
Copy link

Fondant commented May 12, 2024

  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

@LinuxnoobR
Copy link
Author

  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?

@Fondant
Copy link

Fondant commented May 12, 2024

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

@Mr-Wiseguy
Copy link
Collaborator

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

@CHJ85
Copy link

CHJ85 commented May 12, 2024

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

@Papyrusty
Copy link

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?

@abuchachos
Copy link

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

@michaelachrisco
Copy link

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

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

No branches or pull requests

7 participants