Build error: "libtool: link: unable to infer tagged configuration" #4993

issue DanielFragaBR opened this issue on September 28, 2014
  1. DanielFragaBR commented at 4:00 AM on September 28, 2014: none

    I always compiled Bitcoin from git, but now I get the following error (I'm using libtool 2.4.2):

    CXXLD test/test_bitcoin CXX qt/qt_bitcoin_qt-bitcoin.o OBJCXXLD qt/bitcoin-qt libtool: link: unable to infer tagged configuration libtool: link: specify a tag with `--tag' Makefile:2305: recipe for target 'qt/bitcoin-qt' failed make[1]: *** [qt/bitcoin-qt] Error 1 make[1]: Leaving directory '/usr/local/src/git/bitcoin/src' Makefile:551: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1

    Any hints? Thanks.
    
  2. Diapolo commented at 2:20 PM on September 28, 2014: none

    @theuni Can you have a look here?

  3. theuni commented at 12:39 AM on September 30, 2014: member

    what OS and toolchain? Could you please redo the above using "make V=1" and paste that, so we can see what's going on?

  4. theuni commented at 12:40 AM on September 30, 2014: member

    ah wait I see, it's probably that pesky OBJCXXLD that @luke-jr mentioned a while ago. I'll track down the cause of that and fix it, and I'm guessing it'll fix your problem as well.

  5. theuni commented at 1:00 AM on September 30, 2014: member

    @DanielFragaBR Would you mind seeing if this fixes your build problem?

    diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
    index 1ea039a..b63db24 100644
    --- a/src/Makefile.qt.include
    +++ b/src/Makefile.qt.include
    @@ -366,6 +366,7 @@ if USE_LIBSECP256K1
       qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
     endif
     qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
    +qt_bitcoin_qt_LIBTOOLFLAGS = --tag CXX
    
     #locale/foo.ts -> locale/foo.qm
     QT_QM=$(QT_TS:.ts=.qm)
    

    I'm not sure what the cause is just yet, but I believe that should cure the symptom.

  6. DanielFragaBR commented at 2:17 AM on September 30, 2014: none

    @theuni yes, this patch solved the problem! Thanks!

  7. DanielFragaBR closed this on Sep 30, 2014

  8. theuni commented at 2:24 AM on September 30, 2014: member

    @DanielFragaBR Please reopen. I'd like to track down why this is happening and push a real fix (or at least this work-around) before we call this closed.

    Thanks for reporting and testing.

  9. sipa reopened this on Sep 30, 2014

  10. DanielFragaBR commented at 3:20 AM on September 30, 2014: none

    @theuni thanks. If you need more testing, just ask.

  11. theuni commented at 5:07 PM on September 30, 2014: member

    @DanielFragaBR Thanks. Could you please pastebin your config.log? I suspect that we're picking up something from the environment. I'm assuming you're on osx, btw? Do you happen to dev on other projects that require env changes?

  12. DanielFragaBR commented at 5:55 PM on September 30, 2014: none

    @theuni you're right! I messed with the environment with the CXX flag the wrong way. Now I fixed that. So I'm closing this entry.

    Thank you very much!

  13. DanielFragaBR closed this on Sep 30, 2014

  14. theuni commented at 8:07 PM on September 30, 2014: member

    Great, now we know. Thanks for confirming.

  15. fanquake commented at 3:02 PM on October 13, 2014: member

    @DanielFragaBR Could you elaborate on what you'd done to your environment to cause this error? I'm seeing the same thing on another machine.

  16. DanielFragaBR commented at 3:42 PM on October 13, 2014: none

    @fanquake I put some flags in CXX environment variable which shouldn't be there. Maybe it's not your case. Now I just use the correct LDFLAGS and CPPFLAGS. What flags are you setting?

  17. theuni commented at 6:21 PM on October 13, 2014: member

    @fanquake It'll be CC or CXX that's set. That causes automake's tag deduction to fail for OBJCXXLD. Since several people are seeing this now, I suppose it's best to go ahead and push the work-around while we track down the real culprit. Could you please verify that #4993 (comment) works for you as well?

  18. fanquake commented at 10:53 AM on October 15, 2014: member

    @theuni That fix works fine.

  19. fanquake referenced this in commit 6f155bdb80 on Oct 16, 2014
  20. rebroad commented at 10:23 AM on October 13, 2016: contributor

    ~/src/bitcoin/src$ make -j4 qt/bitcoin-qt OBJCXXLD qt/bitcoin-qt libtool: link: unable to infer tagged configuration libtool: link: specify a tag with `--tag' make: *** [qt/bitcoin-qt] Error 1

    Getting this error again...

  21. reddink referenced this in commit 4d8a6cea9d on May 27, 2020
  22. 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-26 09:16 UTC

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