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

Build error #5

Open
MrHuu opened this issue Jul 19, 2019 · 6 comments
Open

Build error #5

MrHuu opened this issue Jul 19, 2019 · 6 comments

Comments

@MrHuu
Copy link

MrHuu commented Jul 19, 2019

When i try to compile CECTool, i get an error:

mrhuu@mrhuu-VirtualBox:~/SharedFolder/DevEnvironment/_GIT/cectool$ make
import.cpp
arm-none-eabi-g++ -MMD -MP -MF /home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/build/import.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffunction-sections -Wno-psabi -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/common -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/3ds/services -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/streetpass -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/tests -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/tests/files -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/tests/functions -I/opt/devkitpro/libctru/include -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/build -DARM11 -D_3DS -fno-rtti -fno-exceptions -std=c++17 -c /home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/source/import.cpp -o import.o 
create.cpp
arm-none-eabi-g++ -MMD -MP -MF /home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/build/create.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffunction-sections -Wno-psabi -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/common -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/3ds/services -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/streetpass -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/tests -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/tests/files -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/tests/functions -I/opt/devkitpro/libctru/include -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/build -DARM11 -D_3DS -fno-rtti -fno-exceptions -std=c++17 -c /home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/source/create.cpp -o create.o 
open.cpp
arm-none-eabi-g++ -MMD -MP -MF /home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/build/open.d -g -Wall -O2 -mword-relocations -fomit-frame-pointer -ffunction-sections -Wno-psabi -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/common -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/3ds/services -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/streetpass -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/tests -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/tests/files -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/include/tests/functions -I/opt/devkitpro/libctru/include -I/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/build -DARM11 -D_3DS -fno-rtti -fno-exceptions -std=c++17 -c /home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/source/open.cpp -o open.o 
/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/source/open.cpp: In function 'void openBox(Streetpass::StreetpassManager&, u8)':
/home/mrhuu/SharedFolder/DevEnvironment/_GIT/cectool/source/open.cpp:47:56: error: conversion from 'std::shared_ptr<Streetpass::MBox>' to non-scalar type 'std::unique_ptr<Streetpass::MBox>' requested
     std::unique_ptr<Streetpass::MBox> mbox = sm.OpenBox(slotNum);
                                              ~~~~~~~~~~^~~~~~~~~
/opt/devkitpro/devkitARM/base_rules:79: recipe for target 'open.o' failed
make[1]: *** [open.o] Error 1
Makefile:174: recipe for target 'all' failed
make: *** [all] Error 2

Using the latest available DevkitPro and ctrulib.

I know this is still a POC, but at least it should be able to build correctly i assume. Am i missing something?

Thanks in advance.

@MrHuu
Copy link
Author

MrHuu commented Jul 28, 2019

Compile Fix #6 still gives me a few linking errors:

mrhuu@mrhuu-VirtualBox:~/_GIT/CECTool$ make
linking CECTool.elf
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: Delete.o: in function `displayDeleteMenu(Streetpass::StreetpassManager&)':
/home/mrhuu/_GIT/CECTool/source/delete.cpp:6: multiple definition of `displayDeleteMenu(Streetpass::StreetpassManager&)'; delete.o:/home/mrhuu/_GIT/CECTool/source/delete.cpp:6: first defined here
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: Delete.o: in function `displayDeleteSlotSelection(Streetpass::StreetpassManager&, unsigned char)':
/home/mrhuu/_GIT/CECTool/source/delete.cpp:16: multiple definition of `displayDeleteSlotSelection(Streetpass::StreetpassManager&, unsigned char)'; delete.o:/home/mrhuu/_GIT/CECTool/source/delete.cpp:16: first defined here
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: Delete.o: in function `deleteBox(Streetpass::StreetpassManager&, unsigned char)':
/home/mrhuu/_GIT/CECTool/source/delete.cpp:65: multiple definition of `deleteBox(Streetpass::StreetpassManager&, unsigned char)'; delete.o:/home/mrhuu/_GIT/CECTool/source/delete.cpp:65: first defined here
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: Delete.o: in function `deleteAllBoxes(Streetpass::StreetpassManager&)':
/home/mrhuu/_GIT/CECTool/source/delete.cpp:88: multiple definition of `deleteAllBoxes(Streetpass::StreetpassManager&)'; delete.o:/home/mrhuu/_GIT/CECTool/source/delete.cpp:88: first defined here
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: Delete.o: in function `deleteMenu(Streetpass::StreetpassManager&)':
/home/mrhuu/_GIT/CECTool/source/delete.cpp:27: multiple definition of `deleteMenu(Streetpass::StreetpassManager&)'; delete.o:/home/mrhuu/_GIT/CECTool/source/delete.cpp:27: first defined here
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: Open.o: in function `displayOpenMenu(Streetpass::StreetpassManager&, unsigned char)':
/home/mrhuu/_GIT/CECTool/source/open.cpp:9: multiple definition of `displayOpenMenu(Streetpass::StreetpassManager&, unsigned char)'; open.o:/home/mrhuu/_GIT/CECTool/source/open.cpp:9: first defined here
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: Open.o: in function `openBox(Streetpass::StreetpassManager&, unsigned char)':
/home/mrhuu/_GIT/CECTool/source/open.cpp:45: multiple definition of `openBox(Streetpass::StreetpassManager&, unsigned char)'; open.o:/home/mrhuu/_GIT/CECTool/source/open.cpp:45: first defined here
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: Open.o: in function `openMenu(Streetpass::StreetpassManager&)':
/home/mrhuu/_GIT/CECTool/source/open.cpp:19: multiple definition of `openMenu(Streetpass::StreetpassManager&)'; open.o:/home/mrhuu/_GIT/CECTool/source/open.cpp:19: first defined here
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: tests.o: in function `Tests::RunAllFunctionTests()':
/home/mrhuu/_GIT/CECTool/source/tests/tests.cpp:103: undefined reference to `Tests::Delete::Delete(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/mrhuu/_GIT/CECTool/source/tests/tests.cpp:104: undefined reference to `Tests::Delete::RunTest()'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/mrhuu/_GIT/CECTool/source/tests/tests.cpp:138: undefined reference to `Tests::Open::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/9.1.0/../../../../arm-none-eabi/bin/ld: /home/mrhuu/_GIT/CECTool/source/tests/tests.cpp:139: undefined reference to `Tests::Open::RunTest()'
collect2: error: ld returned 1 exit status
/opt/devkitpro/devkitARM/3ds_rules:41: recipe for target '/home/mrhuu/_GIT/CECTool/CECTool.elf' failed
make[1]: *** [/home/mrhuu/_GIT/CECTool/CECTool.elf] Error 1
Makefile:174: recipe for target 'all' failed
make: *** [all] Error 2

@NarcolepticK
Copy link
Contributor

I'm not quite sure at this moment. It compiles clean for me and I can boot it in Citra. I am on arch linux.

Did you try running "make clean" before running "make"?

I'm still getting my dev environment back up and running. I will be looking over the code more thoroughly soon. I have a brain injury from a car accident and the recovery hasn't been smooth and linear.

I hope we can get this figured out for you.

@MrHuu
Copy link
Author

MrHuu commented Jul 28, 2019

I'm running Ubuntu 18.04 LTS in VirtualBox for windows.

I've setup DevkitPro using dkp-pacman.

First made sure the environment is up-to-date.

dkp-pacman -Sy
dkp-pacman -Su

Then build the target.

make clean
make

No worries my friend, i really do appreciate the research / work you guys have done. Hope your recovery improves soon.

@NarcolepticK
Copy link
Contributor

I happened to have a Win10 machine(not great but was given for free), that I installed virtualbox onto. I grabbed and installed the Ubuntu 64bit 18.04.2 LTS server image. Here's what I did to have it compile.

I retrieved the dkp-pacman deb:
wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb
Installed:
sudo dpkg -i devkitpro-pacman.deb
Updated:
sudo dkp-pacman -Sy
sudo dkp-pacman -Su
Installed 3ds-dev:
sudo dkp-pacman -S 3ds-dev
Exported variables:
export DEVKITPRO=/opt/devkitpro
export DEVKITARM=${DEVKITPRO}/devkitARM
export DEVKITPPC=${DEVKITPRO}/devkitPPC
export PATH=${DEVKITPRO}/tools/bin:$PATH
I needed to install make:
sudo apt install make
I then git cloned:
git clone https://github.com/NarcolepticK/CECTool.git
I had to checkout compile-fix:
cd CECTool
git checkout compile-fix
And finally ran make:
make
It successfully compiled and linked. I did not test the produced 3dsx.

Let me know if any of this works for you.

@MrHuu
Copy link
Author

MrHuu commented Jul 29, 2019

Ok, got it to compile. Those where the exact same steps i already did beforehand. Except i mounted a shared folder and ran it from there.

Seems it didn't like the shared folder '_GIT' i used. Moved it to a local folder and it compiles fine.

Thanks for your efforts @NarcolepticK , best of luck to you.

As soon as the fix is merged, this issue can be closed

@NarcolepticK
Copy link
Contributor

Awesome. Thanks. No problem. I am glad it is working for you. Take care.

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

2 participants