Build: Fix Automake warnings when running autogen.sh #11013

pull eklitzke wants to merge 1 commits into bitcoin:master from eklitzke:override_gzip_env changing 2 files +1 −5
  1. eklitzke commented at 2:36 AM on August 9, 2017: contributor

    This fixes some harmless (but annoying) automake warnings when invokes autogen.sh. The warnings I'm referring to are the ones printed at the very end of running autogen.sh, on my system they look like:

    Makefile.am:12: warning: user variable 'GZIP_ENV' defined here ...
    /usr/share/automake-1.15/am/distdir.am: ... overrides Automake variable 'GZIP_ENV' defined here
    src/Makefile.am: installing 'build-aux/depcomp'
    src/Makefile.am:497: warning: user target '.mm.o' defined here ...
    /usr/share/automake-1.15/am/depend2.am: ... overrides Automake target '.mm.o' defined here
    

    I did some research on both of these, and here's what I found:

    • Automake has been setting GZIP_ENV since 1998. They set it to --best, we set it to -9n. I'm not sure if the -n is really necessary, but using the override directive suppresses the warning.
    • Automake has had a rule for .mm.o targets (used for Objective C++) built in since Automake 1.12.1, which appears to have been released in 2012. Trusty (used by Travis and Gitian) is on Automake 1.14.1. I don't know if it's strictly correct to update this rule, as it has some stuff about QT_INCLUDES and PIE_FLAGS, but the Travis build for Darwin passed on my branch even after removing this rule. If this seems too scary to change maybe we can leave it in.

    It looks like both of these rules were added by @theuni when he did the initial autotools conversion in 2013. These warnings are harmless, but there's no reason not to fix them. While researching these I accidentally stumbled across a few forum posts and GitHub comments from end users who thought the errors meant their Bitcoin build was broken, so that's another reason to fix them.

  2. Fix automake warnings when running autogen.sh 2ad24b73e0
  3. fanquake added the label Build system on Aug 9, 2017
  4. practicalswift commented at 4:56 AM on August 9, 2017: contributor

    Concept ACK - good stuff! 👍

  5. paveljanik commented at 6:59 AM on August 9, 2017: contributor

    ACK https://github.com/bitcoin/bitcoin/pull/11013/commits/2ad24b73e0aca883960d3128f91364bbb933e865

    Verbose build logs are the same here (gzip and mm.o warnings are removed).

  6. fanquake requested review from theuni on Aug 9, 2017
  7. fanquake commented at 8:11 AM on August 9, 2017: member

    This is the documentation for -n or --no-name:

    When compressing, do not save the original file name and time stamp by default. (The original name is always saved if the name had to be truncated.) When decompressing, do not restore the original file name if present (remove only the gzip suffix from the compressed file name) and do not restore the original time stamp if present (copy it from the compressed file). This option is the default when decompressing.

    So this might be required as part of the gitian build process, requested a review from theuni.

  8. promag commented at 5:53 PM on August 13, 2017: member

    utACK 2ad24b7.

  9. theuni changes_requested
  10. theuni commented at 10:42 PM on August 16, 2017: member
    • GZIP_ENV was indeed added for determinism, but gitian exports this as needed, so it's not really necessary. I'd rather just remove it.

    • The mm.o rule was added to support XCode 4.2's ancient version of automake. That's irrelevant now, so it makes sense to remove that too.

    All darwin targets are PIE by default, so we don't technically need the flags, but I'd be more comfortable if we hooked up the OBJCXXFLAGS in case future ones are added. This should do it:

    diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
    index e4b64c1..0767ee1 100644
    --- a/src/Makefile.qt.include
    +++ b/src/Makefile.qt.include
    @@ -368,6 +368,7 @@ BITCOIN_QT_INCLUDES = -I$(builddir)/qt -I$(srcdir)/qt -I$(srcdir)/qt/forms \
     qt_libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
       $(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
     qt_libbitcoinqt_a_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS)
    +qt_libbitcoinqt_a_OBJCXXFLAGS = $(AM_OBJCXXFLAGS) $(QT_PIE_FLAGS)
     
     qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
       $(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
    
  11. fanquake commented at 2:10 AM on August 27, 2017: member

    @eklitzke Can you follow up on theuni's changes?

  12. laanwj commented at 5:36 PM on September 20, 2017: member

    @eklitzke Ping

  13. fanquake commented at 4:27 AM on October 21, 2017: member

    Replaced by #11541.

  14. fanquake closed this on Oct 21, 2017

  15. laanwj referenced this in commit bb9ab0fccf on Oct 29, 2017
  16. PastaPastaPasta referenced this in commit b0de1bc7e9 on Dec 22, 2019
  17. PastaPastaPasta referenced this in commit 493c08aefe on Jan 2, 2020
  18. PastaPastaPasta referenced this in commit 0a0f20f644 on Jan 4, 2020
  19. PastaPastaPasta referenced this in commit fea865b192 on Jan 12, 2020
  20. PastaPastaPasta referenced this in commit c1f7a628d8 on Jan 12, 2020
  21. PastaPastaPasta referenced this in commit 115a35b1e0 on Jan 12, 2020
  22. PastaPastaPasta referenced this in commit 188b6294c5 on Jan 12, 2020
  23. PastaPastaPasta referenced this in commit 3b55ddfda3 on Jan 12, 2020
  24. PastaPastaPasta referenced this in commit d98bd92123 on Jan 12, 2020
  25. PastaPastaPasta referenced this in commit 2f61a2007a on Jan 16, 2020
  26. ckti referenced this in commit b7050bc9f4 on Mar 28, 2021
  27. 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