build: building for just bench fails to link due to libevent symbols #18373

issue fanquake openend this issue on March 18, 2020
  1. fanquake commented at 3:46 am on March 18, 2020: member

    Configuring to build only bench i.e: ./configure --with-gui=no --with-libs=no --with-utils=no --with-daemon=no --disable-tests currently fails to link with:

    0  CXXLD    bench/bench_bitcoin
    1Undefined symbols for architecture x86_64:
    2  "_evhttp_uridecode", referenced from:
    3      urlDecode(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libbitcoin_util.a(libbitcoin_util_a-url.o)
    4  "_event_enable_debug_logging", referenced from:
    5      UpdateHTTPServerLogging(bool) in libbitcoin_server.a(libbitcoin_server_a-httpserver.o)
    6ld: symbol(s) not found for architecture x86_64
    7clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    Want to work on this issue?

    The purpose of the good first issue label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase.

    You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it.

    For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.

  2. fanquake added the label Build system on Mar 18, 2020
  3. fanquake added the label good first issue on Mar 18, 2020
  4. brakmic commented at 8:58 am on March 18, 2020: contributor
    I’ll take this one.
  5. brakmic commented at 9:12 am on March 18, 2020: contributor

    Btw. @fanquake ,

    While going through Makefile.bench.include I discovered this: $(EVENT_CLFAGS)

    This should certainly be $(EVENT_CFLAGS)

    Not sure if this would also be the solution to the actual problem as I’m still going through the Makefile, so I’d like to consult with you first before proposing anything.

  6. fanquake commented at 9:17 am on March 18, 2020: member

    This should certainly be $(EVENT_CFLAGS)

    Good catch! In any case that should also be fixed.

  7. brakmic commented at 10:11 am on March 18, 2020: contributor

    @fanquake , A possible fix could be done by using an explicit LDFLAG -levent as shown in my repo.

    But before I open a PR I also have another question: should we also remove the double LIBBITCOIN_SERVER from here. Not sure if we should open a new issue because of this.

    This already got removed from Makefile.am in #17910 so I suppose it would make sense to get rid of it here as well.

  8. MarcoFalke commented at 2:32 pm on March 18, 2020: member
    Yeah, if it compiles and links, it can be removed.
  9. brakmic commented at 2:33 pm on March 18, 2020: contributor

    Yeah, if it compiles and links, it can be removed.

    Yes, it does. Have tested it. Will then add it to this PR.

  10. fanquake closed this on Mar 26, 2020

  11. sidhujag referenced this in commit af0f536a13 on Mar 28, 2020
  12. DrahtBot locked this on Feb 15, 2022
  13. knst referenced this in commit b0109f01f2 on May 25, 2023
  14. PastaPastaPasta referenced this in commit 8ae94ada7c on May 31, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-19 03:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me