Closed danboid closed 4 years ago
Looks like the compiler doesn't define PRIXPTR
. This is a problem with the compiler, but it can be worked around.
I have submitted a PR to add PRIXPTR to serenity's LibC.
However, the problem now is that mman.h is just a stub under Serenity and so MS_SYNC is undefined:
[ 69%] Building C object CMakeFiles/mgba.dir/src/util/vfs/vfs-fd.c.o
/home/local/ISDADS/sgs548/src/serenity/Ports/mgba/mgba-0.8-b1/src/util/vfs/vfs-fd.c: In function '_vfdSync':
/home/local/ISDADS/sgs548/src/serenity/Ports/mgba/mgba-0.8-b1/src/util/vfs/vfs-fd.c:172:2: warning: implicit declaration of function 'futimes'; did you mean 'ctime'? [-Wimplicit-function-declaration]
futimes(vfd->fd, NULL);
^~~~~~~
ctime
/home/local/ISDADS/sgs548/src/serenity/Ports/mgba/mgba-0.8-b1/src/util/vfs/vfs-fd.c:175:10: warning: implicit declaration of function 'msync'; did you mean 'sync'? [-Wimplicit-function-declaration]
return msync(buffer, size, MS_SYNC) == 0;
^~~~~
sync
/home/local/ISDADS/sgs548/src/serenity/Ports/mgba/mgba-0.8-b1/src/util/vfs/vfs-fd.c:175:30: error: 'MS_SYNC' undeclared (first use in this function)
return msync(buffer, size, MS_SYNC) == 0;
^~~~~~~
/home/local/ISDADS/sgs548/src/serenity/Ports/mgba/mgba-0.8-b1/src/util/vfs/vfs-fd.c:175:30: note: each undeclared identifier is reported only once for each function it appears in
CMakeFiles/mgba.dir/build.make:2318: recipe for target 'CMakeFiles/mgba.dir/src/util/vfs/vfs-fd.c.o' failed
make[2]: *** [CMakeFiles/mgba.dir/src/util/vfs/vfs-fd.c.o] Error 1
CMakeFiles/Makefile2:69: recipe for target 'CMakeFiles/mgba.dir/all' failed
make[1]: *** [CMakeFiles/mgba.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
Here is the replacement issue and an updated mgba serenity ports script:
mgba seems to be quite portable so I tried to build 0.8b1 for Serenity ( https://github.com/SerenityOS/serenity ) but, after disabling opengl and dynlibs, I've only been able to get this far:
Any suggestions?