HamletDuFromage / slippi-online-PKGBUILD

GNU General Public License v2.0
1 stars 1 forks source link

Change dependency from mbedtls to mbedtls2 #2

Closed SirToffski closed 1 year ago

SirToffski commented 1 year ago

Arch has updated mbedtls version to 3.4.0. Version 2.28.3 is now a separate package mbedtls2. This is the package that slippi dolphin depends on for build and runtime.

--- PKGBUILD.old        2023-05-28 15:37:19.940532467 -0300
+++ PKGBUILD.new        2023-05-28 15:38:26.840782806 -0300
@@ -14,7 +14,7 @@
 license=('GPL2')
 depends=(
        'alsa-lib' 'bluez-libs' 'enet' 'hidapi' 'libevdev' 'libgl' 'libpng'
-       'libpulse' 'libx11' 'libxi' 'libxrandr' 'lzo' 'mbedtls' 'pugixml' 'qt5-base'
+       'libpulse' 'libx11' 'libxi' 'libxrandr' 'lzo' 'mbedtls2' 'pugixml' 'qt5-base'
        'sfml' 'zlib' 'webkit2gtk'
        'libavcodec.so' 'libavformat.so' 'libavutil.so' 'libcurl.so'
        'libminiupnpc.so' 'libswscale.so' 'libudev.so' 'libusb-1.0.so'
HamletDuFromage commented 1 year ago

Won't compile on my machine

/home/[redacted]/Documents/Ishiiruka/Source/Core/Core/Movie.cpp:9:10: fatal error: mbedtls/config.h: No such file or directory
    9 | #include <mbedtls/config.h>
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Source/Core/Core/CMakeFiles/core.dir/build.make:272: Source/Core/Core/CMakeFiles/core.dir/Movie.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/[redacted]/Documents/Ishiiruka/Source/Core/Core/IPC_HLE/WII_Socket.h:57,
                 from /home/[redacted]/Documents/Ishiiruka/Source/Core/Core/Core.cpp:59:
/home/[redacted]/Documents/Ishiiruka/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h:12:10: fatal error: mbedtls/net.h: No such file or directory
   12 | #include <mbedtls/net.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Source/Core/Core/CMakeFiles/core.dir/build.make:152: Source/Core/Core/CMakeFiles/core.dir/Core.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1206: Source/Core/Core/CMakeFiles/core.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

It'd need a patch, I'll look into it tomorrow. Feel free to submit a PR if you figure it out before me

SirToffski commented 1 year ago

Hmm, weird - I can build it OK in a clean chroot on vanilla Arch. Those build errors are the same ones I had and were resolved after updating PKGBUILD to use mbedtls2.

Just double-checked and it still compiles fine here. Here's the PKGBUILD I used to build it, as well as my makepkg.conf and the build log

HamletDuFromage commented 1 year ago

Maybe it doesn't compile when you got both mbedtls2 and mbedtls installed since it doesn't look for /usr/lib/mbedtls2/? I can actually compile it just fine with this patch, which I PR'd to slippi-online

https://github.com/dolphin-emu/dolphin/pull/11847

SirToffski commented 1 year ago

Maybe it doesn't compile when you got both mbedtls2 and mbedtls installed since it doesn't look for /usr/lib/mbedtls2/? I can actually compile it just fine with this patch, which I PR'd to slippi-online

https://github.com/dolphin-emu/dolphin/pull/11847

Makes sense! Chroot would only have had mbedtls2 installed.

In this case I shall close the issue, since fixing this upstream makes more sense.