Skip to content

Conversation

backpacker69
Copy link
Member

No description provided.

@backpacker69 backpacker69 changed the title Testing compilation fixes compilation and fixes for tests Mar 27, 2020
@belovachap
Copy link
Contributor

Maybe a fix for this is coming, but here's what I found on my computer with this branch checked out:

I still need to pass a flag to configure to get the tests to compile (./configure --enable-tests), and make check hits the error:

  CXXLD    test/test_peercoin_fuzzy
libbitcoin_common.a(libbitcoin_common_a-warnings.o): In function `GetWarnings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/include/c++/7/bits/basic_string.h:6045: undefined reference to `strCheckpointWarning[abi:cxx11]'
/usr/include/c++/7/bits/basic_string.h:1356: undefined reference to `strCheckpointWarning[abi:cxx11]'
libbitcoin_common.a(libbitcoin_common_a-warnings.o): In function `GetWarnings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/chapman/code/peercoin/src/./uint256.h:50: undefined reference to `hashInvalidCheckpoint'
/home/chapman/code/peercoin/src/./uint256.h:50: undefined reference to `hashInvalidCheckpoint'
/home/chapman/code/peercoin/src/./uint256.h:50: undefined reference to `hashInvalidCheckpoint'
/home/chapman/code/peercoin/src/./uint256.h:50: undefined reference to `hashInvalidCheckpoint'
libbitcoin_common.a(libbitcoin_common_a-warnings.o): In function `GetWarnings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/include/c++/7/bits/std_mutex.h:202: undefined reference to `cs_mapAlerts'
libbitcoin_common.a(libbitcoin_common_a-warnings.o): In function `GetWarnings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/include/c++/7/bits/stl_map.h:349: undefined reference to `mapAlerts'
libbitcoin_common.a(libbitcoin_common_a-warnings.o): In function `GetWarnings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/chapman/code/peercoin/src/warnings.cpp:112: undefined reference to `mapAlerts'
/home/chapman/code/peercoin/src/warnings.cpp:115: undefined reference to `CAlert::AppliesToMe() const'
collect2: error: ld returned 1 exit status

@backpacker69
Copy link
Member Author

why do you have checkpoints disabled

@belovachap
Copy link
Contributor

why do you have checkpoints disabled

As far as I can tell from the output of ./configure --enable-tests, checkpoints are enabled:

Options used to compile and link:
  checkpoints   = yes
  with wallet   = yes
  with gui / qt = yes
    qt version  = 5
    with qr     = yes
  with zmq      = no
  with test     = yes
  with bench    = yes
  with upnp     = yes
  use asm       = yes
  debug enabled = no
  werror        = no

  target os     = linux
  build os      = 

  CC            = gcc
  CFLAGS        = -g -O2
  CPPFLAGS      =  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
  CXX           = g++ -std=c++11
  CXXFLAGS      = -g -O2 -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough
  LDFLAGS       = 
  ARFLAGS       = cr

@belovachap
Copy link
Contributor

Nice, f2d19c2 gets the test suite to compile. Progress 🎉

Looks like both the core and the qt tests are failing, though:

FAIL: qt/test/test_peercoin-qt
FAIL: test/test_peercoin
============================================================================
Testsuite summary for Peercoin 0.9.0
============================================================================
# TOTAL: 2
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0
============================================================================
See src/test-suite.log
Please report to https://github.com/peercoin/peercoin/issues
============================================================================

@backpacker69
Copy link
Member Author

that will require a lot more work, but you can already start adding tests that you want

@backpacker69 backpacker69 merged commit 9feff4b into peercoin:release-0.9 May 4, 2020
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.

2 participants