Dolphin, the GameCube and Wii emulator - Forums
Asahi Linux CMake Error - Printable Version

+- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org)
+-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support)
+--- Forum: Support (https://forums.dolphin-emu.org/Forum-support)
+--- Thread: Asahi Linux CMake Error (/Thread-asahi-linux-cmake-error)



Asahi Linux CMake Error - Stoked1020 - 06-28-2023

Hey Y'all,
I've been trying to get Dolphin to run on the Linux side of my m1 MacBook Air (Games run great on the MacOS but... can't connect Wiimotes).
After entering "cmake .." I keep running into the same error:

CMake Error at Externals/zlib-ng/CMakeLists.txt:7 (add_subdirectory):
The source directory

/home/user/dolphin/Externals/zlib-ng/zlib-ng

does not contain a CMakeLists.txt file.


CMake Error at Externals/zlib-ng/CMakeLists.txt:14 (add_library):
add_library cannot create ALIAS target "ZLIB::ZLIB" because target "zlib"
does not already exist.

Any ideas? do I need to find an older build?


RE: Asahi Linux CMake Error - JosJuice - 06-28-2023

You probably didn't initialize the submodules: git submodule update --init


RE: Asahi Linux CMake Error - Stoked1020 - 06-28-2023

(06-28-2023, 03:45 AM)JosJuice Wrote: You probably didn't initialize the submodules: git submodule update --init

Doh! Right you are...that fix that problem and now I am met with a new error:

Code:
error: too many arguments to function ‘void mbedtls_rsa_init(mbedtls_rsa_context*)’
397 |     mbedtls_rsa_init(&rsa, MBEDTLS_RSA_PKCS_V15, 0);
    |     ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/paul/dolphin/Source/Core/Core/IOS/IOSC.cpp:16:
/usr/include/mbedtls/rsa.h:145:6: note: declared here
145 | void mbedtls_rsa_init(mbedtls_rsa_context *ctx);
    |      ^~~~~~~~~~~~~~~~
/home/paul/dolphin/Source/Core/Core/IOS/IOSC.cpp:400:34: error: ‘mbedtls_rsa_context’ {aka ‘struct mbedtls_rsa_context’} has no member named ‘N’
400 |     mbedtls_mpi_read_binary(&rsa.N, entry->data.data(), entry->data.size());
    |                                  ^
/home/paul/dolphin/Source/Core/Core/IOS/IOSC.cpp:401:34: error: ‘mbedtls_rsa_context’ {aka ‘struct mbedtls_rsa_context’} has no member named ‘E’
401 |     mbedtls_mpi_read_binary(&rsa.E, reinterpret_cast<const u8*>(&entry->misc_data), 4);
    |                                  ^
/home/paul/dolphin/Source/Core/Core/IOS/IOSC.cpp:402:9: error: ‘mbedtls_rsa_context’ {aka ‘struct mbedtls_rsa_context’} has no member named ‘len’
402 |     rsa.len = entry->data.size();
    |         ^~~
/home/paul/dolphin/Source/Core/Core/IOS/IOSC.cpp:404:64: error: ‘MBEDTLS_RSA_PUBLIC’ was not declared in this scope; did you mean ‘MBEDTLS_RSA_C’?
404 |     int ret = mbedtls_rsa_pkcs1_verify(&rsa, nullptr, nullptr, MBEDTLS_RSA_PUBLIC, MBEDTLS_MD_SHA1,



RE: Asahi Linux CMake Error - KHg8m3r - 06-28-2023

Try clearing your build folder and starting with a fresh "cmake .."?

Otherwise it should be pulling the mbedtls library from Externals and that should work. Unless something with Asahi may have a mbedtls package that's interfering with the Externals library, in which case you may need to force the Externals (or force to use your system package if Externals isn't working for Asahi)?


RE: Asahi Linux CMake Error - Stoked1020 - 06-28-2023

Tried starting fresh and got the same error message. I tried switching to using the .git package from the wiki page and it says pacman failed to install dependencies (including enet which I already manually installed ?). Is there a dummy proof way to install on Asahi?


RE: Asahi Linux CMake Error - Stoked1020 - 06-28-2023

(06-28-2023, 09:14 AM)KHg8m3r Wrote: Try clearing your build folder and starting with a fresh "cmake .."?

Otherwise it should be pulling the mbedtls library from Externals and that should work. Unless something with Asahi may have a mbedtls package that's interfering with the Externals library, in which case you may need to force the Externals (or force to use your system package if Externals isn't working for Asahi)?

How would I “force the Externals”?