#Can't build template exefs

127 messages · Page 1 of 1 (latest)

simple geyser
#

I've followed the instructions to set up Ghidra and ExLaunch and as far as I know things seem right, I haven't gotten any errors. But when I try to build, it always fails:

/opt/devkitpro/devkitA64/aarch64-none-elf/include/c++/15.1.0/bits/stl_construct.h:99:21: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
   99 |       void* __loc = __location;
      |                     ^~~~~~~~~~
      |                     |
      |                     const void*
make[3]: *** [CMakeFiles/RomBase_Diamond.dir/build.make:134: CMakeFiles/RomBase_Diamond.dir/src/common/exlaunch/hook/nx64/inline_impl.cpp.obj] Error 1
make[2]: *** [CMakeFiles/Makefile2:674: CMakeFiles/RomBase_Diamond.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:489: CMakeFiles/RomBase_release_ryujinx.dir/rule] Error 2
make: *** [Makefile:267: RomBase_release_ryujinx] Error 2

I'm not on Windows, I'm on Linux, so it's possible I might have adapted the instructions wrong? Maybe the cmake configure command should be different? I don't know, I've never done anything like this before

#

This might not be enough info, I have no clue where full build logs might be kept and I have no idea what else to provide

quasi grotto
#

May I ask what your goals are for your modding project?

#

I can also ping @shrewd mural (our lead exefs dev) if he’s available to offer some insight.

But it’d be helpful to understand what you’re trying to achieve also.

simple geyser
#

Right now my goal is just to mess around and know what I can do, but my ultimate goal is hopefully an Archipelago implementation

#

So an item and Pokemon randomizer

quasi grotto
#

Gotcha. You can do it on a romfs level with [io] but I take it you’re trying to do it in the game code directly, yeah?

worthy bronzeBOT
#
Team Lumi

Imposter's Ordeal is a BDSP randomizer that also allows you to edit a vast array of game functions. Requires a romfs/exefs extraction of 1.3.0 (BD if you're going to add Lumi, though SP works if you're just messing with vanilla). From there, click "add mod" to load the Luminescent romfs/exefs folders. Once you're finished editing, put the resultant "output" files into the space of your Luminescent mod.

Imposter's Ordeal allows you to change move attributes (types, additional effects, accuracy, etc), shop lists, route encounters, and Pokémon statistics such as their typing, BST, and wild held items.

The randomizer function is only compatible with versions 2.0.4+. Here is our guide on how to do it.

Always download the latest version from the releases page. Requires .NET 5.0.

simple geyser
#

Yeah since Archipelago would involve other moving parts

quasi grotto
#

Oh actually I wasn’t familiar with Archipelago. Very interesting!

shrewd mural
#

oh hmmm I don't think I've seen that error before

simple geyser
#

I imagine it's possible but if I can't even build the template I'm not sure what I can really do at all >.>

#

would -DCMAKE_INSTALL_PREFIX:PATH= be something different since I don't use WSL?

#

the instructions seem very windows centric so I was adapting things as best I could

shrewd mural
#

I do work with it using windows/wsl so I'm not super sure

simple geyser
#

does anyone in the dev team use non-wsl linux then?

shrewd mural
#

For exefs I'm the only active one currently unfortunately

simple geyser
#

having to use a windows vm to then use wsl seems silly

shrewd mural
#

yeah for sure

#

lemme see if i can figure something out

simple geyser
#

bdsp-repacker is windows only..?

shrewd mural
#

what confuses me is that the error it's giving you seems to come from devkitpro directly, unless im misreading

simple geyser
#

i think so???

#

i'm on an arch based system so i just added the repos and installed like the devkitpro guide says to

simple geyser
#

if i can't run the basic things to get custom dialogue working then i can't do this project

shrewd mural
#

there's other ways to edit the bundles, depending on how in-depth you want to go with it

#

you can use UABEA, which I think should work on linux

simple geyser
#

nesrak1/UABEA?

shrewd mural
#

yup

#

this is for more general bundle viewing/editing

#

although it can sometimes have some issues with how it handles tags

simple geyser
#

release is windows only

#

do i just git clone and run it from source?

shrewd mural
#

yup you should be able to

#

ive never ran it from source but if i had to guess dialogEditor.py is the entry point

simple geyser
#

..yknow i bet i could do that with repacker also

#

turns out repacker has permission issues so it can't actually output the unpacked files. uabea it is!

simple geyser
#

things aren't working for seemingly no reason and it's making me unreasonably frustrated

#

nvm i got it working

#

anyway back to the original build thingy, lmk if you need more info or if you manage to replicate it

shrewd mural
#

might be a version thing with devkitpro

simple geyser
#

that would be concerning

long axle
long axle
quasi grotto
#

It’s always hype when Twisted Spoon emerges from the shadows!

long axle
#

I won’t lie I’ve seen that error before but I can’t check how mine’s setup for a few hours til I’m done with work

simple geyser
#

thank you for the insight!

long axle
#

Did a fresh git clone of rombase and it built successfully

#

CMake:

-- The CXX compiler identification is GNU 13.2.0
-- The C compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- elf2kip - found
-- elf2nro - found
-- elf2nso - found
-- nacptool - found
-- npdmtool - found
-- nxlink - found
-- build_pfs0 - found
-- build_romfs - found
-- bin2s - found
-- Configuring done (0.5s)
-- Generating done (0.0s)
-- Build files have been written to: /home/spoon/Documents/GitHub/BDSP_rombase/build

[Finished]

#

And then end of build:

[ 98%] Linking CXX executable RomBase_Diamond
[ 98%] Built target RomBase_Diamond
[100%] Generating RomBase_Diamond_out/subsdk9
Failed to get optimize_memory_allocation (field not present).
Failed to get disable_device_address_space_merge (field not present).
Failed to get signature_key_generation (field not present).
Failed to get program_id_range_min (field not present).
Failed to get program_id_range_max (field not present).
Failed to get program_id (field not present).
[100%] Built target RomBase_Diamond_npdm
[100%] Built target RomBase_Diamond_nso
[100%] Built target RomBase_Diamond_all
[100%] Built target RomBase_Diamond_release_atmosphere
[100%] Built target RomBase_Diamond_release_yuzu
[100%] Built target RomBase_Diamond_release_modmanager
[100%] Built target RomBase_Diamond_release_ryujinx
[100%] Built target RomBase_Diamond_release_all
[100%] Built target RomBase_release_variants
[100%] Built target RomBase_release_ryujinx

Build finished

#

Just in case as well, if you cloned from command line make sure you did git clone --recursive http://github.com/Martmists-GH/BDSP_rombase.git so the imgui submodule was included, that can sometimes create some issues

simple geyser
#

the guide should have this

#

nonetheless ill give this a shot in a bit

#

wait i was using cli, not clion

long axle
#

Verified ok from CLI too

#
cmake --version
cmake version 3.27.7

pip show keystone-engine
Name: keystone-engine
Version: 0.9.2
simple geyser
#

what version of devkitpro?

long axle
#
dkp-libs/deko3d 0.4.0-1 (switch-dev) [installed]
    Homebrew low level graphics API for Nintendo Switch (Nvidia Tegra X1)
dkp-libs/devkita64-cmake 1.1.2-1 (switch-dev) [installed]
    CMake support files for devkitA64
dkp-libs/libnx 4.4.2-1 (switch-dev) [installed]
    Nintendo Switch AArch64-only userland library.
dkp-libs/switch-cmake 1.5.0-1 (switch-dev) [installed]
    CMake support for Nintendo Switch
dkp-libs/switch-examples 20201219-1 (switch-dev) [installed]
    Nintendo Switch example code.
dkp-libs/switch-pkg-config 0.28-4 (switch-dev) [installed]
    pkg-config wrapper (for Nintendo Switch homebrew development)
dkp-linux/devkit-env 1.0.1-2 (gp32-dev gba-dev nds-dev 3ds-dev gamecube-dev wii-dev wiiu-dev switch-dev) [installed]
    environment settings for devkitPro supplied tools
dkp-linux/devkitA64 r24-1 (switch-dev) [installed]
    Toolchain for Nintendo Switch homebrew development
dkp-linux/devkitA64-gdb 13.2-1 (switch-dev) [installed]
    gnu debugger for devkitA64
dkp-linux/general-tools 1.4.4-1 (gp32-dev gp2x-dev gba-dev nds-dev 3ds-dev switch-dev gamecube-dev wii-dev wiiu-dev) [installed]
    Tools for homebrew development
dkp-linux/switch-tools 1.12.0-1 (switch-dev) [installed]
    Tools for Nintendo Switch homebrew development)
dkp-linux/uam 1.1.0-1 (switch-dev) [installed]
    deko3d shader compiler for Nintendo Switch
simple geyser
#

oh im on cmake 4.0.2 from arch repos

long axle
#

That's probably correct. Keep in mind I've had cmake installed for a long time and it's not updated to latest

#

My main pc is 3.31.2

simple geyser
#
$ pacman -Ss switch-dev
dkp-libs/catnip 0.1.0-1 (3ds-dev switch-dev wiiu-dev gba-dev nds-dev gamecube-dev wii-dev) [installed]
    Helper tool for devkitPro CMake
dkp-libs/deko3d 0.5.0-1 (switch-dev) [installed]
    Homebrew low level graphics API for Nintendo Switch (Nvidia Tegra X1)
dkp-libs/devkita64-cmake 1.1.2-1 (switch-dev) [installed]
    CMake support files for devkitA64
dkp-libs/libnx 4.9.0-1 (switch-dev) [installed]
    Nintendo Switch AArch64-only userland library.
dkp-libs/switch-cmake 1.5.1-1 (switch-dev) [installed]
    CMake support for Nintendo Switch
dkp-libs/switch-examples 20241018-1 (switch-dev) [installed]
    Nintendo Switch example code.
dkp-libs/switch-pkg-config 0.28-4 (switch-dev) [installed]
    pkg-config wrapper (for Nintendo Switch homebrew development)
dkp-linux/devkit-env 1.0.1-2 (gp32-dev gba-dev nds-dev 3ds-dev gamecube-dev wii-dev wiiu-dev switch-dev) [installed]
    environment settings for devkitPro supplied tools
dkp-linux/devkitA64 r28-1 (switch-dev) [installed]
    Toolchain for Nintendo Switch homebrew development
dkp-linux/devkitA64-gdb 14.1-1 (switch-dev) [installed]
    gnu debugger for devkitA64
dkp-linux/general-tools 1.4.4-1 (gp32-dev gp2x-dev gba-dev nds-dev 3ds-dev switch-dev gamecube-dev wii-dev wiiu-dev) [installed]
    Tools for homebrew development
dkp-linux/switch-tools 1.13.1-1 (switch-dev) [installed]
    Tools for Nintendo Switch homebrew development)
dkp-linux/uam 1.1.0-1 (switch-dev) [installed]
    deko3d shader compiler for Nintendo Switch
#

and building from a fresh git clone of the rom base gives the same error

long axle
#

run cmake --fresh and show me the output please

simple geyser
#
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error: The source directory "/home/flitpix/Projects/ap-bdsp/mod/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
long axle
#

do ``cd ../" and then run that again

simple geyser
#
-- The CXX compiler identification is GNU 15.1.1
-- The C compiler identification is GNU 15.1.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:9 (message):
  Not targeting switch, make sure to specify
  -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake


-- Configuring incomplete, errors occurred!
#

with the same cmake warning also, if that matters

long axle
#

and then the output of cd ./build + make target etc etc

#

the cmake warning is fine

simple geyser
#
[flitpix@hostname build]$ make RomBase_release_ryujinx-- The CXX compiler identification is GNU 15.1.1
-- The C compiler identification is GNU 15.1.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:9 (message):
  Not targeting switch, make sure to specify
  -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake


-- Configuring incomplete, errors occurred!
make: *** [Makefile:1808: cmake_check_build_system] Error 1
[flitpix@hostname build]$ pwd
/home/flitpix/Projects/ap-bdsp/mod/build
long axle
#

Alright go back to cd ../ and paste in

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="out/install/WSL-GCC-Debug" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="cmake/toolchain.cmake"

and then cd ./build and make it again and show me that output

simple geyser
#
$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="out/install/WSL-GCC-Debug" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="cmake/toolchain.cmake"
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error at CMakeLists.txt:9 (message):
  Not targeting switch, make sure to specify
  -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake


-- Configuring incomplete, errors occurred!
#

whatever we did, i can't make the build files

long axle
#

so to confirm, you ran the cmake -G in "/home/flitpix/Projects/ap-bdsp/mod/" and then cd to "/home/flitpix/Projects/ap-bdsp/mod/build" where you then run make RomBase_release_ryujinx

simple geyser
#

i literally only did the former because that is the command that's erroring

#
[flitpix@hostname mod]$ pwd
/home/flitpix/Projects/ap-bdsp/mod
[flitpix@hostname mod]$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="out/install/WSL-GCC-Debug" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="cmake/toolchain.cmake"
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error at CMakeLists.txt:9 (message):
  Not targeting switch, make sure to specify
  -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake


-- Configuring incomplete, errors occurred!
#

and fwiu i cannot run make unless this succeeds

long axle
#

okay cmake --fresh again and then run make after going to /build and show me that output

simple geyser
#
$ cmake --fresh
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- The CXX compiler identification is GNU 15.1.1
-- The C compiler identification is GNU 15.1.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:9 (message):
  Not targeting switch, make sure to specify
  -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake


-- Configuring incomplete, errors occurred!

this is in repo root. with all due respect i don't think we're getting anywhere

long axle
#

That error is irrelevant, it does not stop make from running

#

it is identical to my output

simple geyser
#

it says configuring incomplete? this did nothing seemingly?

#

oh ok

#

in build:

$ make RomBase_release_ryujinx
CMake Error at CMakeLists.txt:9 (message):
  Not targeting switch, make sure to specify
  -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake


-- Configuring incomplete, errors occurred!
make: *** [Makefile:1808: cmake_check_build_system] Error 1
#

what are we trying to do exactly? it just looks like we're getting the same error message repeatedly

long axle
#

run make clean which will clear the build files and then rerun the usual make command and show me that output

simple geyser
#

do i run make clean in repo root?

long axle
#

no in build please

simple geyser
#
$ make clean
make[1]: CMakeFiles/Makefile2: No such file or directory
make[1]: *** No rule to make target 'CMakeFiles/Makefile2'.  Stop.
make: *** [Makefile:97: clean] Error 2
#

same error as before when building

long axle
#

can you upload the makefile found in /build

simple geyser
long axle
#

Interesting, my CMake runs through /snap/clion/326/bin/cmake/linux/x64/bin/cmake whereas yours is /usr/bin/cmake. Let me modify my environment and test

simple geyser
#

yeah i don't use snaps bc i'm on an arch-based distro

#

oh wait that's through clion

#

does clion ship its own cmake?

long axle
#

Alright I managed to make it get the same error and I think I've found the solution

#

it's annoying but:

run cmake --fresh --toolchain <path to BDSP_rombase/cmake/toolchain.cmake>

#

It will not error

#

after I did that make worked for me

long axle
#

tbh I did it from build and it worked

simple geyser
#

ok

#

does it have to be an absolute path also

long axle
#

in my experience yes, I tried relative and it did not like it

simple geyser
#
$ cmake --fresh --toolchain /home/flitpix/Projects/ap-bdsp/mod/cmake/toolchain.cmake
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error: The source directory "/home/flitpix/Projects/ap-bdsp/mod/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

but things changed so i tried to build anyway and it still fails:

$ make RomBase_release_ryujinx
-- The CXX compiler identification is GNU 15.1.1
-- The C compiler identification is GNU 15.1.1
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:9 (message):
  Not targeting switch, make sure to specify
  -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake


-- Configuring incomplete, errors occurred!
make: *** [Makefile:1808: cmake_check_build_system] Error 1
long axle
#

yeah okay do it outside of build cause its not finding cmakelists.txt

simple geyser
#

cmake fresh worked
building still fails:

$ make RomBase_release_ryujinx
CMake Error at CMakeLists.txt:9 (message):
  Not targeting switch, make sure to specify
  -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake


-- Configuring incomplete, errors occurred!
make: *** [Makefile:1808: cmake_check_build_system] Error 1
#

whyyyyyyy.

long axle
#

What distro are you using. I’ll create a virtual box and do everything from scratch so I can troubleshoot easier

simple geyser
#

endeavouros

#

you could probably also test with arch

long axle
#

Alright sweet. It’s almost 1am for me so I gotta sleep now but I’ll give it a go when I wake up cause I’m curious to figure this out

simple geyser
#

gotcha, thanks in advance! i'll be looking at things in ghidra in the meantime

#

not related to the original issue, but aside from the documentation is there a public place where i can see already documented/reverse-engineered functions?

shrewd mural
#

I am actively working on cleaning up the internal version of it I have to then publish it to that repo

simple geyser
#

cool i'll take a look, ty