-
Notifications
You must be signed in to change notification settings - Fork 721
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
[BUG] - Can't build cardano-node on Fedora - conflict: pkg-config package libsodium-any, not found in the pkg-config database #5561
Comments
Seems that libsodium gets installed on fedora, but somehow |
also on fedora facing a similar issue. when i try to build not only cardano node but any other project associated with cardano. strange too because i originally compiled my node on this machine. aside from regular system updates not sure what could of changed. environment variables
/usr/local/lib
versions of tooling.
|
I changed the name of the .pc file so that it would show up in the pkg-config database as
compiler output
|
The solution is to upgrade to RUN yum update -y && \
yum install git gcc gcc-c++ tmux gmp-devel make tar xz wget zlib-devel libtool autoconf -y && \
mkdir -p /root/src/ && cd /root/src && \
curl -O https://distfiles.ariadne.space/pkgconf/pkgconf-2.0.3.tar.xz && \
tar -xvf pkgconf-2.0.3.tar.xz && \
cd pkgconf-2.0.3 && \
./configure && make && make install && \
chmod +x /install-node.sh
I don't have write access to this repository, so here's a patch: commit 6f3d2b14f783b44479ceebd421d286890fa34819
Author: Mateusz Galazyn <mateusz.galazyn@iohk.io>
Date: Mon Dec 4 11:04:25 2023 +0100
Upgrade pkgconf to 2.0.3
diff --git a/cabal_build_tests/fedora/Dockerfile b/cabal_build_tests/fedora/Dockerfile
index e3968681..7f2792ba 100644
--- a/cabal_build_tests/fedora/Dockerfile
+++ b/cabal_build_tests/fedora/Dockerfile
@@ -6,6 +6,15 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV TAGGED_VERSION ''
COPY install-node.sh /
-RUN chmod +x /install-node.sh
+# pkg-config 1.9.5 breaks cabal dependency checking
+# pkg-config 2 isn't available yet for fedora so we need to build it from source
+RUN yum update -y && \
+ yum install git gcc gcc-c++ tmux gmp-devel make tar xz wget zlib-devel libtool autoconf -y && \
+ mkdir -p /root/src/ && cd /root/src && \
+ curl -O https://distfiles.ariadne.space/pkgconf/pkgconf-2.0.3.tar.xz && \
+ tar -xvf pkgconf-2.0.3.tar.xz && \
+ cd pkgconf-2.0.3 && \
+ ./configure && make && make install && \
+ chmod +x /install-node.sh
CMD ./install-node.sh $TAGGED_VERSION
diff --git a/cabal_build_tests/install-node.sh b/cabal_build_tests/install-node.sh
index 54e2dec2..737315d7 100644
--- a/cabal_build_tests/install-node.sh
+++ b/cabal_build_tests/install-node.sh
@@ -50,7 +50,6 @@ echo "Install dependencies"
if [[ "$(</etc/os-release)" == *"fedora"* ]]; then
echo "Running on Fedora"
yum update -y
- yum install git gcc gcc-c++ tmux gmp-devel make tar xz wget zlib-devel libtool autoconf -y
yum install curl systemd-devel ncurses-devel ncurses-compat-libs which jq openssl-devel lmdb-devel -y
elif [[ "$(</etc/os-release)" == *"ubuntu"* ]]; then
echo "Running on Ubuntu" There are also unreleased fixes in cabal: haskell/cabal#9134 & haskell/cabal#9391 |
Thanks @carbolymer ! I updated instruction with information from this ticket: |
Went to pkg config repo and check out the 2.0 tag. compiled and installed and now cardano-node compiles successfully. thank you @carbolymer for the tip |
Closing then. Let me know if you need further assistance. |
Internal
Area
Installation instruction:
Installing the node from source
https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/getting-started/install.md
Summary
Can't build cardano-node on Fedora.
We have tests https://github.com/input-output-hk/cardano-node-tests/tree/master/cabal_build_tests that check "Installing the node from source" instruction in dockerized environments on
Ubuntu
andFedora
.After updating tests - they are on a branch
artur/update-cabal-tests
- an attempt to run8.7.0-pre
onUbuntu
worked fine while the same test installation onFedora
failed with:Full logs are attached below.
Steps to reproduce
Steps to reproduce the behavior:
Clone
cardano-node-tests
git clone git@github.com:input-output-hk/cardano-node-tests.git
Navigate to
cabal_build_tests
- there is a README there too:cd cardano-node-tests/cabal_build_tests
Checkout branch
artur/update-cabal-tests
git checkout artur/update-cabal-tests
Run tests:
./run-fedora.sh -t tag -o "8.7.0-pre" --> Fails
./run-ubuntu.sh -t tag -o "8.7.0-pre" --> Passes
Expected behavior
Build is successful.
System info (please complete the following information):
Our
Dockerfile
usesfedora:latest
Node and CLI version: We are trying to build
8.7.0-pre
.Screenshots and attachments
Fedora (Failing) full logs:
fedora.txt
Ubuntu (Successful) full logs:
ubuntu.txt
I found this posts that suggests that this issue is also present on Arch Linux:
https://forum.cardano.org/t/cardano-crypto-class-2-0-0-conflict-pkg-config-package-libsodium-any-not-found-in-the-pkg-config-database/56203/5
Additional context
N/A
The text was updated successfully, but these errors were encountered: