Open P0W3 opened 1 year ago
The issue is you didn't read the front page. Forget the fact that you typed "make.switch" instead of "make switch", nothing here tells you to type that in the first place. It's "make nro". It does seem that the front page doesn't actually mention "make nds", but building all of them does nds, 3dsx, nro, and linux. Unless you want the classic versions, whatever that means.
Assuming you've setup your dev environment, including setting up pacman with the devkitpro repo and keyring, all you need to do is install the dependencies (don't forget pacman -S mingw-w64-x86_64-imagemagick
, which you may need to run multiple times to get all 40 of its dependencies downloaded, for building an nro for the switch). Then: make <whatever system you're making it for>.
On second thought, this is valid, because with the latest tools and libraries, 3dsx is broken. Most likely have to install the ctrulib version that was around during the last update of ftpd.
ftpd is building fine for me with latest tools and libraries. Please don't recommend people messing with their installation of devkitPro tools & libraries, it causes way more issues than it ever solves.
The usual cause of segfaults when building on windows is antivirus software and some logitech camera drivers. Whitelist the devkitPro folder and/or uninstall any logitech camera software if you have any.
This still doesn't build 3dsx in msys with the latest tools.
\msys64\opt\devkitpro\devkitarm\arm-none-eabi\include\c++\12.2.0\ext\string_conversions.h:84:16: error: '_errno' was not declared in this scope; did you mean 'errno'? 84 | else if (errno == ERANGE | ^~~~~ make[2]: [/opt/devkitpro/devkitARM/base_rules:80: fs.o] Error 1 make[1]: [Makefile.3ds:211: 3dsx] Error 2 make[1]: Leaving directory '/home/Mike/projects/ftpd' make: *** [Makefile:68: 3dsx] Error 2
a boatload of other "is not a member of 'std'", "expected initializer before", and "was not declared in this scope" errors.
It builds fine with latest tools. You've broken your installation somehow.
I would recommend wiping the devkitpro folder and reinstalling your tools.
davem@ashpool MSYS ~/projects/3ds/ftpd
$ uname -a
MSYS_NT-10.0-19044 ashpool 3.4.6.x86_64 2023-02-15 18:03 UTC x86_64 Msys
davem@ashpool MSYS ~/projects/3ds/ftpd
$ make -j32 3dsx
make[1]: Entering directory '/home/davem/projects/3ds/ftpd'
mkdir -p /home/davem/projects/3ds/ftpd/3ds/build
gfx.t3s
tex3ds -i /home/davem/projects/3ds/ftpd/3ds/gfx/gfx.t3s -H 3ds/build/gfx.h -d /home/davem/projects/3ds/ftpd/3ds/build/gfx.d -o 3ds/romfs/gfx.t3x
Used lz11 for compression
vshader.v.pica
built ... ftpd.smdh
fs.cpp
ftpConfig.cpp
ftpServer.cpp
ftpSession.cpp
ioBuffer.cpp
licenses.cpp
log.cpp
main.cpp
sockAddr.cpp
socket.cpp
imgui_citro3d.cpp
imgui_ctru.cpp
platform.cpp
imgui.cpp
imgui_draw.cpp
imgui_tables.cpp
imgui_widgets.cpp
linking ftpd.elf
built ... ftpd.3dsx
Ok, I'm stupid, and have it figured out. Don't know about the OP though.
1) I was building from mingw64. This doesn't seem to bother anything else, but 3ds doesn't like it. I ran msys2.exe instead, and re-updated my packages, which seemed to catch things that weren't upgraded in a desirable way while under mingw64
2) I had to install 3ds-curl separately, which isn't mentioned in the readme (readme gives the impression that installing 3ds-dev is good enough).
all sorted on my end.
EDIT: 3) It seems as though Mingw is required for building an nro because of imagemagick. Unless I'm missing something? Is there a non-mingw imagemagic package somewhere? Otherwise, I have to use mingw for the nro, then open msys2 for 3ds. I feel like I still did something wrong in my setup.
I used the
make
command, but it errors appeared.