linker error building test_bitcoin (Ubuntu 64-bit) #5331

issue sdaftuar opened this issue on November 20, 2014
  1. sdaftuar commented at 5:17 PM on November 20, 2014: member

    It looks like #5235 broke linking on my platform, I now get this error when linking test_bitcoin:

      CXXLD    test/test_bitcoin
    /usr/bin/ld: /usr/lib/libdb_cxx-4.8.a(cxx_db.o): relocation R_X86_64_32 against `_db_associate_intercept_c' can not be used when making a shared object; recompile with -fPIC
    /usr/lib/libdb_cxx-4.8.a: error adding symbols: Bad value
    collect2: error: ld returned 1 exit status
    make[2]: *** [test/test_bitcoin] Error 1
    

    I installed libdb4.8 from the ppa described in the build-unix.md instructions. If I back my git repo to just before 5235 was committed, my build works fine.

    It looks to me like removing -static-libtool-libs from the test_test_bitcoin_LDFLAGS (in Makefile.test.include) might solve my problem but I don't really understand what that is for.

  2. theuni commented at 6:16 PM on November 20, 2014: member

    Yea, that would do it. Your problem is that you have the .so and the .la installed in /usr/lib, whereas most distros remove the .la's for their packages.

    Could you please try replacing "-static-libtool-libs" with "-static" there and see if that fixes?

  3. sdaftuar commented at 6:28 PM on November 20, 2014: member

    Thanks -- yes that works for me.

  4. laanwj closed this on Nov 21, 2014

  5. DrahtBot locked this on Sep 8, 2021

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: 2026-04-14 12:16 UTC

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