How do I update it (I'm using Github Codespaces' Ubuntu)libnx was updated recently, and it's not via pacman. you have to go to its github and make install it there (not sure if it includes switch rules or not). okay, it does:
View attachment 356835
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/ld: required symbol `main' not defined
/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/ld: /opt/devkitpro/libnx/lib/libnx.a(switch_crt0.o): in function `_start':
/home/fincs/git/pacman-packages/libnx/src/libnx-4.2.2/nx/source/runtime/switch_crt0.s:70: undefined reference to `main'
collect2: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/libnx/switch_rules:80: /workspaces/nxray-16/nxray-16.elf] Error 1
make: *** [Makefile:165: build] Error 2
Have you gone through the how to build atmosphere tutorial by @impeeza ?How do I update it (I'm using Github Codespaces' Ubuntu)
Post automatically merged:
P.S.: I've fixed this error but now I'm getting
Makefile:/opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/ld: required symbol `main' not defined /opt/devkitpro/devkitA64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/ld: /opt/devkitpro/libnx/lib/libnx.a(switch_crt0.o): in function `_start': /home/fincs/git/pacman-packages/libnx/src/libnx-4.2.2/nx/source/runtime/switch_crt0.s:70: undefined reference to `main' collect2: error: ld returned 1 exit status make[1]: *** [/opt/devkitpro/libnx/switch_rules:80: /workspaces/nxray-16/nxray-16.elf] Error 1 make: *** [Makefile:165: build] Error 2
For building Atmosphère on UBUNTU, I had to run this commands:Have you gone through the how to build atmosphere tutorial by @impeeza ?
https://gbatemp.net/threads/building-atmosphere-on-windows-using-msys2.613446/
it’s for Windows but the instructions are easily translated to Linux. Once you can build Atmosphere properly then you are assured to be able to build almost anything else relatively trouble free on a proven environment.
e: https://docs.github.com/en/billing/...odespaces/about-billing-for-github-codespaces
this is actually pretty cool. I do my builds on a raspberry pi…I might switch to a free code space. Hmmmm
sudo apt install wget
wget https://apt.devkitpro.org/install-devkitpro-pacman
chmod +x ./install-devkitpro-pacman
sudo ./install-devkitpro-pacman
sudo apt install lz4 zip git make gcc python3 python-is-python3 python3-pip
sudo pip install pycryptodome lz4
sudo dkp-pacman -Sy --noconfirm --needed libnx devkitA64 devkitARM devkitarm-rules hactool switch-dev dkp-toolchain-vars switch-tools switch-mesa switch-libdrm_nouveau switch-sdl2 switch-libjpeg-turbo switch-glm
sudo dkp-pacman -Syuu --noconfirm
export DEVKITPRO=/opt/devkitpro
export DEVKITARM=${DEVKITPRO}/devkitARM
export DEVKITPPC=${DEVKITPRO}/devkitPPC
export PATH=${DEVKITPRO}/tools/bin:$PATH
git clone --recursive https://github.com/Atmosphere-NX/Atmosphere
cd Atmosphere
make -j$(nproc)
I can build Atmo just fine, the problem is in my projectFor building Atmosphère on UBUNTU, I had to run this commands:
DevKitPro Installation
Bash:sudo apt install wget wget https://apt.devkitpro.org/install-devkitpro-pacman chmod +x ./install-devkitpro-pacman sudo ./install-devkitpro-pacman
Base packages
Bash:sudo apt install lz4 zip git make gcc python3 python-is-python3 python3-pip sudo pip install pycryptodome lz4 sudo dkp-pacman -Sy --noconfirm --needed libnx devkitA64 devkitARM devkitarm-rules hactool switch-dev dkp-toolchain-vars switch-tools switch-mesa switch-libdrm_nouveau switch-sdl2 switch-libjpeg-turbo switch-glm sudo dkp-pacman -Syuu --noconfirm
You need to copy prod.keys file on $HOME/.switch
Building
Bash:export DEVKITPRO=/opt/devkitpro export DEVKITARM=${DEVKITPRO}/devkitARM export DEVKITPPC=${DEVKITPRO}/devkitPPC export PATH=${DEVKITPRO}/tools/bin:$PATH git clone --recursive https://github.com/Atmosphere-NX/Atmosphere cd Atmosphere make -j$(nproc)
I just tried to build your project, and it errored here. it's most likely going to fail once it's done obviously:I can build Atmo just fine, the problem is in my project
What does Error 1/2 mean and is there a guide/error documentation?I just tried to build your project, and it errored here. it's most likely going to fail once it's done obviously:
View attachment 356845
I'm not sure in this case. I didn't let it stop with failure, I just exited out, because it was pointless at that time. if I had to guess what the problem was, it was some sort of variable in the code that confused the compiler. maybe the compiler is the wrong version? however, that last thing in the dependencies only seems to exist with ubuntu 22.04, so it's probably not something to do with the linux distro.What does Error 1/2 mean and is there a guide/error documentation?
Yeah, that's not what happened, because I end up with the same error on linux after messing with the export command. Guess I'll do some tinkering later because the PC build runs fine (see this)I'm not sure in this case. I didn't let it stop with failure, I just exited out, because it was pointless at that time. if I had to guess what the problem was, it was some sort of variable in the code that confused the compiler. maybe the compiler is the wrong version? however, that last thing in the dependencies only seems to exist with ubuntu 22.04, so it's probably not something to do with the linux distro.
Can this actually fix my issue with switch building (I used make platfrom=switch before)?I got it to build in linux. I actually made the mistake by using make -j instead of make -j$(nproc):
View attachment 356889
this seems to use cmake, then make. I used the instructions in the building link. it links to another project, but the same steps work with yours as well. I don't really know what make PLATFORM=switch would do. some compiles require it if there's more than one possible platform it could build for.Can this actually fix my issue with switch building (I used make platfrom=switch before)?
Decided to switch (pun intended) to ye old windows and building w/o platform=switch still get these errors (1 and 2)this seems to use cmake, then make. I used the instructions in the building link. it links to another project, but the same steps work with yours as well. I don't really know what make PLATFORM=switch would do. some compiles require it if there's more than one possible platform it could build for.
https://github.com/OpenXRay/xray-16/wiki/[EN]-How-to-build-and-setup-on-LinuxDecided to switch (pun intended) to ye old windows and building w/o platform=switch still get these errors (1 and 2)
Post automatically merged:
$ make -j$(nproc)
linking nxray-16.elf
d:/apps/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/
ld.exe: required symbol `main' not defined
d:/apps/devkitpro/devkita64/bin/../lib/gcc/aarch64-none-elf/12.2.0/../../../../aarch64-none-elf/bin/
ld.exe: D:/Apps/devkitPro/libnx/lib\libnx.a(switch_crt0.o): in function `_start':
/home/fincs/git/pacman-packages/libnx/src/libnx-4.2.2/nx/source/runtime/switch_crt0.s:70: undefined
reference to `main'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/libnx/switch_rules:80: /d/Programming/nxray-16/nxray-16.elf] Error 1
make: *** [Makefile:165: build] Error 2
Post automatically merged:
Building with cmake gives this error
CMake Error at CMakeLists.txt:241 (find_package):
By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "SDL2", but
CMake did not find one.
Could not find a package configuration file provided by "SDL2" with any of
the following names:
SDL2Config.cmake
sdl2-config.cmake
Add the installation prefix of "SDL2" to CMAKE_PREFIX_PATH or set
"SDL2_DIR" to a directory containing one of the above files. If "SDL2"
provides a separate development package or SDK, be sure it has been
installed.