Page MenuHomePhabricator

[CI] build libsecp256k1 for electrum tests
ClosedPublic

Authored by PiRK on Aug 28 2024, 08:44.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC7f062bb764b6: [CI] build libsecp256k1 for electrum tests
Summary

Until now we tested electrum on CI using the pure-python fallback code of ecdsa.
libsecp256k1 is about to become a hard dependency for electrum, so build it for CI

Test Plan

run tests on CI, check that the python fallback code wasn't used (it would log a warning)

Diff Detail

Repository
rABC Bitcoin ABC
Branch
electrum_functional_tests_with_libsecp256k1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30126
Build 59785: Build Diffelectrum-tests
Build 59784: arc lint + arc unit

Event Timeline

@bot electrum-tests electrum-functional-tests

Tail of the build log:

INFO:  Building secp256k1...
~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build ~/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/electrum-functional-tests
Cloning into 'secp256k1'...
~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build/secp256k1 ~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build ~/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/electrum-functional-tests
Already on 'master'
Your branch is up to date with 'origin/master'.
./autogen.sh: 3: autoreconf: not found
ERROR:  Could not run autogen for secp256k1. Please make sure you have automake and libtool installed, and try again.
Build electrum-functional-tests failed with exit code 1
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.

Don't build libsecp in install-dependencies-bullseye.sh, do it as a cmake target
Add a debbuging ls for electrum-functional-tests

@bot electrum-tests electrum-functional-tests

install autoconf package

@bot electrum-functional-tests

Tail of the build log:

INFO:  Building secp256k1...
~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build ~/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/electrum-functional-tests
Cloning into 'secp256k1'...
~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build/secp256k1 ~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build ~/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/electrum-functional-tests
Already on 'master'
Your branch is up to date with 'origin/master'.
./autogen.sh: 3: autoreconf: not found
ERROR:  Could not run autogen for secp256k1. Please make sure you have automake and libtool installed, and try again.
Build electrum-functional-tests failed with exit code 1

try a cmake based build for functional tests

@bot electrum-functional-tests

Tail of the build log:

INFO:  Building secp256k1...
~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build ~/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/electrum-functional-tests
Cloning into 'secp256k1'...
~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build/secp256k1 ~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build ~/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/electrum-functional-tests
Already on 'master'
Your branch is up to date with 'origin/master'.
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/cmake_secp: line 15: cmake: command not found
Build electrum-functional-tests failed with exit code 127

I'm going to need help to make this work. I don't understand the environment in which these tests are running (neither cmake nor autoreconf are available)

revert to using make + autoconf

@bot electrum-functional-tests

Tail of the build log:

INFO:  Building secp256k1...
~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build ~/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/electrum-functional-tests
Cloning into 'secp256k1'...
~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build/secp256k1 ~/buildAgent/work/jailed-build/bitcoin-abc/electrum/contrib/build ~/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/electrum-functional-tests
Already on 'master'
Your branch is up to date with 'origin/master'.
configure.ac:32: installing 'build-aux/compile'
configure.ac:5: installing 'build-aux/config.guess'
configure.ac:5: installing 'build-aux/config.sub'
configure.ac:9: installing 'build-aux/install-sh'
configure.ac:9: installing 'build-aux/missing'
Makefile.am:4: error: Libtool library used but 'LIBTOOL' is undefined
Makefile.am:4:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
Makefile.am:4:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
Makefile.am:4:   If 'LT_INIT' is in 'configure.ac', make sure
Makefile.am:4:   its definition is in aclocal's search path.
Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
autoreconf: automake failed with exit status: 1
ERROR:  Could not run autogen for secp256k1. Please make sure you have automake and libtool installed, and try again.
Build electrum-functional-tests failed with exit code 1

@bot electrum-functional-tests

remove unrecognized options: --with-bignum

PiRK published this revision for review.Sep 3 2024, 10:45
This revision is now accepted and ready to land.Sep 3 2024, 15:23
This revision was automatically updated to reflect the committed changes.