Skip to content
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

Unexpected rebuild happening #851

Open
abailly opened this issue Jan 19, 2025 · 0 comments
Open

Unexpected rebuild happening #851

abailly opened this issue Jan 19, 2025 · 0 comments

Comments

@abailly
Copy link

abailly commented Jan 19, 2025

I am using shake for a relatively simple build system. The only wart is the need to build system dependencies and ensure cabal can find and understand them. I am building those libraries into ~/.local in order to not pollute the global namespace, and the build depends on the .so (or .dylib) files built.

However, I noticed that shake always rebuilds the libraries, even when they exist. To check this I have added a find ~/.local to the CI build and getting the following results:

/home/runner/.local/share/lib
/home/runner/.local/share/lib/libblst.a
/home/runner/.local/share/lib/libsecp256k1.so.2.0.2
/home/runner/.local/share/lib/libsecp256k1.so
/home/runner/.local/share/lib/pkgconfig
/home/runner/.local/share/lib/pkgconfig/libsecp256k1.pc
/home/runner/.local/share/lib/pkgconfig/libblst.pc
/home/runner/.local/share/lib/pkgconfig/libsodium.pc
/home/runner/.local/share/lib/libsodium.so.23.3.0
/home/runner/.local/share/lib/libsecp256k1.a
/home/runner/.local/share/lib/libsodium.la
/home/runner/.local/share/lib/libsodium.so.23
/home/runner/.local/share/lib/libsecp256k1.la
/home/runner/.local/share/lib/libsodium.a
/home/runner/.local/share/lib/libsecp256k1.so.2
/home/runner/.local/share/lib/libsodium.so
Building db-server in directory /home/runner/work/db-server/db-server as user 1001
Starting...
# bin/db-server
# /home/runner/.local/share/lib/libblst.a
# /home/runner/.local/share/lib/libsecp256k1.so
# /home/runner/.local/share/lib/libsodium.so
scripts/install-libblst.sh /home/runner/.local/share 10.1.4
scripts/install-libsodium.sh /home/runner/.local/share 10.1.4
scripts/install-libsecp256k1.sh /home/runner/.local/share 10.1.4

prefix=$1
+ prefix=/home/runner/.local/share
CARDANO_NODE_VERSION=$2
+ CARDANO_NODE_VERSION=10.1.4

IOHKNIX_VERSION=$(curl -L https://raw.githubusercontent.com/IntersectMBO/cardano-node/$CARDANO_NODE_VERSION/flake.lock | jq -r '.nodes.iohkNix.locked.rev')
++ curl -L https://raw.githubusercontent.com/IntersectMBO/cardano-node/10.1.4/flake.lock
++ jq -r .nodes.iohkNix.locked.rev

The file /home/runner/.local/share/lib/libsodium.so exists but it's still rebuilt. What am I doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant