EPICS Controls Argonne National Laboratory

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  2021  <20222023  2024  2025  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  2021  <20222023  2024  2025 
<== Date ==> <== Thread ==>

Subject: Re: Issues building statically linked IOC
From: Érico Nogueira Rolim via Tech-talk <tech-talk at aps.anl.gov>
To: Michael Davidsaver <mdavidsaver at gmail.com>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 18 Oct 2022 14:16:04 +0000
On 17/10/2022 17:49, Michael Davidsaver wrote:
> On 10/17/22 11:08, Érico Nogueira Rolim via Tech-talk wrote:
>> Did I miss something about building a static IOC? Having to mess around
>> in the epics-base files doesn't seem ideal... To cover all my bases, I
>> also tried doing this on epics-base 7.0.7, which required the same steps
>> to spit out a static executable.
>
> The developers of glibc try to discourage completely static linking
> as some parts of libc.so will implicitly try to load plugin libraries
> for things like user account database and hostname lookup.  There are
> also some hardcoded paths which distro libraries may have changed.


I am aware of the glibc stance, but IMHO that's no reason for the build
system to keep me from building things statically myself. I'm not sure
what the current progress on this is, but a built-in DNS resolver for
statically linked applications was even being considered, seeing as
statically linked binaries have their place and that was a rather large
limitation for no good reason.


I'm interested in getting epics to work on musl libc as well (it just
needs some handling around the <execinfo.h> bits iirc), which is
statically linking friendly, and again the build system would be the
only thing stopping that from working out of the box once the source
issues are fixed.


>
> https://stackoverflow.com/questions/57476533/why-is-statically-linking-glibc-discouraged
>
>
> (the first google result for "glibc static linking")
>
> Of course, there are some cases where this may not practically be
> avoided.  Such as you describe where (I assume) you don't have
> access to the toolchain which was used to build the system libraries.
>
> In such a case I guess you will have to hope for the best!
>

Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.

Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.

Replies:
Re: Issues building statically linked IOC Michael Davidsaver via Tech-talk
References:
Issues building statically linked IOC Érico Nogueira Rolim via Tech-talk
Re: Issues building statically linked IOC Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: 回覆: Streamdevice discards part of message Chiang, Liang-Chih [江良志] via Tech-talk
Next: Re: Streamdevice discards part of message Brown, Garth 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  2021  <20222023  2024  2025 
Navigate by Thread:
Prev: Re: Issues building statically linked IOC Michael Davidsaver via Tech-talk
Next: Re: Issues building statically linked IOC Michael Davidsaver 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  2021  <20222023  2024  2025 
ANJ, 19 Oct 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·