A few issues related to Linux builds

Issue #5 resolved
NY00123 created an issue

This is a summary of potential issues, including an actual bug:

  1. commonemuframework/Makefile.linux is missing an essential endif for the gitref check. Without a fix, it’s impossible to begin building an exe (see below for a diff).
  2. Is using SDL 1.2, which appears to be the default if you don’t pass ‘SDL2’ to ‘make’, still supported? Because commonemuframework/basicio/fopen64.c has a call to SDL_RWsize, which isn’t present in 1.2. SDL 2.0 builds seem to work, though.
  3. I might just not know enough, but is commonemuframework-sdl2 still useful? I seemed to successfully make a working SDL2 build without it.
  4. Assuming the main git repository is located somewhere at /my/path/unipcemu-git, I’ve noticed that the objects are built under /my/path/projects_build. I don’t know if it’s simply related to working on support for other platforms for most; It has just been quite unexpected for me to find the output object and exe files being stored anywhere outside of the git repository as a default (or /tmp, as possibly used by differing programs, like the compiler).

Thanks in advance!

P.S. Fix for commonemuframework/Makefile.linux:

diff --git a/Makefile.linux b/Makefile.linux
index 56cad66..fcd9b47 100644
--- a/Makefile.linux
+++ b/Makefile.linux
@@ -154,6 +154,7 @@ gitref := $(word 2, $(shell cat $(subdep)))
 ifneq "$(gitref)" ""
 # e.g. HEAD & refs/heads/master 
 subdep += $(subdir)/.git/$(gitref)
+endif

 #Rules themselves!
 #Build,debug and analyze(profile subcommand) command support!

Comments (3)

  1. superfury repo owner

    I’ve just added your fix for Makefile.linux. You were right on that(I didn’t see it happen when compiling for Windows using it’s makefile(MinGW/MSys2 toolchain) because there was an invalid endif at the end of the Makefile.win (just before the gitcommitversion.h creation)). The same issue also applied to all platform-specific Makefiles(all but the PSP one, which doesn’t use git commit versions)). Even though I’m using the Windows Makefile as a basic checkpoint for the MinGW-like compilers(including Linux(Tested myself using Ubuntu in a virtual machine)), I didn’t notice that one(mainly because the invalid endif at the other location in the Windows Makefile was hiding it).

    Thanks for that one!

    I’ve also implemented a fix for the SDL_RWsize(using the same method as the PSP). That should make it buildable again.

    About points 3 and 4:

    3. It was included for supporting the Bitbucket pipelines method(where I needed the SDL2 library to make it compile), although it’s currently set to manual build due to burning it’s bandwidth like crazy.

    4. The seperated source(= the repositories themselves) and build directories are mainly my way of trying to seperating the various projects I’m making while keeping their build files (my disk images etc., various test files, PSP emulators(JPCSP)) in a relatively close but seperated directory, so that if I do have to fully reset the repository(when I want to clean it up) I won’t actually lose all my files when doing so.

  2. superfury repo owner

    Since I'm not hearing anything anymore, I'm assuming the issue has been resolved.

    Feel free to open it up again if any of the issues still persist.

  3. Log in to comment