libretro / libretro-cap32

caprice32 4.2.0 libretro
21 stars 34 forks source link

Submodule: Server does not allow request for unadvertised object #116

Closed s1eve-mcdichae1 closed 1 year ago

s1eve-mcdichae1 commented 2 years ago

RetroPie on Raspberry Pi 4B (arm Linux/Debian 10) Using git 2.20.1

We get this error on building from source. cmitu says it's triggered by the use of --shallow-submodules and does not occur in a later git version (but I don't think that version is available on my system: "git is already the newest version (1:2.20.1-2+deb10u3).")

pi@retropie:~/temp $ sudo apt install git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
git is already the newest version (1:2.20.1-2+deb10u3).
0 upgraded, 0 newly installed, 0 to remove and 78 not upgraded.
pi@retropie:~/temp $ git --version
git version 2.20.1
pi@retropie:~/temp $ git clone  --recursive --depth 1 --shallow-submodules --branch master "https://github.com/libretro/libretro-cap32.git"
Cloning into 'libretro-cap32'...
remote: Enumerating objects: 440, done.
remote: Counting objects: 100% (440/440), done.
remote: Compressing objects: 100% (402/402), done.
remote: Total 440 (delta 90), reused 238 (delta 24), pack-reused 0
Receiving objects: 100% (440/440), 1.19 MiB | 245.00 KiB/s, done.Resolving deltas: 100% (90/90), done.
Submodule 'cmocka' (https://git.cryptomilk.org/projects/cmocka.git) registered for path 'cmocka'
Cloning into '/home/pi/temp/libretro-cap32/cmocka'...
remote: Enumerating objects: 135, done.        
remote: Counting objects: 100% (135/135), done.        
remote: Compressing objects: 100% (132/132), done.        
remote: Total 135 (delta 23), reused 6 (delta 0), pack-reused 0        
Receiving objects: 100% (135/135), 114.98 KiB | 214.00 KiB/s, done.
Resolving deltas: 100% (23/23), done.
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
error: Server does not allow request for unadvertised object 6066c5ccde99304e4850caa96137869a6bc57b72
Fetched in submodule path 'cmocka', but it did not contain 6066c5ccde99304e4850caa96137869a6bc57b72. Direct fetching of that commit failed.
Tony763 commented 2 years ago

Hi the same occurs to me when running Basic install trough RetroPie-Setup.

DSkywalk commented 2 years ago

Thanks for your reports @Tony763 @s1eve-mcdichae1 :+1:

Please test after 193ade5924a3d6d210484945b173f355c4f15dd4

Tony763 commented 2 years ago

Confirming, fix works. Repository successfully cloned and build. Big thank You.

BTW. .gitmodules now miss a newline at a end of file. Just cosmetic. ;)

s1eve-mcdichae1 commented 2 years ago

Confirmed, works for me too both with manual git clone ... and with retropie_packages.sh lr-caprice32 sources.

cmitu commented 1 year ago

@DSkywalk this issue has resurfaced again - since upstream cmocka/stable-1.1 branch looks to be a rolling release and the HEAD commit changes between the one registered in the submodule (in your repo) and the upstream.

Would you be willing to pin the submodule version to a 'frozen' upstream branch, like cmocka-1.1.7 ? Note that recent git versions still work when doing a recursive clone from your repo, but older ones (I think before v2.25) still can't clone correctly the repository.

DSkywalk commented 1 year ago

@cmitu @joolswills @s1eve-mcdichae1 Hello again :)

Today I have done some tests and I have created a test branch removing the shallow, it works correctly for me. Also now it points to a specific commit of the version we are using.

Can you confirm me that it doesn't give more problems?

git clone  --recursive --depth 1 --branch "cmocka-module"  "https://github.com/libretro/libretro-cap32.git"

Build tests completed correctly:

$ make unit-test
cc -c -o ./unit-tests/cmocka.o ./cmocka/src/cmocka.c -O3 -DGIT_VERSION=\"" 77bfe3c"\" -fPIC -D__LIBRETRO__  -DINLINE="inline" -DHAVE_CONFIG_H -Wall -I./cmocka/include  -I. -I./cap32 -I./libretro -I./libretro/microui -I./libretro-common/include
libretro/libretro-core.o
cap32/cap32.o
cap32/slots.o
cap32/crtc.o
cap32/fdc.o
cap32/psg.o
cap32/tape.o
cap32/cart.o
cap32/asic.o
cap32/z80.o
cap32/kbdauto.o
cap32/lightgun/gunstick.o
cap32/lightgun/phaser.o
libretro/microui/microui.o
libretro/db/database.o
libretro/dsk/loader.o
libretro/dsk/format.o
libretro/dsk/amsdos_catalog.o
libretro/gfx/software.o
libretro/gfx/video.o
libretro/gfx/video16bpp.o
libretro/gfx/video24bpp.o
libretro/assets/ui_keyboard_bg.o
libretro/assets/ui_keyboard_en.o
libretro/assets/ui_keyboard_es.o
libretro/assets/ui_keyboard_fr.o
libretro/assets/font.o
libretro/retro_strings.o
libretro/retro_utils.o
libretro/retro_disk_control.o
libretro/retro_events.o
libretro/retro_snd.o
libretro/retro_render.o
libretro/retro_ui.o
libretro/retro_gun.o
libretro/retro_keyboard.o
libretro-common/file/file_path.o
libretro-common/string/stdstring.o
libretro-common/compat/compat_strl.o
libretro-common/encodings/encoding_utf.o
libretro-common/time/rtime.o
libretro-common/memmap/memalign.o
./unit-tests/autorun
[==========] Running 5 test(s).
[ RUN      ] basic_tests_success
...

Thanks!

cmitu commented 1 year ago

@DSkywalk hi, thank you for the update. The (recursive) clone works now, even with an older git, so I think it's solved.

NB: for some reason the .gitmodule contains a reference to the master branch for cmocka, even though the submodule commit ref points to the 1.1.5 release tag. But git submodule status seems to be happy.

Thank you.

DSkywalk commented 1 year ago

merged into master, thanks for the notice me again and the help :)