make fails #4574

issue rebroad opened this issue on July 23, 2014
  1. rebroad commented at 8:57 AM on July 23, 2014: contributor

    For some time now, if I run "make clean", it doesn't clean well enough to avoid compile errors. The only thing that seems to work is to completely remove the directories, and re git clone. E.g. after a recent git clean, followed by autogen.sh, followed by configure, followed by make, I get:-

    make -C src qt/bitcoin-qt make[1]: Entering directory /home/rebroad/src/bitcoin/make/src' OBJCXXLD qt/bitcoin-qt /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 0 has invalid symbol index 11 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 1 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 2 has invalid symbol index 2 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 3 has invalid symbol index 2 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 4 has invalid symbol index 11 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 5 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 6 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 7 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 8 has invalid symbol index 12 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 9 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 10 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 11 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 12 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 13 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 14 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 15 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 16 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 17 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 18 has invalid symbol index 13 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_info): relocation 19 has invalid symbol index 22 /usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/Scrt1.o(.debug_line): relocation 0 has invalid symbol index 2 /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/Scrt1.o: In function_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status

  2. laanwj added the label Docs and Output on Jul 23, 2014
  3. laanwj added the label Build system on Jul 23, 2014
  4. laanwj commented at 9:46 AM on July 23, 2014: member

    Please paste a 'git status' output when this happens.

  5. rebroad commented at 10:19 AM on July 23, 2014: contributor

    Actually, in this case, the usual fix doesn't work, so I suspect that these particular errors may be related to a recent Ubuntu LTS upgrade.

  6. rebroad commented at 10:21 AM on July 23, 2014: contributor

    $ git status On branch master Untracked files: (use "git add <file>..." to include in what will be committed)

    src/make
    

    nothing added to commit but untracked files present (use "git add" to track)

  7. laanwj commented at 6:47 PM on July 24, 2014: member

    I see no reason to believe that this is caused by 'make clean not making clean enough'. If there were leftover files they would be in the list returned by git status.

  8. theuni commented at 7:10 PM on July 24, 2014: member

    That looks like a busted linker to me. You should be able to verify (and work-around) by disabling debugging (remove -g from build flags).

  9. rebroad commented at 1:54 AM on July 25, 2014: contributor

    @cory is it possible to fix without removing debugging?

  10. theuni commented at 3:17 AM on July 25, 2014: member

    by all appearances, your toolchain is borked in some way. Either that, or you've fiddled with the buildsystem and broken the link-line (notice that there's no main()).

    Can you build from a fresh checkout? If not, it's probably a local issue.

  11. laanwj commented at 6:47 AM on July 25, 2014: member

    Waaaah, I forgot to mention to include ignored files, so of course it won't show anything. Ignore my last post.

    When you have this problem again use git status -s --ignored (after the clean).

  12. rebroad commented at 4:48 AM on July 27, 2014: contributor

    Bitcoin version v0.6.1-371-g80dbb9f-dirty-beta (2014-05-12 16:38:59 +0800) still builds without any issues, so whatever the cause, it's something introduced since then...

  13. rebroad renamed this:
    make clean doesn't clean enough
    make fails
    on Jul 27, 2014
  14. laanwj commented at 10:33 AM on September 25, 2014: member

    Haven't seen any other reports of this, so this must be a local system toolchain issue.

  15. laanwj closed this on Sep 25, 2014

  16. rebroad commented at 3:16 PM on January 31, 2016: contributor

    @laanwj I still have this issue. bitcoind compiles fine on the same machine.

  17. MarcoFalke 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-22 18:15 UTC

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