Atmosphere-NX / Atmosphere-libs

A collection of C++ libraries for development of system modules for the Nintendo Switch.
GNU General Public License v2.0
156 stars 40 forks source link

Stratosphere compilation error - static assertion failed #28

Closed PewnyPL closed 1 month ago

PewnyPL commented 1 month ago
/home/pewnypl/switch-dev/ldn_mitm/Atmosphere-libs/libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp: In function 'ams::Result ams::ldr::pm::GetProgramInfo(ams::ldr::ProgramInfo*, const ams::ncm::ProgramLocation&)':
/home/pewnypl/switch-dev/ldn_mitm/Atmosphere-libs/libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp:27:36: error: static assertion failed
   27 |         static_assert(sizeof(*out) == sizeof(LoaderProgramInfo));
      |                       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pewnypl/switch-dev/ldn_mitm/Atmosphere-libs/libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp:27:36: note: the comparison reduces to '(1040 == 1024)'
/home/pewnypl/switch-dev/ldn_mitm/Atmosphere-libs/libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp: In function 'ams::Result ams::ldr::pm::AtmosphereGetProgramInfo(ams::ldr::ProgramInfo*, ams::cfg::OverrideStatus*, const ams::ncm::ProgramLocation&)':
/home/pewnypl/switch-dev/ldn_mitm/Atmosphere-libs/libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp:46:36: error: static assertion failed
   46 |         static_assert(sizeof(*out) == sizeof(LoaderProgramInfo));
      |                       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pewnypl/switch-dev/ldn_mitm/Atmosphere-libs/libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp:46:36: note: the comparison reduces to '(1040 == 1024)'

I have updated devkitpro through dkp-pacman -Syu Afterwards, as I was getting an error, I downloaded, compiled and make install'ed newest commit of libnx, getting this error now.

masagrator commented 1 month ago

You didn't use libnx the one you should

https://github.com/Atmosphere-NX/libnx/tree/1900_support

PewnyPL commented 1 month ago

You didn't use libnx the one you should

https://github.com/Atmosphere-NX/libnx/tree/1900_support

Oh... I was still using the switchbrew/libnx, last time I compiled anything was during HOS 17.0.0 Thank you, I managed to now compile it (after modifying the main app's json to comply with newer switch tools).

LynxDev2 commented 1 week ago

I'm also having the same issue and the 1900_support branch of Atmosphere-NX/libnx fails to compile with the latest devkitA64 for me