Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to build standalone for 3ds and wii #1755

Closed
Ntemis opened this issue May 16, 2020 · 15 comments
Closed

Not able to build standalone for 3ds and wii #1755

Ntemis opened this issue May 16, 2020 · 15 comments

Comments

@Ntemis
Copy link

Ntemis commented May 16, 2020

demetris@demetris-TA770E3:~/mgba/build$ cmake -DCMAKE_TOOLCHAIN_FILE=/home/demetris/mgba/src/platform/3ds/CMakeToolchain.txt ..
-- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1
-- Check for working C compiler: /usr/bin/arm-none-eabi-gcc
-- Check for working C compiler: /usr/bin/arm-none-eabi-gcc -- broken
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler

"/usr/bin/arm-none-eabi-gcc"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/demetris/mgba/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_7fbe7/fast"
/usr/bin/make -f CMakeFiles/cmTC_7fbe7.dir/build.make CMakeFiles/cmTC_7fbe7.dir/build
make[1]: Entering directory '/home/demetris/mgba/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_7fbe7.dir/testCCompiler.c.obj
/usr/bin/arm-none-eabi-gcc -DARM11 -D_3DS  -I/opt/devkitpro/libctru/include -march=armv6k -mtune=mpcore -mfloat-abi=hard -ffunction-sections -mword-relocations    -o CMakeFiles/cmTC_7fbe7.dir/testCCompiler.c.obj   -c /home/demetris/mgba/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_7fbe7
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7fbe7.dir/link.txt --verbose=1
/usr/bin/arm-none-eabi-gcc -I/opt/devkitpro/libctru/include -march=armv6k -mtune=mpcore -mfloat-abi=hard -ffunction-sections -mword-relocations   -L/opt/devkitpro/libctru/lib -lctru -specs=3dsx.specs -march=armv6k -mtune=mpcore -mfloat-abi=hard -ffunction-sections -Wl,--gc-sections  CMakeFiles/cmTC_7fbe7.dir/testCCompiler.c.obj  -o cmTC_7fbe7 
arm-none-eabi-gcc: error: 3dsx.specs: No such file or directory
CMakeFiles/cmTC_7fbe7.dir/build.make:97: recipe for target 'cmTC_7fbe7' failed
make[1]: *** [cmTC_7fbe7] Error 1
make[1]: Leaving directory '/home/demetris/mgba/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_7fbe7/fast' failed
make: *** [cmTC_7fbe7/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:10 (project)

-- Configuring incomplete, errors occurred!
See also "/home/demetris/mgba/build/CMakeFiles/CMakeOutput.log".
See also "/home/demetris/mgba/build/CMakeFiles/CMakeError.log".

@endrift
Copy link
Member

endrift commented May 16, 2020

Did you forget to install libctru?

@Ntemis
Copy link
Author

Ntemis commented May 16, 2020

I have latest development tools installed with dkp-pacman

@endrift
Copy link
Member

endrift commented May 16, 2020

It's definitely not using the right gcc, that's the system version. What's the output of which arm-none-eabi-gcc? And if it's /usr/bin/arm-none-eabi-gcc, what's the value of $PATH?

@Ntemis
Copy link
Author

Ntemis commented May 16, 2020

demetris@demetris-TA770E3:~$ sudo dkp-pacman -S 3ds-dev
:: There are 13 members in group 3ds-dev:
:: Repository dkp-libs

  1. 3ds-examples 2) citro2d 3) citro3d 4) devkitarm-crtls 5) devkitarm-rules 6) libctru
    :: Repository dkp-linux
  2. 3dslink 8) 3dstools 9) devkit-env 10) devkitARM 11) general-tools 12) picasso 13) tex3ds

Enter a selection (default=all):
warning: 3ds-examples-20200417-2 is up to date -- reinstalling
warning: citro2d-1.3.0-1 is up to date -- reinstalling
warning: citro3d-1.6.0-1 is up to date -- reinstalling
warning: devkitarm-crtls-1.0.3-1 is up to date -- reinstalling
warning: devkitarm-rules-1.0.0-1 is up to date -- reinstalling
warning: libctru-1.8.0-1 is up to date -- reinstalling
warning: 3dslink-0.5.2-2 is up to date -- reinstalling
warning: 3dstools-1.1.4-2 is up to date -- reinstalling
warning: devkit-env-1.0.1-2 is up to date -- reinstalling
warning: devkitARM-r54-3 is up to date -- reinstalling
warning: general-tools-1.0.3-1 is up to date -- reinstalling
warning: picasso-2.7.0-1 is up to date -- reinstalling
warning: tex3ds-2.0.1-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (13) 3ds-examples-20200417-2 3dslink-0.5.2-2 3dstools-1.1.4-2 citro2d-1.3.0-1 citro3d-1.6.0-1 devkit-env-1.0.1-2 devkitARM-r54-3 devkitarm-crtls-1.0.3-1
devkitarm-rules-1.0.0-1 general-tools-1.0.3-1 libctru-1.8.0-1 picasso-2.7.0-1 tex3ds-2.0.1-2

Total Installed Size: 298,88 MiB
Net Upgrade Size: 0,00 MiB

:: Proceed with installation? [Y/n]

@Ntemis
Copy link
Author

Ntemis commented May 16, 2020

demetris@demetris-TA770E3:~$ which arm-none-eabi-gcc
/usr/bin/arm-none-eabi-gcc

@endrift
Copy link
Member

endrift commented May 16, 2020

And the value of $PATH?

@Ntemis
Copy link
Author

Ntemis commented May 16, 2020

demetris@demetris-TA770E3:~$ printf "%s\n" $PATH
/home/demetris/.local/bin:/opt/devkitpro/tools/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

@endrift
Copy link
Member

endrift commented May 16, 2020

I'm assuming the answer is yes, but does /opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc exist? This may be an issue with how I have CMake searching for paths. CMake can be really opaque sometimes.

@Ntemis
Copy link
Author

Ntemis commented May 16, 2020

demetris@demetris-TA770E3:~$ ls /opt/devkitpro/devkitARM/bin/

arm-none-eabi-ar         arm-none-eabi-elfedit     arm-none-eabi-gcc-nm      arm-none-eabi-gdb            arm-none-eabi-lto-dump  arm-none-eabi-readelf
arm-none-eabi-as         arm-none-eabi-g++         arm-none-eabi-gcc-ranlib  arm-none-eabi-gdb-add-index  arm-none-eabi-nm        arm-none-eabi-run
arm-none-eabi-c++        arm-none-eabi-gcc         arm-none-eabi-gcov        arm-none-eabi-gprof          arm-none-eabi-objcopy   arm-none-eabi-size
arm-none-eabi-c++filt    arm-none-eabi-gcc-10.1.0  arm-none-eabi-gcov-dump   arm-none-eabi-ld             arm-none-eabi-objdump   arm-none-eabi-strings

@Ntemis
Copy link
Author

Ntemis commented May 16, 2020

@endrift
Copy link
Member

endrift commented May 16, 2020

You can use triple-backticks around lines to make them code blocks.

Anyway, I've managed to reproduce the issue on my end and will look into it further.

@Ntemis
Copy link
Author

Ntemis commented May 17, 2020

good news, thanks

@endrift
Copy link
Member

endrift commented May 17, 2020

You will need to delete your CMakeCache.txt before you can try again

@Ntemis
Copy link
Author

Ntemis commented May 17, 2020

now it complains about this:
[ 96%] Linking C executable mgba.elf
[ 96%] Built target mgba.elf
Scanning dependencies of target mgba.3dsx
[ 97%] Generating mgba.xml
[ 97%] Generating mgba.smdh
/bin/sh: 1: BANNERTOOL-NOTFOUND: not found
3ds/CMakeFiles/mgba.3dsx.dir/build.make:66: recipe for target '3ds/mgba.smdh' failed
make[2]: *** [3ds/mgba.smdh] Error 127
CMakeFiles/Makefile2:718: recipe for target '3ds/CMakeFiles/mgba.3dsx.dir/all' failed
make[1]: *** [3ds/CMakeFiles/mgba.3dsx.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

@autofire372
Copy link

You need to install bannertool. You should also install makerom from Project_CTR so the cia builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants