
甘瀬ここあ
@cocoa@hackers.pub
When installing the patched versions of Misskey (Pull Request available) and Sharkey (with changes already applied) on a Fedora 42 environment, you may encounter the following errors:
error: ‘uint8_t’ was not declared in this scope
error: ‘state’ was not declared in this scope
These issues seem to stem from the version of GCC being used (Reference). Below, I will outline how to resolve these problems on Fedora 42.
Step 1: Install Dependencies
First, as indicated in the wiki, install the necessary dependencies:
sudo dnf install cairo-devel libjpeg-turbo-devel pango-devel giflib-devel pixman-devel
Step 2: Compile GCC/G++
Using the default GCC bundled with Fedora may lead to failed installations when running pnpm install
(as of May 27, 2025). To avoid this issue, we need to compile and use a other version of GCC/G++.
Start by downloading the GCC source code using wget, then extract it and navigate to the source directory:
wget https://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-13.3.0/gcc-13.3.0.tar.gz
tar xzf gcc-13.3.0.tar.gz
cd gcc-13.3.0
mkdir build
cd build
Next, install the dependencies required for building GCC/G++:
sudo dnf group install development-tools
sudo dnf install mpfr-devel gmp-devel libmpc-devel zlib-devel glibc-devel.i686 glibc-devel isl-devel libgphobos-static
Now, configure the build (Flags should be changed as needed.):
../configure --disable-bootstrap --prefix=/usr --program-suffix=-13.3 --mandir=/usr/share/man --enable-languages=c,c++
After configuration, compile GCC with the following command:
make
To utilize multiple cores for a faster build, use the -j
flag:
make -j6
Once the compilation is complete, install the new GCC version:
sudo make install
You can verify the installation of the compiled GCC using:
gcc-13.3 -v
Step 3: Modify Installation Command for Misskey/Sharkey
Finally, to successfully install Sharkey and Misskey, modify the installation command as follows:
CXX=/usr/sbin/g++-13.3 CC=/usr/sbin/gcc-13.3 pnpm install --frozen-lockfile
With these adjustments, you should be able to install Misskey and Sharkey without any issues. Enjoy Fediverse!
*I have used LLM to some extent to modify the text to make it more natural. I checked to some extent before post, but please let us know if there are any unnatural parts.