devkitpro / buildscripts Goto Github PK
View Code? Open in Web Editor NEWScripts for building devkitPro toolchains
Home Page: http://devkitpro.org/
Scripts for building devkitPro toolchains
Home Page: http://devkitpro.org/
devkitPro build scripts -------------------------- This readme will guide you through building devkitARM, devkitPPC or devkitA64 from source using a set of scripts. Please note that we can't guarantee that what you build with these scripts will function in the same way as the binaries we distribute. Where possible you should use the binary distributions. We also offer no support for any problems you may encounter with these scripts. The windows versions of the toolchains are now cross compiled on linux using mingw-w64 Preparing to build -------------------------- required packages for building on debian/*buntu sudo apt-get install build-essential autoconf automake bison flex libncurses5-dev libreadline-dev texinfo pkg-config For building gcc libgmp, libmpfr and libmpc are required - these are built as static libraries to make packaging simpler. If you're building the tools for personal use then the versions packaged by your chosen distro should suffice. https://gmplib.org/ https://www.mpfr.org/ https://www.multiprecision.org/ sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev Some of the tools for devkitARM and devkitPPC also require FreeImage, zlib, expat, and libusb. Again these are built as static libraries for ease of packaging but you can probably use the versions supplied by your distro. https://freeimage.sourceforge.net/ https://www.zlib.net https://www.libusb.org https://expat.sourceforge.net/ sudo apt-get install libfreeimage-dev zlib1g-dev libusb-dev libudev-dev libexpat1-dev Building gxtexconv for cube/wii needs GL/gl.h which can be obtained with sudo apt-get install mesa-common-dev Tools for devkitA64 require liblz4. http://lz4.github.io/lz4/ sudo apt-get install liblz4-dev The liblz4 with Ubuntu 14.04 isn't new enough. Either upgrade to at least 16.04 or build this from source. For building the OSX versions we install the Xcode commandline tools and build pkg-config from source as well as static versions of the libraries listed above. This helps keep the dependencies to a minimum so end users can use the tools with only Xcode command line tools to obtain make. To avoid having to manually answer prompts during the build the script will read variables from config.sh if it exists. Copy config.sh.sample to config.sh and set the variables as appropriate for your build. The script will download the source packages it needs. These will be downloaded to the script directory by default but you can set BUILD_DKPRO_SRCDIR if you want to put them somewhere else. When its finished you have the option to delete all temporary files, sources and their source packages. Building the devkits -------------------- Simply run the "build-devkit.sh" script in the same directory as this text file as shown below, then follow the prompts; ./build-devkit.sh Several examples tarballs are provided for the platforms supported by devkitARM & devkitPPC, these include basic templates for starting your own projects. See http://wiki.devkitpro.org/index.php/Getting_Started for links. Using devkitARM --------------- to use the built in crt0 and linkscript use arm-none-eabi-gcc to link your project Several specs files are built in for the various platforms -specs=gba.specs for a normal GBA cart image. -specs=gba_mb.specs for a GBA multiboot image. -specs=gba_er for an eReader GBA binary. -specs=ds_arm9 for a DS arm9 binary. -specs=ds_arm7 for a DS arm7 binary. -specs=ds_cart for a DS arm7 binary which runs from GBA cart. -specs=gp32.specs for standard GP32 app. -specs=gp32_gpsdk.specs for official gamepark SDK GP32 app. -specs=3dsx.specs for a 3DS homebrew binary. Using devkitPPC --------------- to use the built in crt0 and linkscript use powerpc-eabi-gcc to link your project, using the command line switch -mgcn for a bare bones system, -mogc to use libogc and the multi-threaded microkernel for gamecube, -mrvl for wii, -mwup for wii u. Getting started --------------- The best thing to do next is test the compiler, so grab an examples tarball from sourceforge & run make in the top level. Credits ------- * Thanks to WinterMute for bringing us devkitPro, the website is http://www.devkitpro.org * Build scripts written by WinterMute and tied together by GreenGianT * Thanks to Mr Spiv, Honkey Kong, Raleigh and JoostP for OS X testing * libctru by Smealum, YellowS8, fincs, mtheall & WinterMute with contributions from many others. * libogc written and supplied by Shagkur. Additional code by WinterMute, Bushing, Marcan & Tybor * libgba by WinterMute * libnds by Joat, Dovoto and WinterMute with contributions from many others. * dswifi by Sgstair * libfat by Chishm * libmirko by Mr Mirko * maxmod by eKid * b2fxec by Mr Spiv * scripts made BSD compatible by o2addict - irc.blitzed.org #gbadev, #dsdev, #wiidev forever!
sh build-devkit.sh
Please note, these scripts are provided as a courtesy, toolchains built with them
are for personal use only and may not be distributed by entities other than devkitPro.
See http://devkitpro.org/wiki/Trademarks
Users should use devkitPro pacman to maintain toolchain installations where possible
See https://devkitpro.org/wiki/devkitPro_pacman
Patches and improvements are of course welcome, please submit a PR
https://github.com/devkitPro/buildscripts/pulls
build-devkit.sh: 70: build-devkit.sh: function: not found
extracting -
tar: /-.tar.: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
Error extracting
I'm on Linux Mint, so no pacman for meeeeeeeeeeeeeeeeeeee
(Fine with me, i'm not installing another package manager JUST FOR YOU)
While Gamecube and Wii executables are largely static in terms of linking and memory, Wii U's executables are entirely position independent and are required to be.
In newlib's existing state, several functions (notably sprintf was tested) use jump tables with entries relative from it's own .rodata offset to the .text offset (ie target_jump_offset - jpt_rodata_offset). This does not work in an RPX since these relative offsets are never adjusted within RELA sections, and simply result in a prefetch abort.
One solution is to add -fno-jump-tables to dkppc/patches/newlib-2.0.0.patch, however this may have a performance impact on older systems and the Wii U. Optimally, the jump tables would just contain absolute addresses which are handled in the appropriate RELA sections, however I could not find any flags in GCC to do this.
-fno-jump-tables has been tested on hardware (source) and works through both loadiine and as an independent executable.
setting LIBNX_VER=2.2.0
attempts to download https://downloads.devkitpro.org/libnx-src-2.2.0.tar.bz2 which 404s. Probably related: libnx 2.2.0 release has no bz2 asset https://github.com/switchbrew/libnx/releases/tag/v2.2.0
The following archives seem to be missing:
$ curl -f -L -O https://downloads.devkitpro.org/binutils-2.34.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 272 0 272 0 0 425 0 --:--:-- --:--:-- --:--:-- 425
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
$ curl -f -L -O https://downloads.devkitpro.org/gcc-10.2.0.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 269 0 269 0 0 419 0 --:--:-- --:--:-- --:--:-- 419
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
Workaround: Manually download them from GNU before running build-devkit.sh
Hello, when I attempt to run the build script, I receive this error:
make[2]: Entering directory '/home/graffix/Downloads/buildscripts/.devkitARM/dfu-util-0.9.1/src'
CC main.o
In file included from main.c:36:0:
portable.h:32:3: error: #error "Can't get no sleep! Please report"
^
main.c: In function ‘main’:
main.c:430:3: warning: implicit declaration of function ‘milli_sleep’ [-Wimplicit-function-declaration]
milli_sleep(status.bwPollTimeout);
^
Makefile:392: recipe for target 'main.o' failed
make[2]: *** [main.o] Error 1
make[2]: Leaving directory '/home/graffix/Downloads/buildscripts/.devkitARM/dfu-util-0.9.1/src'
Makefile:349: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/graffix/Downloads/buildscripts/.devkitARM/dfu-util-0.9.1'
Makefile:289: recipe for target 'all' failed
make: *** [all] Error 2
error building dfu-util-0.9.1
Please advise.
Have a large project that prior to updating to the latest devkitPro release today from what was presumably GCC 8.2.0, I began experiencing a graphical regression related to the colors when compiling with GCC after updating.
My project has branch for GCC and another branch for Clang that I regularly switch between, and the issue is not present for Clang. As a result, I don't suspect it's an issue with libogc itself - but it's hard to narrow down.
I also tested on a Gamecube, and it outright crashes to the stack trace rather than displaying as Dolphin does. Unfortunately, I can't really show that, since my capture card is in a box somewhere and the TV itself is unreadable. This crash not occur for Clang, which renders on a Gamecube correctly.
Not sure I can really come up with a test case here, but figured I'd make note of it in case someone else runs into this.
Please consider a method that does not require SU authority to install in Linux user area.
I tried to change follows, I could install with user authority only.
[from]
if [ ! -z "$BUILD_DKPRO_INSTALLDIR" ] ; then
INSTALLDIR="$BUILD_DKPRO_INSTALLDIR"
else
echo
...
read -e INSTALLDIR
echo
fi
[to]
if [ ! -z "$BUILD_DKPRO_INSTALLDIR" ] ; then
export INSTALLDIR="$BUILD_DKPRO_INSTALLDIR"
else
echo
...
read -e INSTALLDIRH
export INSTALLDIR="$INSTALLDIRH"
echo
fi
[from]
install: all
@mkdir -p $(DESTDIR)/opt/devkitpro/devkitARM/arm-none-eabi/lib
@cp -v *.specs *.ld *.mem $(DESTDIR)/opt/devkitpro/devkitARM/arm-none-eabi/lib
@cp -rv thumb armv6k *.o $(DESTDIR)/opt/devkitpro/devkitARM/arm-none-eabi/lib
[to]
install: all
@mkdir -p $(INSTALLDIR)/devkitARM/arm-none-eabi/lib
@cp -v *.specs *.ld *.mem $(INSTALLDIR)/devkitARM/arm-none-eabi/lib
@cp -rv thumb armv6k *.o $(INSTALLDIR)/devkitARM/arm-none-eabi/lib
[from]
install:
@mkdir -p $(DESTDIR)/opt/devkitpro/devkitARM
@cp -v
[to]
install:
@mkdir -p $(INSTALLDIR)/devkitARM
@cp -v
[from]
install:
@cp -v
[to]
install:
@cp -v
Regards.
Trying to run this trivial 3DS program (which is a minimal modification to ctrulib's hello-world example) on actual hardware causes a crash:
#include <ios>
#include <iostream>
#include <cstdio>
#include <3ds.h>
int main(int argc, char **argv)
{
gfxInitDefault();
consoleInit(GFX_TOP, NULL);
try {
throw std::string("hi");
}catch(std::string a) {
std::cout << a << std::endl;
}
while (aptMainLoop())
{
hidScanInput();
u32 kDown = hidKeysDown();
if (kDown & KEY_START) break;
gfxFlushBuffers();
gfxSwapBuffers();
gspWaitForVBlank();
}
gfxExit();
return 0;
}
This program will print
terminate called after throwing an instance of 'std::string'
terminate called recursively
to the screen and then hang indefinitely.
The issue can be reproduced in the emulator Citra.
I consistently got an error "Building with plugin support requires a host that supports dlopen" when compiling binutils 2.27 from your distribution. I was able to get everything to work by updating to 2.27.90 from upstream (I still have it apply your opcodes patch).
The good news is I appear to have a working 64 bit toolchain on Sierra.
Thanks for this excellent project!
Which results in invalid C headers. I'll send a PR tomorrow.
(See also devkitPro/general-tools#2 )
I think I can make hem. I just need to know if it is ok.
I tried to modify my picodrive setup to use a current devkitARM. That however fails since ioctl is missing from sysbase, and I cannot do without it since a lot of system related stuff is using this.
.
I've been compiling DKP using this method:[edit: remove link to incredibly bogus build instructions] but after compiling for a while, it throws out errors. Is there any other dependencies that must be met for an "error-less" compile?
How have you been compiling DKP to run on Linux machines? I've been wanting to use DKP on ARM devices.
It seems like downloads.devkitpro.org doesn't contain this version of binutils, Shouldn't there be the way to download from another server such as ftp.gnu.org?
EDIT: Oh, yeah, here's the output:
> sudo ./build-devkit.sh
Please note, these scripts are provided as a courtesy, toolchains built with them
are for personal use only and may not be distributed by entities other than devkitPro.
See http://devkitpro.org/wiki/Trademarks
Users should use devkitPro pacman to maintain toolchain installations where possible
See https://devkitpro.org/wiki/devkitPro_pacman
Patches and improvements are of course welcome, please submit a PR
https://github.com/devkitPro/buildscripts/pulls
Looking for configuration file... Not found
Please select the toolchain you require
1: devkitARM (gba gp32 ds 3ds)
2: devkitPPC (gamecube wii wii-u)
3: devkitA64 (switch)
2
Please enter the directory where you would like 'devkitPPC' to be installed:
for mingw/msys you must use <drive>:/<install path> or you will have include path problems
this is the top level directory for devkitpro, i.e. e:/devkitPro
/usr/lib/devkitPro
which: no gnumake in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
use /usr/bin/gmake as make
Ready to install devkitPPC in /usr/lib/devkitPro/devkitPPC
press return to continue
binutils-2.17.tar.bz2
devkitppc-rules-1.0.0.tar.xz
binutils-2.34.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 272 0 272 0 0 106 0 --:--:-- 0:00:02 --:--:-- 106
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download binutils-2.34.tar.xz
Users were able to build the gba-examples on GCC 13.2 on macOS. I was one of them. I can no longer.
After updating to the latest devkitARM GCC 14.1, I experience this error when running make in the aforementioned project:
$ make
mbv2print.c
linking cartridge
/opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/14.1.0/../../../../arm-none-eabi/bin/ld: /opt/devkitpro/devkitARM/bin/../libexec/gcc/arm-none-eabi/14.1.0/liblto_plugin.so: error loading plugin: dlsym(0x9afe6050, _onload): symbol not found
collect2: error: ld returned 1 exit status
make[2]: *** [/Users/isaac/sources/gba-examples/mbv2/mbv2print/mbv2print.elf] Error 1
make[1]: *** [build] Error 2
make: *** [all] Error 1
This appears to be a regression.
This only happens on macOS. Within a Windows VM and a Linux VM I was unable to reproduce the issue.
Clone the linked examples and run make
.
'c. [email protected]
,xNMM. --------------------
.OMMMMo OS: macOS 14.4.1 23E224 arm64
OMMM0, Host: MacBookPro18,2
.;loddo:' loolloddol;. Kernel: 23.4.0
cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 2 days, 21 mins
.KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 493 (brew)
XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: zsh 5.9
;MMMMMMMMMMMMMMMMMMMMMMMM: Resolution: 2056x1329
:MMMMMMMMMMMMMMMMMMMMMMMM: DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX. WM: Quartz Compositor
kMMMMMMMMMMMMMMMMMMMMMMMMWd. WM Theme: Blue (Dark)
.XMMMMMMMMMMMMMMMMMMMMMMMMMMk Terminal: WarpTerminal
.XMMMMMMMMMMMMMMMMMMMMMMMMK. CPU: Apple M1 Max
kMMMMMMMMMMMMMMMMMMMMMMd GPU: Apple M1 Max
;KMMMMMMMWXXWMMMMMMMk. Memory: 8718MiB / 65536MiB
.cooc,. .,coo:.
Trying to download gdb-8.2.tar.xz
as required to build the devkitPPC toolchain from the latest release gives a 404 error. The starting URL is http://downloads.devkitpro.org/gdb-8.2.tar.xz
; after a number of redirects, https://github.com/devkitPro/buildscripts/releases/download/sources/gdb-8.2.tar.xz
is the one that throws the 404.
1: devkitARM (gba gp32 ds)
2: devkitPPC (gamecube wii)
3: devkitA64 (switch)
3
Please enter the directory where you would like 'devkitA64' to be installed:
for mingw/msys you must use :/ or you will have include path problems
this is the top level directory for devkitpro, i.e. e:/devkitPro
/usr/gitworkspace/devkitarm/devkitarm-bin/
which: no gnumake in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
use /usr/bin/gmake as make
Ready to install devkitA64 in /usr/gitworkspace/devkitarm/devkitarm-bin//devkitA64
press return to continue
binutils-2.31.1.tar.xz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download binutils-2.31.1.tar.xz
[root@host buildscripts]#
why?
https://github.com/devkitPro/buildscripts/blob/devkitARM_r46/README.TXT#L57
The link should be updated to this: http://devkitpro.org/wiki/Getting_Started
Thank you all for the good work!
buildscripts/dka64/patches/newlib-3.1.0.patch
Lines 8592 to 8594 in 0add4d1
buildscripts/dkppc/patches/newlib-3.3.0.patch
Lines 7169 to 7171 in 57ec7b6
buildscripts/dkarm-eabi/patches/newlib-3.1.0.patch
Lines 7261 to 7263 in 736db33
Pursuant to a heated conversation on an otherwise unrelated pull request elsewhere.
The files in this repository under dkarm-eabi/crtls
are included in devkitARM but have no license attached; as such, they assume the licensing conditions of the repository (none). For most of them, this is a curiosity since they never leave devkitARM, but it creates a complication in the case of the various crt0.s
files. Since these are linked into the work of anyone who compiles something with devkitARM, they need to be licensed such that it's legal to do that.
As I see it the solution is to clearly label these files with a license condition (presumably the same GPL-with-linking-exception license as libgcc) so as to be crystal clear that there's no legal trouble in using them.
Currently, there is no license. While the compiler and the libraries have a license, the scripts and rules do not. This is a problem, as without a license, it is not possible to package this up for easy installation. As it is right now, no rights whatsoever are granted to use any of the files.
Seems to be outdated, as the Wiki moved to https://devkitpro.org/wiki/
-fno-exceptions
has been removed from the Makefile, simply throwing any exception should be sufficient to cause this. I reproduced this bug on 5.1.0, after @rajkosto noted similar experiences in IRC.
Here is the code I used:
try
{
throw std::runtime_error("Test error");
}
catch (std::exception& e)
{
}
Running the homebrew as an NSO also has the same issue, however only the app freezes rather than the entire console. There is still no output however.
Hi,
Trying to run build-devkit.sh
on an Ubuntu 18.04.2 LTS 64bit, I get the following error:
Making all in argz
make[8]: se entra en el directorio '/home/gustavo/dev/buildscripts/.devkitARM/arm-none-eabi/newlib/arm-none-eabi/thumb/newlib/libc/argz'
arm-none-eabi-gcc -B/home/gustavo/dev/buildscripts/.devkitARM/arm-none-eabi/newlib/arm-none-eabi/thumb/newlib/ -isystem /home/gustavo/dev/buildscripts/.devkitARM/arm-none-eabi/newlib/arm-none-eabi/thumb/newlib/targ-include -isystem /home/gustavo/dev/buildscripts/.devkitARM/newlib-3.1.0/newlib/libc/include -B/home/gustavo/dev/buildscripts/.devkitARM/arm-none-eabi/newlib/arm-none-eabi/thumb/libgloss/arm -L/home/gustavo/dev/buildscripts/.devkitARM/arm-none-eabi/newlib/arm-none-eabi/thumb/libgloss/libnosys -L/home/gustavo/dev/buildscripts/.devkitARM/newlib-3.1.0/libgloss/arm -mthumb -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"3.1.0\" -DPACKAGE_STRING=\"newlib\ 3.1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I../../../../../../../newlib-3.1.0/newlib/libc/argz -fno-builtin -D__NO_SYSCALLS__ -D_COMPILING_NEWLIB -D__DYNAMIC_REENT__ -DREENTRANT_SYSCALLS_PROVIDED -D__DEFAULT_UTF8__ -ffunction-sections -fdata-sections -DHAVE_INIT_FINI -O2 -ffunction-sections -fdata-sections -mthumb -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '../../../../../../../newlib-3.1.0/newlib/libc/argz/'`dummy.c
Mensajes del ensamblador:
Error fatal: casilla -march= inválida: «armv4t»
Makefile:393: recipe for target 'lib_a-dummy.o' failed
make[8]: *** [lib_a-dummy.o] Error 1
make[8]: se sale del directorio '/home/gustavo/dev/buildscripts/.devkitARM/arm-none-eabi/newlib/arm-none-eabi/thumb/newlib/libc/argz'
I have installed all packages specified in the README.txt
file.
Any ideas?
Thanks.
Please see: devkitPro/libctru#138
Since the thread model is "single thread" for devkitARM, is -fno-threadsafe-statics
suitable for libstdc++ configure command line?
c:/devkitpro/devkitpsp/bin/../libexec/gcc/psp/4.6.2/
is duplicated, and c:/devkitpro/devkitpsp/bin
is not includes, thus collect2 can't find tools.
It disables to build https://github.com/173210/valentine-hbl.git, which invokes ld via GCC to use lto plugin.
The bug is confirmed on Windows, but not on Ubuntu.
COMPILER_PATH=c:/devkitpro/devkitpsp/lib/gcc/../../libexec/gcc/psp/4.6.2/;c:/devkitpro/devkitpsp/lib/gcc/../../libexec/gcc/;c:/devkitpro/devkitpsp/bin/../libexec/gcc/psp/4.6.2/;c:/devkitpro/devkitpsp/bin/../libexec/gcc/psp/4.6.2/;c:/devkitpro/devkitpsp/bin/../libexec/gcc/;c:/devkitpro/devkitpsp/bin/../lib/gcc/psp/4.6.2/../../../../psp/bin/;c:/devkitpro/devkitpsp/bin/../lib/gcc/psp/4.6.2/../../../../psp/bin/
Mixing std::cout
and printf should work fine as far as I know, yet it makes 3DS applications crash.
For example, take ctrulib's graphics/printing/hello-world example, and the line std::cout << "test" << std::endl;
after the second printf, so that you end up with
printf("\x1b[15;19HHello World!");
printf("\x1b[29;15HPress Start to exit.");
std::cout << "test" << std::endl;
Of course, the file main.c
should also be renamed to main.cpp
to compile this as C++ code. It can be observed that this code crashes, while it works when commenting out either the std::cout
line or the two printf
lines.
NOTE: I already tried explicitly setting std::cout.sync_with_stdio(true);
, which didn't help unfortunately.
NOTE2: This issue can be reproduced when running the application in Citra.
Greetings devkitPro team,
I thought for a while that I'd run into an esoteric bug with my project, but it seems this is more of a standard library issue with the newer GCC versions. For whatever reason, using iostream causes linker errors with devkitPro r46, and works fine with earlier revisions. The only other build I have lying around that works properly is r42, since my PikminDS project uses it.
I've attached the simplest possible example I could think of to reproduce the issue. Essentially, using iostream + cout compiles correctly as one might expect, but fails to link with the referenced error. Here's the full error output, I've attached a .zip file containing the full project folder. It's the example file from examples/nds/hello_world, modified to produce the error in question and stripped of everything non-essential.
$ make
main.cpp
arm-none-eabi-g++ -MMD -MP -MF /source/test/build/main.d -g -Wall -O2 -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -I/source/test/include -I/source/test/build -I/opt/devkitPro/libnds/include -I/source/test/build -DARM9 -fno-rtti -fno-exceptions -c /source/test/source/main.cpp -o main.o
linking test.elf
/opt/devkitPro/devkitARM/bin/../lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/lib/thumb/libstdc++.a(locale_init.o): In function `(anonymous namespace)::get_locale_mutex()':
(.text._ZN12_GLOBAL__N_116get_locale_mutexEv+0x6): undefined reference to `__sync_synchronize'
/opt/devkitPro/devkitARM/bin/../lib/gcc/arm-none-eabi/6.3.0/../../../../arm-none-eabi/lib/thumb/libstdc++.a(locale.o): In function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
(.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj+0x14): undefined reference to `__sync_synchronize'
collect2: error: ld returned 1 exit status
/opt/devkitPro/devkitARM/ds_rules:53: recipe for target '/source/test/test.elf' failed
make[1]: *** [/source/test/test.elf] Error 1
Makefile:94: recipe for target 'build' failed
make: *** [build] Error 2
I'm hoping there's something as simple as a compiler flag I can use in my project's makefile, but Google is not helping so far, I've tried a few things with no luck. Research suggests it's the standard library itself which needs to be recompiled without support for whatever it's trying to do with thread safety, but I won't pretend to be an expert on the subject.
This seems like the right place to report this, but if I'm mistaken my apologies, directions to the proper reporting location would be appreciated.
iostream-bug-r46.zip
Dear devkitPro-team,
due to two hard drive failures I lost my installed copy of devkitPro. In my archive I found a copy of devkitARM r45 and devkitPPC r28.
My problem is, that some of my projects (including my own build of mocha) fail to build with the most recent version (from a new setup) and also with my archived copy.
As I currently want to apply a modification to some of the projects and don‘t have the time to fix my development environment to work with the new devkitPro until I need the new build, I wanted to ask , if you still have a copy of
Thank you in advance
When downloading sources, the 20151213 buildscripts receive a 404 error when grabbing gcc-5.3.0.tar.bz2
http://downloads.sf.net/devkitpro/gcc-5.3.0.tar.bz2 does not exist.
Since there are no devkitPro packages available for Void Linux, I decided to build devkitPPC and devkitARM from source using these buildscripts and install them to /opt/mydevkitpro
. While devkitPPC compiled and installed successfully, devkitARM did not due to some of the build scripts assuming /opt/devkitpro
as the installation directory.
git clone https://github.com/devkitPro/buildscripts
cd buildscripts
build-devkit.sh
script. When it asks you to select a toolchain, enter 1
to build devkitARM. When it asks you to enter a directory where you would like to install it, type something OTHER than /opt/devkitpro
. For example, I chose /opt/mydevkitpro
.Makefile:5: /opt/mydevkitPro/devkitARM/base_rules: No such file or directory
make: *** No rule to make target '/opt/mydevkitPro/devkitARM/base_rules'. Stop.
Error building crtls & rules
It turns out that all of those *_rules
files actually got installed to /opt/devkitpro/devkitARM
instead of /opt/mydevkitpro/devkitARM
like they should have, so the Makefile is unable to find them.
devkitPPC is not affected by this bug, and I was able to compile install that into a directory of my choosing. I have not tried devkitA64.
Void Linux x86-64
GNU bash 5.2.2
GNU Make 4.4.1
GCC 12.2.0
After doing a simple grep, it appears that three files (.devkitARM/devkitarm-crtls-1.2.2/Makefile
, .devkitARM/devkitarm-rules-1.5.0/Makefile
and .devkitARM/devkitarm-rules-1.5.0/base_tools
) have this /opt/devkitpro
path hardcoded in them somewhere.
arm-none-eabi-gcc
throws no iconv implementation
error with -fexec-charset
option on MSYS2.
laqie@Surface MSYS ~/Projects/test
$ cat test.c
const char s[] = "ああ";
laqie@Surface MSYS ~/Projects/test
$ $DEVKITARM/bin/arm-none-eabi-gcc -S test.c -fexec-charset=sjis
cc1.exe: error: no iconv implementation, cannot convert from UTF-8 to sjis
MSYS2
laqie@Surface MSYS ~
$ uname -a
MSYS_NT-10.0-22631 Surface 3.4.10.x86_64 2024-04-08 18:11 UTC x86_64 Msys
laqie@Surface MSYS ~
$ pacman -Qs devkitarm
local/devkitARM r63-1 (gp32-dev gp2x-dev gba-dev nds-dev 3ds-dev)
Toolchain for gp2x, gp32, Nintendo gba, nds, dsi, (3)ds & switch homebrew development
local/devkitARM-gdb 14.1-1 (gp32-dev gba-dev nds-dev 3ds-dev)
gnu debugger for devkitARM
local/devkitarm-cmake 1.2.2-1 (gp32-dev gp2x-dev gba-dev nds-dev 3ds-dev)
CMake support files for devkitARM
local/devkitarm-crtls 1.2.4-1 (gba-dev gp32-dev nds-dev 3ds-dev)
devkitARM crtls.
local/devkitarm-rules 1.5.1-1
devkitARM build rules.
laqie@Surface MSYS ~
$ $DEVKITARM/bin/arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=C:\devkitPro\devkitARM\bin\arm-none-eabi-gcc.exe
COLLECT_LTO_WRAPPER=C:/devkitPro/devkitARM/bin/../libexec/gcc/arm-none-eabi/13.2.0/lto-wrapper.exe
Target: arm-none-eabi
Configured with: ../../gcc-13.2.0/configure --enable-languages=c,c++,objc,lto --with-gnu-as --with-gnu-ld --with-gcc --with-march=armv4t --enable-cxx-flags=-ffunction-sections --disable-libstdcxx-verbose --enable-poison-system-directories --enable-interwork --enable-multilib --enable-threads --disable-win32-registry --disable-nls --disable-debug --disable-libmudflap --disable-libssp --disable-libgomp --disable-libstdcxx-pch --enable-libstdcxx-time=yes --enable-libstdcxx-filesystem-ts --target=arm-none-eabi --with-newlib --with-headers=../../newlib-4.4.0.20231231/newlib/libc/include --prefix=/home/davem/projects/devkitpro/tool-packages/devkitARM/src/build/x86_64-w64-mingw32/devkitARM --enable-lto --disable-tm-clone-registry --disable-__cxa_atexit --with-bugurl=http://wiki.devkitpro.org/index.php/Bug_Reports --with-pkgversion='devkitARM release 63' --build=x86_64-unknown-linux-gnu --host=x86_64-w64-mingw32 --with-gmp=/opt/devkitpro/crosstools/x86_64-w64-mingw32 --with-mpfr=/opt/devkitpro/crosstools/x86_64-w64-mingw32 --with-mpc=/opt/devkitpro/crosstools/x86_64-w64-mingw32 --with-isl=/opt/devkitpro/crosstools/x86_64-w64-mingw32 --with-zstd=/opt/devkitpro/crosstools/x86_64-w64-mingw32
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (devkitARM release 63)
laqie@Surface MSYS ~
$ pacman -Qs iconv
local/libiconv 1.17-1 (libraries)
Libiconv is a conversion library
local/mingw-w64-x86_64-libiconv 1.17-4
Character encoding conversion library (mingw-w64)
laqie@Surface MSYS ~
$ which iconv
/usr/bin/iconv
laqie@Surface MSYS ~
$ iconv --version
iconv (GNU libiconv 1.17)
Copyright (C) 2000-2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Bruno Haible.
It works fine on WSL2.
laqieer@Surface:/mnt/c/Users/laqie/Projects/test$ cat test.c
const char s[] = "ああ";
laqieer@Surface:/mnt/c/Users/laqie/Projects/test$ $DEVKITARM/bin/arm-none-eabi-gcc -S test.c -fexec-charset=sjis
laqieer@Surface:/mnt/c/Users/laqie/Projects/test$ ls
test.c test.s
WSL2
laqieer@Surface:~$ uname -a
Linux Surface 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 GNU/Linux
laqieer@Surface:~$ dkp-pacman -Qs devkitarm
local/devkitARM r63-1 (gp32-dev gp2x-dev gba-dev nds-dev 3ds-dev)
Toolchain for gp2x, gp32, Nintendo gba, nds, dsi, (3)ds & switch homebrew development
local/devkitARM-gdb 14.1-2 (gp32-dev gba-dev nds-dev 3ds-dev)
gnu debugger for devkitARM
local/devkitarm-cmake 1.2.2-1 (gp32-dev gp2x-dev gba-dev nds-dev 3ds-dev)
CMake support files for devkitARM
local/devkitarm-crtls 1.2.4-1 (gba-dev gp32-dev nds-dev 3ds-dev)
devkitARM crtls.
local/devkitarm-rules 1.5.1-1
devkitARM build rules.
laqieer@Surface:~$ $DEVKITARM/bin/arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/opt/devkitpro/devkitARM/bin/../libexec/gcc/arm-none-eabi/13.2.0/lto-wrapper
Target: arm-none-eabi
Configured with: ../../gcc-13.2.0/configure --enable-languages=c,c++,objc,lto --with-gnu-as --with-gnu-ld --with-gcc --with-march=armv4t --enable-cxx-flags=-ffunction-sections --disable-libstdcxx-verbose --enable-poison-system-directories --enable-interwork --enable-multilib --enable-threads --disable-win32-registry --disable-nls --disable-debug --disable-libmudflap --disable-libssp --disable-libgomp --disable-libstdcxx-pch --enable-libstdcxx-time=yes --enable-libstdcxx-filesystem-ts --target=arm-none-eabi --with-newlib --with-headers=../../newlib-4.4.0.20231231/newlib/libc/include --prefix=/home/davem/projects/devkitpro/tool-packages/devkitARM/src/build/x86_64-linux-gnu/devkitARM --enable-lto --disable-tm-clone-registry --disable-__cxa_atexit --with-bugurl=http://wiki.devkitpro.org/index.php/Bug_Reports --with-pkgversion='devkitARM release 63' --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --with-gmp= --with-mpfr= --with-mpc= --with-isl= --with-zstd= --with-gmp=/opt/devkitpro/crosstools/x86_64-linux-gnu --with-mpfr=/opt/devkitpro/crosstools/x86_64-linux-gnu --with-mpc=/opt/devkitpro/crosstools/x86_64-linux-gnu --with-isl=/opt/devkitpro/crosstools/x86_64-linux-gnu --with-zstd=/opt/devkitpro/crosstools/x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (devkitARM release 63)
laqieer@Surface:~$ which iconv
/usr/bin/iconv
laqieer@Surface:~$ iconv --version
iconv (Debian GLIBC 2.31-13+deb11u9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.
Hello, I am using the most recent release, v20150216
, to build devkitArm
.
When it gets to compiling dfu-util
, I get the following error
In file included from main.c:34:0:
portable.h:17:17: fatal error: io.h: No such file or directory
# include <io.h>
I believe I have installed all of the dependencies, and have installed the dependencies from http://dfu-util.sourceforge.net/build.html
Here is my config.sh
for reference:
#!/bin/sh
BUILD_DKPRO_PACKAGE=1
BUILD_DKPRO_INSTALLDIR=/opt/devkitpro2
BUILD_DKPRO_AUTOMATED=1
Edit:
Seeing that the toolchain compiles fresh versions of gcc, I suspect that it might be a problem with the --libdir
and --includedir
for configuring dfu-util
, but was wondering if anyone else was experiencing this
Recently, the building of the libraries was removed from these buildscripts.
However, with them, the installation of the makefile rules was removed as well.
These rules, while easy to install manually, are an integral part of how this toolchain functions, as even without the "core" libraries, these are necessary to build anything with this toolchain.
They're still being downloaded in the buildscript, just never used.
Please consider including them in these buildscripts again, for the people building a minimal version of the toolchain on their own.
(And while you're at it, could you make the Makefile respect the PREFIX variable?)
../../../../binutils-2.22/bfd/doc/bfd.texinfo:325: unknown command `colophon'
../../../../binutils-2.22/bfd/doc/bfd.texinfo:336: unknown command `cygnus'
Makefile:421: recipe for target 'bfd.info' failed
make[3]: *** [bfd.info] Error 1
This seems to be a known issue in binutils, and fixed upstream.
https://sourceware.org/bugzilla/show_bug.cgi?id=15183
http://trac.clfs.org/ticket/926
... and lots more hits on Google, all with the same conclusion.
Buildscripts for devkitPPC r43 fail on FreeBSD 13.2-RELEASE/amd64 with:
devkitppc-rules-1.1.2.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404
Error: Failed to download devkitppc-rules-1.1.2.tar.gz
Filed here because:
I cannot use pacman because I am using FreeBSD.
I can, however, maintain or pass upstream a port when I get it working.
GCC and all other dependencies listed on the buildscripts readme are already packaged and working on FreeBSD.
I get this error message partway through running build-devkit.sh from the latest release.
dfu-util-0.9.1.tar.bz2
--2018-06-06 14:26:49-- https://downloads.devkitpro.org/dfu-util-0.9.1.tar.bz2
Resolving downloads.devkitpro.org (downloads.devkitpro.org)... 2400:cb00:2048:1::681c:e0c, 2400:cb00:2048:1::681c:f0c, 104.28.15.12, ...
Connecting to downloads.devkitpro.org (downloads.devkitpro.org)|2400:cb00:2048:1::681c:e0c|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/devkitPro/buildscripts/releases/download/sources/dfu-util-0.9.1.tar.bz2 [following]
--2018-06-06 14:26:49-- https://github.com/devkitPro/buildscripts/releases/download/sources/dfu-util-0.9.1.tar.bz2
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-06-06 14:26:49 ERROR 404: Not Found.
Error: Failed to download dfu-util-0.9.1.tar.bz2
Obviously all the files before this one were successfully downloaded.
.
The build script is failing to compile GDB 8.0 because of a recent change in the Python API since 3.7.
../../../gdb-8.0/gdb/python/python.c: In function ‘bool do_start_initialization()’:
../../../gdb-8.0/gdb/python/python.c:1584:45: error: too few arguments to function ‘int _PyImport_FixupBuiltin(PyObject*, const char*, PyObject*)’
_PyImport_FixupBuiltin (gdb_module, "_gdb");
^
In file included from /usr/include/python3.7m/Python.h:126,
from ../../../gdb-8.0/gdb/python/python-internal.h:94,
from ../../../gdb-8.0/gdb/python/python.c:94:
/usr/include/python3.7m/import.h:115:17: note: declared here
PyAPI_FUNC(int) _PyImport_FixupBuiltin(
^~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:1914: python.o] Error 1
make[2]: Leaving directory '/home/arch-linux-user/.cache/makepkg/devkitarm/src/buildscripts/.devkitARM/arm-none-eabi/gdb/gdb'
make[1]: *** [Makefile:9126: all-gdb] Error 2
make[1]: Leaving directory '/home/arch-linux-user/.cache/makepkg/devkitarm/src/buildscripts/.devkitARM/arm-none-eabi/gdb'
make: *** [Makefile:849: all] Error 2
Error building gdb
[arch-linux-user@arch-linux-host devkitarm]$ pacman -Q python
python 3.7.0-3
[arch-linux-user@arch-linux-host devkitarm]$
GDB upstream has fixed this since 8.1 however this toolchain uses 8.0, thus the GDB patches will need to be modified to include this fix.
See this link for details:
https://bugzilla.redhat.com/show_bug.cgi?id=1577396
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.