Closed crocket closed 6 years ago
Did you have any luck with the 9999 build? Also, how did you manage those issues #89?
On the other hand, this issue is still not fixed.
When I try to build -9999, I get the following errors.
Core/gb.c: In function ‘GB_is_inited’:
Core/gb.c:430:25: error: multi-character character constant [-Werror=multichar]
return gb->magic == 'SAME';
^~~~~~
Core/gb.c: In function ‘GB_reset’:
Core/gb.c:502:28: error: multi-character character constant [-Werror=multichar]
gb->magic = (uintptr_t)'SAME';
^~~~~~
Core/debugger.c: In function ‘read_lvalue’:
Core/debugger.c:236:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
x86_64-pc-linux-gnu-gcc -pipe -Werror -Wall -std=gnu11 -D_GNU_SOURCE -DVERSION="0.10.1" -I. -D_USE_MATH_DEFINES -Wno-deprecated-declarations -g -DGB_INTERNAL -c Core/printer.c -o build/obj/Core/printer.c.o
x86_64-pc-linux-gnu-gcc -pipe -Werror -Wall -std=gnu11 -D_GNU_SOURCE -DVERSION="0.10.1" -I. -D_USE_MATH_DEFINES -Wno-deprecated-declarations -g -DGB_INTERNAL -c Core/rewind.c -o build/obj/Core/rewind.c.o
x86_64-pc-linux-gnu-gcc -pipe -Werror -Wall -std=gnu11 -D_GNU_SOURCE -DVERSION="0.10.1" -I. -D_USE_MATH_DEFINES -Wno-deprecated-declarations -g -DGB_INTERNAL -c Core/save_state.c -o build/obj/Core/save_state.c.o
cc1: all warnings being treated as errors
make: *** [Makefile:137: build/obj/Core/gb.c.o] Error 1
make: *** Waiting for unfinished jobs....
cc1: all warnings being treated as errors
make: *** [Makefile:137: build/obj/Core/debugger.c.o] Error 1
* ERROR: games-emulation/sameboy-libretro-9999-r2::abendbrot failed (compile phase):
* emake failed
According to dev manuals we should disable -Werrors either way, so let's go with that. Does this work?
Which dev manuals are you talking about?
sameboy-libretro/sameboy-libretro-1.0_pre20170704 could be built before submitting this issue and can be built now. When I built other versions, I saw a new error message.
games-emulation/sameboy-libretro-1.0_pre20171024
cd BootROMs && rgbasm -o ../build/bin/BootROMs/dmg_boot.bin.tmp ../BootROMs/dmg_boot.asm
/bin/sh: rgbasm: command not found
make: *** [Makefile:276: build/bin/BootROMs/dmg_boot.bin] Error 127
make: *** Waiting for unfinished jobs....
Core/z80_cpu.c: In function ‘add_hl_rr’:
Core/z80_cpu.c:181:31: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses]
if ( ((unsigned long) hl) + ((unsigned long) rr) & 0x10000) {
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
* ERROR: games-emulation/sameboy-libretro-1.0_pre20171024::abendbrot failed (compile phase):
* emake failed
games-emulation/sameboy-libretro-9999-r2
cd BootROMs && rgbasm -o ../build/bin/BootROMs/dmg_boot.bin.tmp ../BootROMs/dmg_boot.asm
/bin/sh: rgbasm: command not found
cd BootROMs && rgbasm -o ../build/bin/BootROMs/cgb_boot.bin.tmp ../BootROMs/cgb_boot.asm
make: *** [Makefile:287: build/bin/BootROMs/dmg_boot.bin] Error 127
make: *** Waiting for unfinished jobs....
/bin/sh: rgbasm: command not found
make: *** [Makefile:287: build/bin/BootROMs/cgb_boot.bin] Error 127
* ERROR: games-emulation/sameboy-libretro-9999-r2::abendbrot failed (compile phase):
* emake failed
It seems rgbasm is a new build-time dependency. I think dev-lang/rgbds contains rgbasm.
Looks good, I will import that ebuild from @maggu2810's overlay and update it later today.
Which dev manuals are you talking about?
This one: https://devmanual.gentoo.org/ebuild-writing/common-mistakes/index.html
Thanks for taking the time to test this.
I read your commit.
sameboy-libretro-1.0_pre20171024.ebuild
depends on dev-lang/rgbds/
.
Is this a correct dependency? I think dev-lang/rgbds
is the correct one.
Yes I already corrected it, it was a copy&paste oversight.
games-emulation/sameboy-libretro-1.0_pre20171024 has an issue with Makefile. I think games-emulation/sameboy-libretro-1.0_pre20171024
compiles a broken commit.
cp -f LICENSE build/bin/SDL/LICENSE
cp: cannot create regular file 'build/bin/SDL/LICENSE': No such file or directory
make: *** [Makefile:265: build/bin/SDL/LICENSE] Error 1
make: *** Waiting for unfinished jobs....
* ERROR: games-emulation/sameboy-libretro-1.0_pre20171024::abendbrot failed (compile phase):
* emake failed
games-emulation/sameboy-libretro-9999-r2 doesn't generate or find sameboy_libretro.so
file.
* ERROR: games-emulation/sameboy-libretro-9999-r2::abendbrot failed (install phase):
* Libretro core shared library "/var/tmp/portage/games-emulation/sameboy-libretro-9999-r2/image//usr/lib64/libretro/sameboy_libretro.so" not installed.
*
* Call stack:
* ebuild.sh, line 124: Called src_install
* environment, line 2884: Called libretro-core_src_install
* environment, line 2072: Called die
* The specific snippet of code:
* [[ -f "${lib_file_target}" ]] || die "Libretro core shared library \"${lib_file_target}\" not installed.";
Alright, scratch all this. We use the wrong makefile since october 2017. I'm gonna switch to the correct one now.
games-emulation/sameboy-libretro-1.0_pre20171024 fails at install phase
* ERROR: games-emulation/sameboy-libretro-1.0_pre20171024::abendbrot failed (install phase):
* Libretro core shared library "/var/tmp/portage/games-emulation/sameboy-libretro-1.0_pre20171024/image//usr/lib64/libretro/sameboy_libretro.so" not installed.
*
* Call stack:
* ebuild.sh, line 124: Called src_install
* environment, line 2292: Called libretro-core_src_install
* environment, line 1484: Called die
* The specific snippet of code:
* [[ -f "${lib_file_target}" ]] || die "Libretro core shared library \"${lib_file_target}\" not installed.";
games-emulation/sameboy-libretro-9999-r2 fails in Makefile. Probably, a broken commit. I don't know.
make: *** No rule to make target '../build/obj/../libretro/agb_boot_libretro.c.o', needed by '../build/bin/sameboy_libretro.so'. Stop.
make: *** Waiting for unfinished jobs....
x86_64-pc-linux-gnu-gcc -c -o ../build/obj/../Core/save_state_libretro.c.o ../Core/save_state.c -pipe -DGIT_VERSION=\"" 772c2be"\" -DSAMEBOY_CORE_VERSION=\"\" -O2 -DNDEBUG -DDISABLE_DEBUGGER -DDISABLE_TIMEKEEPING -Wall -D__LIBRETRO__ -fPIC -I.. -std=gnu11 -D_GNU_SOURCE -D_USE_MATH_DEFINES -fPIC -DGB_INTERNAL
../Core/z80_cpu.c: In function ‘add_hl_rr’:
../Core/z80_cpu.c:181:31: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses]
if ( ((unsigned long) hl) + ((unsigned long) rr) & 0x10000) {
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
* ERROR: games-emulation/sameboy-libretro-9999-r2::abendbrot failed (compile phase):
* emake failed
This should take care of 20171024 for now.
games-emulation/sameboy-libretro-1.0_pre20171024 builds now, but games-emulation/sameboy-libretro-9999-r2 fails differently now.
make: *** No rule to make target '../build/obj/../libretro/agb_boot_libretro.c.o', needed by '../build/bin/sameboy_libretro.so'. Stop.
make: *** Waiting for unfinished jobs....
x86_64-pc-linux-gnu-gcc -c -o ../build/obj/../Core/joypad_libretro.c.o ../Core/joypad.c -pipe -DGIT_VERSION=\"" 772c2be"\" -DSAMEBOY_CORE_VERSION=\"\" -O2 -DNDEBUG -DDISABLE_DEBUGGER -DDISABLE_TIMEKEEPING -Wall -D__LIBRETRO__ -fPIC -I.. -std=gnu11 -D_GNU_SOURCE -D_USE_MATH_DEFINES -fPIC -DGB_INTERNAL
x86_64-pc-linux-gnu-gcc -c -o ../build/obj/../Core/save_state_libretro.c.o ../Core/save_state.c -pipe -DGIT_VERSION=\"" 772c2be"\" -DSAMEBOY_CORE_VERSION=\"\" -O2 -DNDEBUG -DDISABLE_DEBUGGER -DDISABLE_TIMEKEEPING -Wall -D__LIBRETRO__ -fPIC -I.. -std=gnu11 -D_GNU_SOURCE -D_USE_MATH_DEFINES -fPIC -DGB_INTERNAL
../Core/z80_cpu.c: In function ‘add_hl_rr’:
../Core/z80_cpu.c:181:31: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses]
if ( ((unsigned long) hl) + ((unsigned long) rr) & 0x10000) {
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
* ERROR: games-emulation/sameboy-libretro-9999-r2::abendbrot failed (compile phase):
* emake failed
The offending commit was https://github.com/libretro/SameBoy/commit/00c67f8842bd4def53cfc17e924adabbd2d37513#diff-e5a70676f68938c2bd5113cc5ed8df08L150 I'm not sure if this could be considered a bug or if libretro does something in their build scripts to account for this.
I tested games-emulation/sameboy-libretro-1.0_pre20171024
with a few games. It works.
games-emulation/sameboy-libretro-9999
git checkout --quiet refs/git-r3/HEAD
GIT update -->
repository: https://github.com/libretro/SameBoy.git
at the commit: 772c2bedde7c4d393f8c9e6ec5d1dbff3f8ce470
* ERROR: games-emulation/sameboy-libretro-9999-r2::abendbrot failed (prepare phase):
* eapply_user (or default) must be called in src_prepare()!
*
* Call stack:
* ebuild.sh, line 776: Called __ebuild_main 'prepare'
* phase-functions.sh, line 1053: Called __dyn_prepare
* phase-functions.sh, line 383: Called die
* The specific snippet of code:
* die "eapply_user (or default) must be called in src_prepare()!"
I just compiled games-emulation/sameboy-libretro-9999-r2. I ran a few gameboy games on sameboy core. They work. However, I was surprised by how bad games from the year 1991 look, compared to recent games.
Nice to hear, yes gameboy games aren't exactly stellar to look at. However, there are some excellent gameboy shaders that could help with that. Thanks for reporting these things.