Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Wii] Having trouble compiling VICE Libretro and how to put the required library files correctly? #511

Open
saulfabregwiivc opened this issue Feb 20, 2024 · 5 comments

Comments

@saulfabregwiivc
Copy link

saulfabregwiivc commented Feb 20, 2024

Coming from #373

Can please anyone tell me how i can install the required libraries used by this Libretro port of VICE so i can compile it properly?

There are too many libraries used by this port and i just can't figure out how i can put the required libraries files into the correct paths required by the files (e.g. on #include "arch/shared/archdep_access.c" in retrodep/archdep.c, but that file doesn't exist in that exact path but in another path)

Btw, i'm compiling in Windows, but i'm trying to compile a core for the Wii.

Thanks.

@sonninnos
Copy link
Collaborator

I don't understand what you mean. There are no extra libraries, and everything is included in the repo.

@saulfabregwiivc
Copy link
Author

I get this error when compiling the resulting dol file:

/opt/devkitpro/devkitPPC/bin/powerpc-eabi-g++ -oretroarch_wii.elf -DHW_RVL -mrvl -DGEKKO -mcpu=750 -meabi -mhard-float -Wl,-Map,retroarch_wii.elf.map,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,strdup,-wrap,strndup,-wrap,malloc_usable_size -T bootstrap/gx/rvl.ld -Lwii/libogc/libs/wii -L. griffin/griffin.o  wii/app_booter/app_booter.binobj   -lretro_wii  -lwiiuse -lbte -logc
.\libretro_wii.a(libretro-glue.o): In function `sevenzip_uncompress':
libretro-glue.c:(.text.sevenzip_uncompress+0x144): undefined reference to `LookToRead2_CreateVTable'
.\libretro_wii.a(archdep.o): In function `archdep_access':
archdep.c:(.text.archdep_access+0x34): undefined reference to `access'
.\libretro_wii.a(archdep.o): In function `archdep_default_resource_file_name':
archdep.c:(.text.archdep_default_resource_file_name+0xac): undefined reference to `access'
archdep.c:(.text.archdep_default_resource_file_name+0xf8): undefined reference to `access'
archdep.c:(.text.archdep_default_resource_file_name+0x1a4): undefined reference to `access'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile.griffin:1247: retroarch_wii.elf] Error 1

@sonninnos
Copy link
Collaborator

LookToRead2_CreateVTable is regular 7zip stuff which is under deps/7zip/, but Wii uses static linking, which means it isn't using those files. Makefile does have NO_7ZIP flag, so you should be able to at least test it without 7zip support.

Regarding that access function you might want to copy the one defined for #ifdef __PS3__, since it seems common and simple enough:

int access(const char *fpath, int mode)
{
    struct stat buffer;   
    return libretro_stat(fpath, &buffer);
}

Then again buildbot is able to build it without that, so something missing in your toolchain then I guess.

@saulfabregwiivc
Copy link
Author

LookToRead2_CreateVTable is regular 7zip stuff which is under deps/7zip/, but Wii uses static linking, which means it isn't using those files. Makefile does have NO_7ZIP flag, so you should be able to at least test it without 7zip support.

Regarding that access function you might want to copy the one defined for #ifdef __PS3__, since it seems common and simple enough:

int access(const char *fpath, int mode)
{
    struct stat buffer;   
    return libretro_stat(fpath, &buffer);
}

Then again buildbot is able to build it without that, so something missing in your toolchain then I guess.

So i can temporally disable static linking by passing the argument STATIC_LINKING=0 when compiling VICE for Wii, right?

Anyways, i've disabled 7-Zip support here and added the int access as you suggested, but keeping the static linking.
Everything still compiles fine the libretro_wii.a file, now i will see if it now compiles the dol file.

Thanks, i will post more results later.

@sonninnos
Copy link
Collaborator

No, I don't think you can just disable static linking and expect it to work. It needs RetroArch built-in to be usable. Check the gitlab recipes to see how the template works.

@sonninnos sonninnos changed the title Having trouble compiling VICE Libretro and how to put the required library files correctly? [Wii] Having trouble compiling VICE Libretro and how to put the required library files correctly? Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants