rtissera / libchdr

Standalone library for reading MAME's CHDv1-v5 formats.
BSD 3-Clause "New" or "Revised" License
98 stars 42 forks source link

fix some (U)INT types stuff #125

Closed irixxxx closed 4 months ago

irixxxx commented 4 months ago

While compiling some of the targets for picodrive I ran into compile problems with various of the toolchains wrt to handling of (U)INT types multiply defined in 7ztypes and coretypes. As the structure is at the moment I just had no other idea than to replace that by macros, although I don't believe this is ideal. Shouldn't the core libchdr just use the stdint types instead?

rtissera commented 4 months ago

Hello thanks for the PR I am not 100% sure how this will play with LZMA sdk and libretro stuff. Let’s try once CI validates your changes. Looking forward for picodrive 2.00 release btw

irixxxx commented 4 months ago

Release is coming RSN, I think. Once I started alpha/beta I got a lot of bug reports, some of them really took a lot of time to fix. Just count the commits since alpha1 ;-). There's one last (Sunset riders intro not correct in Europe version) I need to deal with, then I'm hopefully through.

rtissera commented 4 months ago

Merged, thanks.

Might have to adjust in the forthcoming weeks with some #if LIBRETRO stuff as libretro forked cores badly need a libchdr update.

irixxxx commented 4 months ago

Apropos libretro, I get this from the lr-picodrive buildbot run for the libretro-build-libnx-aarch64 job:

aarch64-none-elf-gcc -c -opico/cd/libchdr/deps/zstd-1.5.6/lib/decompress/huf_decompress.o pico/cd/libchdr/deps/zstd-1.5.6/lib/decompress/huf_decompress.c -Ipico/cd/libchdr/deps/lzma-24.05/include -Ipico/cd/libchdr/include  -I/builds/libretro/picodrive -I platform/libretro/libretro-common/include -I platform/libretro/libretro-common/include/compat -I platform/libretro/libretro-common/include/encodings -I platform/libretro/libretro-common/include/formats -I platform/libretro/libretro-common/include/streams -I platform/libretro/libretro-common/include/string -I platform/libretro/libretro-common/include/vfs -DREVISION=\"-dab9c6e\" -O3 -fomit-frame-pointer -ffast-math -I/opt/devkitpro/libnx/include/ -fPIE -Wl,--allow-multiple-definition -specs=/opt/devkitpro/libnx/switch.specs -D__SWITCH__ -DHAVE_LIBNX -DARM -D__aarch64__=1 -march=armv8-a -mtune=cortex-a57 -mtp=soft -ffast-math -mcpu=cortex-a57+crc+fp+simd -ffunction-sections -Ifrontend/switch -ftree-vectorize -D__LIBRETRO__ -DUSE_LIBRETRO_VFS  -O3 -DNDEBUG -I/builds/libretro/picodrive -falign-functions=2 -DREVISION=\"-dab9c6e\" -DUSE_LIBCHDR -Izlib -DEMU_F68K -D_USE_CZ80 -Ipico/cd/libchdr/deps/zstd-1.5.6/lib -Wno-unused
huf_decompress_amd64.S
pico/cd/libchdr/deps/zstd-1.5.6/lib/decompress/huf_decompress_amd64.S:12: fatal error: opening dependency file /pico/cd/libchdr/deps/zstd-1.5.6/lib/decompress/huf_decompress_amd64.d: No such file or directory
   12 | 
      | 
compilation terminated.

Unrelated, but have you already seen this and ideally have a fix? BTW, the complete CI results are here

irixxxx commented 4 months ago

Moved this to an issue, since I'm confident it's totally unrelated.