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

Can't build dsptester #50

Open
Midnoclose opened this issue Jan 8, 2022 · 6 comments
Open

Can't build dsptester #50

Midnoclose opened this issue Jan 8, 2022 · 6 comments

Comments

@Midnoclose
Copy link

I get this output:

cdc.bin
main.cpp
/home/midnoclose/Development/teakra/hwtest/dsptester/source/main.cpp:14:10: fatal error: ../../src/test.h: No such file or directory
   14 | #include "../../src/test.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/opt/devkitpro/devkitARM/base_rules:80: main.o] Error 1
make: *** [Makefile:101: build] Error 2

@wwylele
Copy link
Owner

wwylele commented Jan 8, 2022

This include is meant to refer to this file: https://github.com/wwylele/teakra/blob/master/src/test.h (a shared header between the main project and the 3DS program)

Is your current directory /home/midnoclose/Development/teakra/hwtest/dsptester/ ? I would expect it to work. If it doesn't, you can copy the file to the source directory and change that line to #include "test.h"

@Midnoclose
Copy link
Author

That is my current directory, I'll try to copy the file when i get the chance.

@Midnoclose
Copy link
Author

Output:

cdc.bin
main.cpp
In file included from /home/midnoclose/Development/teakra/hwtest/dsptester/source/main.cpp:14:
/home/midnoclose/Development/teakra/hwtest/dsptester/source/test.h:30:20: error: 'is_trivially_copyable_v' is not a member of 'std'; did you mean 'is_trivially_copyable'?
   30 | static_assert(std::is_trivially_copyable_v<State>);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~
      |                    is_trivially_copyable
/home/midnoclose/Development/teakra/hwtest/dsptester/source/test.h:30:49: error: expected primary-expression before '>' token
   30 | static_assert(std::is_trivially_copyable_v<State>);
      |                                                 ^
/home/midnoclose/Development/teakra/hwtest/dsptester/source/test.h:30:50: error: expected primary-expression before ')' token
   30 | static_assert(std::is_trivially_copyable_v<State>);
      |                                                  ^
/home/midnoclose/Development/teakra/hwtest/dsptester/source/test.h:38:20: error: 'is_trivially_copyable_v' is not a member of 'std'; did you mean 'is_trivially_copyable'?
   38 | static_assert(std::is_trivially_copyable_v<TestCase>);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~
      |                    is_trivially_copyable
/home/midnoclose/Development/teakra/hwtest/dsptester/source/test.h:38:52: error: expected primary-expression before '>' token
   38 | static_assert(std::is_trivially_copyable_v<TestCase>);
      |                                                    ^
/home/midnoclose/Development/teakra/hwtest/dsptester/source/test.h:38:53: error: expected primary-expression before ')' token
   38 | static_assert(std::is_trivially_copyable_v<TestCase>);
      |                                                     ^
/home/midnoclose/Development/teakra/hwtest/dsptester/source/main.cpp: In function 'void FlushCache(void*, u32)':
/home/midnoclose/Development/teakra/hwtest/dsptester/source/main.cpp:172:50: error: invalid conversion from 'void*' to 'u32' {aka 'long unsigned int'} [-fpermissive]
  172 |     svcFlushProcessDataCache(CUR_PROCESS_HANDLE, ptr, size);
      |                                                  ^~~
      |                                                  |
      |                                                  void*
In file included from /opt/devkitpro/libctru/include/3ds.h:15,
                 from /home/midnoclose/Development/teakra/hwtest/dsptester/source/main.cpp:4:
/opt/devkitpro/libctru/include/3ds/svc.h:1231:53: note:   initializing argument 2 of 'Result svcFlushProcessDataCache(Handle, u32, u32)'
 1231 | Result svcFlushProcessDataCache(Handle process, u32 addr, u32 size);
      |                                                 ~~~~^~~~
/home/midnoclose/Development/teakra/hwtest/dsptester/source/main.cpp: In function 'void InvalidateCache(void*, u32)':
/home/midnoclose/Development/teakra/hwtest/dsptester/source/main.cpp:176:55: error: invalid conversion from 'void*' to 'u32' {aka 'long unsigned int'} [-fpermissive]
  176 |     svcInvalidateProcessDataCache(CUR_PROCESS_HANDLE, ptr, size);
      |                                                       ^~~
      |                                                       |
      |                                                       void*
In file included from /opt/devkitpro/libctru/include/3ds.h:15,
                 from /home/midnoclose/Development/teakra/hwtest/dsptester/source/main.cpp:4:
/opt/devkitpro/libctru/include/3ds/svc.h:1215:58: note:   initializing argument 2 of 'Result svcInvalidateProcessDataCache(Handle, u32, u32)'
 1215 | Result svcInvalidateProcessDataCache(Handle process, u32 addr, u32 size);
      |                                                      ~~~~^~~~
make[1]: *** [/opt/devkitpro/devkitARM/base_rules:80: main.o] Error 1
make: *** [Makefile:101: build] Error 2

@wwylele
Copy link
Owner

wwylele commented Jan 11, 2022

  1. Change the flag here to c++17
  2. add (u32)addr to all places where it reports invalid conversion from 'void*' to 'u32'. There was a incompatible libctru update.

@wwylele
Copy link
Owner

wwylele commented Jan 22, 2022

Did the suggestion work for you?

@Midnoclose
Copy link
Author

Changing #include "../../src/test.h" to #include "../../../src/test.h"
and adding (u32)addr to where it needed to be worked and I was able to compile the software

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