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

Static link and fix custom PREFIX #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sjors
Copy link

@Sjors Sjors commented Aug 1, 2023

This lets you do something like so:

mkdir legacy
mkdir src
git clone https://github.com/bitcoin-core/secp256k1.git
cd secp256k1
git checkout 3db0560606acb285cc7ef11662ce166ed67e9015
./autogen
./configure --prefix=/home/lightning/legacy
make
make install
cd ..

git clone https://github.com/jb55/clightning-dumpkeys
PREFIX=/home/lightning/legacy make

This avoids polluting your normal libraries with an arbitrary (ancient) version of libsecp. As well as lets you do this with root permissions (no /usr/local)

I'm not a build-system guru though.

@@ -2,8 +2,8 @@
BIN = clightning-dumpkeys
PREFIX ?= /usr/local

LDFLAGS = -lsecp256k1
CFLAGS = $(DEFS) -DHAVE_LITTLE_ENDIAN -O2 -g -I src -Wall -Werror -Wextra -std=c99
LDFLAGS = -l:libsecp256k1.a -L${PREFIX}/lib
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The : is what makes it static.

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

Successfully merging this pull request may close these issues.

1 participant