ITotalJustice / notorious_beeg

gba emulator written in c++23
https://notorious-beeg.netlify.app/
GNU General Public License v3.0
41 stars 4 forks source link

Issues when Compiling on Linux VM #112

Closed MonfGeiger closed 1 year ago

MonfGeiger commented 1 year ago

I got bored and figured i'd try and compile this emulator form source, but im running into a problem. no matter what preset i use, i run into this red error sw4ve6d5r

I don't know what im missing at this point, a devkitpro downloaded library/dev package thingy, something non-devkitpro, gerbils....kerbels? Mind helping me with this please, at this point im trying to accomplish this out of nothing but pure spite in the face of all these failures of mine

MonfGeiger commented 1 year ago

CMakeError.log CMakeOutput.log error logs from the attempt

ITotalJustice commented 1 year ago

I got bored and figured i'd try and compile this emulator form source, but im running into a problem. no matter what preset i use, i run into this red error sw4ve6d5r

I don't know what im missing at this point, a devkitpro downloaded library/dev package thingy, something non-devkitpro, gerbils....kerbels? Mind helping me with this please, at this point im trying to accomplish this out of nothing but pure spite in the face of all these failures of mine

Hi. You mention devkitpro, are you trying to build for the switch?

MonfGeiger commented 1 year ago

uh, not exactly, but if there's some library or whatever that this project uses to compile this emulator with whatever compiler related to this project, or something else, i don't know what im missing. i also do have a devkitpro related question that pertains to one of your earlier projects, but if you don't want to talk about that, its cool and i wont bring it up again

ITotalJustice commented 1 year ago

The compile error is because you're missing sdl2. Iirc in Ubuntu you can do "sudo apt-get install libsdl2"

Also note that you need a fairly up to date compiler, like clang15 or gcc12. Not sure what Ubuntu ships with these days.

Any reason you want to get the emulator to build btw? If it's just to use it then it's probably not worth your time trying to get it up and running, there are better emulators to use that don't require building from source 😄


Ask for the devkitpro related question, you can ask it here

ITotalJustice commented 1 year ago

What was the command you ran to build the emulator btw?

MonfGeiger commented 1 year ago

well, i got those clang and gcc compilers, wanted to say that first. alright, command wise, first i ran cmake --preset sdl2 to get the stuff for this specific preset, then i ran cmake --build --preset sdl2 to actually build it and.....ok the red error thing isnt showing up now, but instead this happens: terminal log.txt

Also for the devkitpro question: im trying to build your old gamecard nx installer switch homebrew, i have basically EVERY devkitpro related package installed, reinstalled them even just to be sure, i got an entire bevy of dependencies and whatnot, i even tried deleting the old installed libnx by opening a sudo nautilus session & navigating to opt/devkitpro/ and shift + del the libnx folder, then git cloning the switchbrew libnx repository and sudo make install it (which works btw) for the hell of it, and even after that, any attempt at building that old homebrew fails every time. so idk what environment you used back then, what dependencies you had, whatever forks you use in place of what's default to build your stuff back then, but idk what im missing there

ITotalJustice commented 1 year ago

Yeah the issue with building the emulator is the compiler version is too old. That's gcc 11. It needs gcc 12 at least.


For the gamecard installer, that's not going to be possible to build sadly. There's a few breaking changes made to libnx since then and a few issues with my code that newer compilers don't like (I didn't know how to code back then lol). If you're trying to compile it to get it working on latest fw, I would suggest just using tinfoil or dbi instead as both offer gamecard installing 😄

ITotalJustice commented 1 year ago

If you really want to install gcc 12, here's how I did it on Ubuntu (I would only recommend doing this on a vm you don't care about, not your main pc) https://github.com/ITotalJustice/notorious_beeg/blob/b3da0265c1be0faa9bc95324f3af54acc0f12740/.github/workflows/build_pc.yml#L21