EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Larger build products in base-7.0.5
From: "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov>
To: "Peterson, Kevin M." <kmpeters at anl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 30 Apr 2021 15:52:19 +0000
Hi Kevin,

On Apr 30, 2021, at 9:46 AM, Kevin Peterson via Tech-talk <tech-talk at aps.anl.gov> wrote:

Is there are reason the linux-x86_64 build products of base-7.0.5 are 10x larger than the build products of base-7.0.4.1?

I believe the change occurred when that I moved GCC's -g option that includes debugging symbols in optimized builds from a CONFIG_SITE file where it didn’t work, to those where it does. In your case:

diff --git a/configure/os/CONFIG_SITE.Common.linuxCommon b/configure/os/CONFIG_S
ITE.Common.linuxCommon
index 7f5d4aa11..2b035eac9 100644
--- a/configure/os/CONFIG_SITE.Common.linuxCommon
+++ b/configure/os/CONFIG_SITE.Common.linuxCommon
@@ -2,10 +2,9 @@
 #
 # Site-specific settings for all linux targets

 

+# WARNING: Variables that are set in $(CONFIG)/CONFIG.gnuCommon cannot be
+# overridden in this file for native builds, e.g. variables such as
+#   OPT_CFLAGS_YES, WARN_CFLAGS, SHRLIB_LDFLAGS
+# They must be set in the host+target specific file instead:
+#   CONFIG_SITE.<linux-arch>.<linux-arch>

 

-# It makes sense to include debugging symbols even in optimized builds
-# in case you want to attach gdb to the process or examine a core-dump.
-# This does cost disk space, but not memory as debug symbols are not
-# loaded into RAM when the binary is loaded.
-OPT_CFLAGS_YES += -g
-OPT_CXXFLAGS_YES += -g
diff --git a/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 b/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64
index 7a19d0dfe..9178afd43 100644
--- a/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64
+++ b/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64
@@ -3,4 +3,17 @@
 # Site specific definitions for linux-x86_64 host - linux-x86_64 target builds
 #-------------------------------------------------------

 

+# It makes sense to include debugging symbols even in optimized builds
+# in case you want to attach gdb to the process or examine a core-dump.
+# This does cost disk space, but not memory as debug symbols are not
+# loaded into RAM when the binary is loaded.
+OPT_CFLAGS_YES += -g
+OPT_CXXFLAGS_YES += -g
+
+# Uncomment the followings lines to build with CLANG instead of GCC.
+#
+#GNU         = NO
+#CMPLR_CLASS = clang
+#CC          = clang
+#CCC         = clang++

 



The 7.0.5 binaries are also substantially larger than the 7.0.4.1 binaries: 11M vs 1.8M, respectively.

Agreed, but at runtime the differences should be much smaller or zero since the debug symbols don’t get loaded into memory.

You can double-check by comparing a gcc or g++ command in the two builds, in 7.0.4.1 you probably won’t see the -g option whereas in 7.0.5 I think you will. Please let us know if that’s not true.

- Andrew

-- 
Complexity comes for free, simplicity you have to work for.


Replies:
Re: Larger build products in base-7.0.5 Kevin Peterson via Tech-talk
References:
Larger build products in base-7.0.5 Kevin Peterson via Tech-talk

Navigate by Date:
Prev: Re: Larger build products in base-7.0.5 Michael Davidsaver via Tech-talk
Next: Re: ADVimba disconnect Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: Larger build products in base-7.0.5 Michael Davidsaver via Tech-talk
Next: Re: Larger build products in base-7.0.5 Kevin Peterson via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024