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

New DevKitPro Libs compilation #3

Open
impeeza opened this issue Nov 12, 2022 · 7 comments
Open

New DevKitPro Libs compilation #3

impeeza opened this issue Nov 12, 2022 · 7 comments

Comments

@impeeza
Copy link

impeeza commented Nov 12, 2022

Hi, with the emerge of Firmware 15 the DevKitPro libs get updated and now Solarus do not compile, I just setup a environment from start, installed DevKitPro and get all updated, install the next packages:

pacman -S --needed --noconfirm base-devel git make mercurial python3 subversion mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-glew mingw-w64-x86_64-SDL2 mingw-w64-x86_64-toolchain switch-dev devkitpro-pkgbuild-helpers libnx switch-tools switch-mesa switch-libdrm_nouveau switch-sdl2 deko3d devkitA64 devkitA64-gdb devkita64-rules devkitpro-keyring general-tools libnx switch-bzip2 switch-examples switch-flac switch-freetype switch-glad switch-glm switch-libconfig switch-libdrm_nouveau switch-libjpeg-turbo switch-libmodplug switch-libogg switch-libopus switch-libpng switch-libvorbis switch-libvorbisidec switch-libwebp switch-mesa switch-mpg123 switch-opusfile switch-physfs switch-pkg-config switch-sdl2 switch-sdl2_gfx switch-sdl2_image switch-sdl2_mixer switch-sdl2_ttf switch-tools switch-zlib uam

And when run make, get the next error:

C:/msys64/opt/devkitpro/portlibs/switch/include/physfs.h:851:17: note: declared here
  851 | PHYSFS_DECL int PHYSFS_addToSearchPath(const char *newDir, int appendToPath)
      |                 ^~~~~~~~~~~~~~~~~~~~~~
C:/msys64/home/Impeeza/solarus/src/core/QuestFiles.cpp: In function 'std::string Solarus::QuestFiles::get_base_write_dir()':
C:/msys64/home/Impeeza/solarus/src/core/QuestFiles.cpp:533:39: warning: 'const char* PHYSFS_getUserDir()' is deprecated [-Wdeprecated-declarations]
  533 |   return std::string(PHYSFS_getUserDir());
      |                      ~~~~~~~~~~~~~~~~~^~
C:/msys64/opt/devkitpro/portlibs/switch/include/physfs.h:792:25: note: declared here
  792 | PHYSFS_DECL const char *PHYSFS_getUserDir(void) PHYSFS_DEPRECATED;
      |                         ^~~~~~~~~~~~~~~~~
make[1]: *** [/home/Impeeza/solarus/Makefile:246: GlShader.o] Error 1
make[1]: *** [/home/Impeeza/solarus/Makefile:246: Main.o] Error 1
make[1]: *** [/home/Impeeza/solarus/Makefile:246: SDLShader.o] Error 1
make[1]: *** [/home/Impeeza/solarus/Makefile:246: SNES_SPC_misc.o] Error 1
make[1]: *** [/home/Impeeza/solarus/Makefile:246: MainLoop.o] Error 1
make[1]: *** [/home/Impeeza/solarus/Makefile:246: Shader.o] Error 1
make[1]: *** [/home/Impeeza/solarus/Makefile:246: GlRenderer.o] Error 1
make[1]: *** [/home/Impeeza/solarus/Makefile:246: Sound.o] Error 1
make[1]: *** [/home/Impeeza/solarus/Makefile:246: SavegameConverterV1.o] Error 1
make: *** [Makefile:207: build] Error 2

and several others on the middle of process, the next word document have a copy of the process of build:

Result_2022_11_12.docx

thanks a lot for your help.

@capsterx
Copy link
Owner

capsterx commented Nov 12, 2022

I upgraded my packages and built again, I only got one error which was with borealis, which needs an update from upstream, but it all compiled when I removed one line:

diff --git a/borealis/library/lib/swkbd.cpp b/borealis/library/lib/swkbd.cpp
index 2a0a62ab9..71695ddef 100644
--- a/borealis/library/lib/swkbd.cpp
+++ b/borealis/library/lib/swkbd.cpp
@@ -41,7 +41,6 @@ static SwkbdConfig createSwkbdBaseConfig(std::string headerText, std::string sub
     swkbdConfigSetSubText(&config, subText.c_str());
     swkbdConfigSetStringLenMax(&config, maxStringLength);
     swkbdConfigSetInitialText(&config, initialText.c_str());
-    swkbdConfigSetStringLenMaxExt(&config, 1);
     swkbdConfigSetBlurBackground(&config, true);
 
     return config;

@impeeza
Copy link
Author

impeeza commented Nov 16, 2022

hello there, I just create a Ubuntu VM and install all DevKitPro packages, then run make and get the next error:

larus/src/core/InputEvent.cpp -o InputEvent.o 
/home/impeeza/solarus/src/core/InputEvent.cpp:25:10: fatal error: switch/switch_event.hpp: No such file or directory
   25 | #include <switch/switch_event.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/home/impeeza/solarus/Makefile:247: InputEvent.o] Error 1
make: *** [Makefile:207: build] Error 2
impeeza@UBUNTU2210:~/solarus$ make SWITCH_GUI=1 LUAJIT=1 

and is correct the file switch_event.hpp is referenced on InputEvent.cpp but is not everywhere on the repo.

@capsterx
Copy link
Owner

Hmm, so a quick fix for this would be git checkout -b v0.4.2-luajit

@capsterx
Copy link
Owner

I pushed an update that might fix this, I guess I was in the middle of making updates when I got busy

@impeeza
Copy link
Author

impeeza commented Nov 16, 2022

Hello there, thanks a lot for your quick response.

just use my Ubuntu virtual machine, clean the solarus repo, clone it again and run make, the result, a new and shinny Solarus.nro 😄

But on MSYS environment get the error:


ItDecoder.cpp
aarch64-none-elf-g++ -MMD -MP -MF /home/Impeeza/solarus/build/ItDecoder.d -g -Wall -O2 -ffunction-sections -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE   -I/home/Impeeza/solarus/include -I/home/Impeeza/solarus/include/solarus -I/home/Impeeza/solarus/include/solarus/core -I/home/Impeeza/solarus/include/solarus/hero -I/home/Impeeza/solarus/include/solarus/entities -I/home/Impeeza/solarus/include/solarus/lowlevel -I/home/Impeeza/solarus/include/solarus/lua -I/home/Impeeza/solarus/include/solarus/movements -I/home/Impeeza/solarus/include/solarus/containers -I/home/Impeeza/solarus/include/solarus/third_party/snes_spc -I/home/Impeeza/solarus/include/solarus/third_party/mojoAL/AL -I/home/Impeeza/solarus/include/solarus/third_party -I/home/Impeeza/solarus/include/solarus/third_party/lua -I/home/Impeeza/solarus/include/solarus/switch -I/home/Impeeza/solarus/src/third_party/switch-utils/include -I/home/Impeeza/solarus/borealis/library/include -I/home/Impeeza/solarus/borealis/library/lib/extern/fmt/include -I/home/Impeeza/solarus/borealis/library/include/borealis/extern -I/opt/devkitpro/portlibs/switch/include -I/opt/devkitpro/libnx/include -I/opt/devkitpro/portlibs/switch/include/SDL2 -I/opt/devkitpro/portlibs/switch/include/libmodplug -I/home/Impeeza/solarus/build -D__SWITCH__ -DCOCO_DISABLE -frtti -fexceptions -std=c++11 -DSOLARUS_SWITCH_GUI -std=c++17 -DBOREALIS_RESOURCES="\"romfs:/\"" -c /home/Impeeza/solarus/src/audio/ItDecoder.cpp -o ItDecoder.o
In file included from C:/msys64/home/Impeeza/solarus/src/audio/ItDecoder.cpp:19:
C:/msys64/opt/devkitpro/portlibs/switch/include/libmodplug/stdafx.h: In function 'int8_t* GlobalAllocPtr(unsigned int, size_t)':
C:/msys64/opt/devkitpro/portlibs/switch/include/libmodplug/stdafx.h:111:18: error: 'memset' was not declared in this scope
  111 |   if (p != NULL) memset(p, 0, size);
      |                  ^~~~~~
C:/msys64/opt/devkitpro/portlibs/switch/include/libmodplug/stdafx.h:65:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
   64 | #include <string.h>
  +++ |+#include <cstring>
   65 | #ifdef HAVE_MALLOC_H
C:/msys64/opt/devkitpro/portlibs/switch/include/libmodplug/sndfile.h: In member function 'void CSoundFile::GetTitle(LPSTR) const':
C:/msys64/opt/devkitpro/portlibs/switch/include/libmodplug/stdafx.h:98:18: error: 'strncpy' was not declared in this scope
   98 | #define lstrcpyn strncpy
      |                  ^~~~~~~
C:/msys64/opt/devkitpro/portlibs/switch/include/libmodplug/sndfile.h:616:40: note: in expansion of macro 'lstrcpyn'
  616 |         void GetTitle(LPSTR s) const { lstrcpyn(s,m_szNames[0],32); }
      |                                        ^~~~~~~~
In file included from C:/msys64/home/Impeeza/solarus/src/audio/ItDecoder.cpp:20:
C:/msys64/opt/devkitpro/portlibs/switch/include/libmodplug/sndfile.h:1:1: note: 'strncpy' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
  +++ |+#include <cstring>
    1 | /*
make[1]: *** [/home/Impeeza/solarus/Makefile:247: ItDecoder.o] Error 1
make: *** [Makefile:207: build] Error 2

Impeeza@Titan MINGW64 ~/solarus

Sorry for been a pain on the butt :D and again thanks a lot for all your effort.

regards from Colombia.

@RetroMarioBros
Copy link

oh ! perfect ! Can you upload a build for Firmware 15?

@impeeza
Copy link
Author

impeeza commented Dec 30, 2022

Is the same you can download on release section

This issue is for compilation issues only. The code doesn't need uodate for firmware 15.x

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

3 participants