How to install libmsquic on Arch Linux? #2318
-
Hello, I would like to install libmsquic on a Linux machine, specifically an Arch Linux. I am not experienced with Linux, so, I am asking for your help. How do I install libmsquic on Arch Linux? The official Microsoft Linux Package Repository does not support Arch Linux, I thought on manual installation. The PR #1791 apparently shows how to generate a package for Arch, would that work? The .NET docs instruct on Snap packages, could we have something similar for libmsquic? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hi @alexandrehtrb, what I did in that PR would certainly work. My main machine is Arch and I do all .NET + msquic testing on it. However, I use msquic built from sources, specifically from main. If you wish, I can share the script I use to checkout, build, and do system wide install of msquic. It should be fairly easy to adjust to use particular release. Be aware, it's a bit involved, but I can help with all the steps. On the topic of Snap, I do not have an answer, sorry. |
Beta Was this translation helpful? Give feedback.
-
I created some MsQuic packages that are available on the Arch User Repository. |
Beta Was this translation helpful? Give feedback.
-
Update for those who want to install msquic for usage with .NET 7+. The original script needs a slight change at the destination .so files names, because they now require ".2" at the end of them. Here is the script that I used to install msquic 2: #!/bin/bash -v
configuration=Release
# clean and update msquic
# checkout whatever revision/tag/branch you want here instead of pulling main
git clean -dfx
# For .NET 6, msquic version 1.9 must be used
# .NET 7+ requires msquic 2 and greater
# Change version below for the one you want
git checkout v2.1.5
git pull
git submodule update
# build msquic in $configuration with logging and stub tls
rm -rf build
mkdir build
options="-DQUIC_BUILD_TOOLS=off -DQUIC_BUILD_TEST=off -DQUIC_BUILD_PERF=off"
cmake -B build -DCMAKE_BUILD_TYPE=$configuration -DQUIC_ENABLE_LOGGING=true -DQUIC_USE_SYSTEM_LIBCRYPTO=true ${options}
cd build
cmake --build . --config $configuration
# package msquic and install it
version_major=$(cat ../src/inc/msquic.ver | grep 'define VER_MAJOR' | cut -d ' ' -f 3)
version_minor=$(cat ../src/inc/msquic.ver | grep 'define VER_MINOR' | cut -d ' ' -f 3)
version_patch=$(cat ../src/inc/msquic.ver | grep 'define VER_PATCH' | cut -d ' ' -f 3)
# If you are compiling msquic 1, the destination files are: /usr/lib/libmsquic.so and /usr/lib/libmsquic.lttng.so
# If you are compiling msquic 2, the destination files are: /usr/lib/libmsquic.so.2 and /usr/lib/libmsquic.lttng.so.2
# Remove the .${version_major} at the end if you are compiling for msquic 1
fpm -f -s dir -t pacman -n libmsquic -v ${version_major}.${version_minor}.${version_patch} \
--license MIT --url https://github.com/microsoft/msquic --log error \
"bin/${configuration}/libmsquic.so.${version_major}.${version_minor}.${version_patch}"=/usr/lib/libmsquic.so.${version_major} \
"bin/${configuration}/libmsquic.lttng.so.${version_major}.${version_minor}.${version_patch}"=/usr/lib/libmsquic.lttng.so.${version_major}
package_name="libmsquic-${version_major}.${version_minor}.${version_patch}-1-x86_64.pkg.tar.zst"
sudo pacman -U ${package_name}
cd .. Thanks again @ManickaP for the original script! |
Beta Was this translation helpful? Give feedback.
Hi @alexandrehtrb,
what I did in that PR would certainly work. My main machine is Arch and I do all .NET + msquic testing on it.
However, I use msquic built from sources, specifically from main. If you wish, I can share the script I use to checkout, build, and do system wide install of msquic. It should be fairly easy to adjust to use particular release. Be aware, it's a bit involved, but I can help with all the steps.
On the topic of Snap, I do not have an answer, sorry.