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  2022  2023  2024  2025  <2026 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  2022  2023  2024  2025  <2026
<== Date ==> <== Thread ==>

Subject: Re: Fw: Build an external library from source and statically link it into a support module
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: David Bracey <dbracey at fnal.gov>, Han Lee <jeonglee at lbl.gov>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 23 Feb 2026 20:16:02 +0000
Hi David,

I think this is fairly straightforward if you are building for only a single architecture in one EPICS tree.  But the EPICS build system allows building for multiple architectures in a single tree, for example linux-x86_64 and linux-x86_64-rhel7 for 2 different versions of Linux.  That may be hard to do with a 3'rd party Makefile that does not support multiple architectures in one tree.

I should say that the Han mentioned measComp, but that vendor support is done differently.  The vendor Linux library is provided in source form on Github, but we don't build that as part of the EPICS build system.  We build that separately using autotools and install the vendor libraries into /usr/local.

Mark


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Han Lee via Tech-talk <tech-talk at aps.anl.gov>
Sent: Monday, February 23, 2026 1:40 PM
To: David Bracey <dbracey at fnal.gov>
Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: Fw: Build an external library from source and statically link it into a support module
 
Hi David,

To achieve this, you can write specific rules directly into your project's Makefile to invoke the external build process.

I have personally taken a different approach (but I have my own similar project Makefile environment) by treating these as shared libraries, similar to a standard Linux environment. While this may be more involved than what you are looking for, you can review my implementation here:

This script also provides an overview of the process:

Best,
Han

On Mon, Feb 23, 2026 at 11:34 AM David Bracey via Tech-talk <tech-talk at aps.anl.gov> wrote:
Adding the list back - didnt reply to all

From: David Bracey <dbracey at fnal.gov>
Sent: Monday, February 23, 2026 1:33 PM
To: Han Lee <jeonglee at lbl.gov>
Subject: Re: Build an external library from source and statically link it into a support module
 
I am not trying to just incorporate 3rd-party libraries, I am trying to BUILD 3rd-party libraries from source, using that project's Makefile.

I do not see anything along those lines in the projects you cite below.

From: Han Lee <jeonglee at lbl.gov>
Sent: Monday, February 23, 2026 1:08 PM
To: David Bracey <dbracey at fnal.gov>
Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: Build an external library from source and statically link it into a support module
 

[EXTERNAL] – This message is from an external sender

Hi David,

The EPICS community has several examples of how to incorporate 3rd-party libraries into support modules. Two particularly good examples to reference for this implementation are:

- opcua
- measComp

While there is usually a way to achieve this, the specific implementation can vary. I hope these examples provide a helpful starting point for your project.

Best,
Han

On Mon, Feb 23, 2026 at 10:58 AM David Bracey via Tech-talk <tech-talk at aps.anl.gov> wrote:
This is mostly to get the cross-arch compilation and have the right binaries end up in the right build subdirs.

I could construct an EPICS build system Makefile for the project (it's not complex) but I'd prefer not to.

From: David Bracey
Sent: Monday, February 23, 2026 12:48 PM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Build an external library from source and statically link it into a support module
 
I'm creating a support module, and I would like to incorporate a 3rd-party library, which would be built from source (a github project) and linked into the support module.

Is there support in the build system for this?  

I want the EPICS build system to call the external project's Makefile, and then consume the library that was produced.

Dave Bracey - Fermilab



--
Jeong Han Lee, Dr.rer.nat.
Staff Scientist and Engineer
Lawrence Berkeley National Laboratory


--
Jeong Han Lee, Dr.rer.nat.
Staff Scientist and Engineer
Lawrence Berkeley National Laboratory

Replies:
Re: Fw: Build an external library from source and statically link it into a support module David Bracey via Tech-talk
References:
Build an external library from source and statically link it into a support module David Bracey via Tech-talk
Re: Build an external library from source and statically link it into a support module David Bracey via Tech-talk
Re: Build an external library from source and statically link it into a support module Han Lee via Tech-talk
Fw: Build an external library from source and statically link it into a support module David Bracey via Tech-talk
Re: Fw: Build an external library from source and statically link it into a support module Han Lee via Tech-talk

Navigate by Date:
Prev: Re: Fw: Build an external library from source and statically link it into a support module Han Lee via Tech-talk
Next: Re: Fw: Build an external library from source and statically link it into a support module David Bracey 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  2022  2023  2024  2025  <2026
Navigate by Thread:
Prev: Re: Fw: Build an external library from source and statically link it into a support module Han Lee via Tech-talk
Next: Re: Fw: Build an external library from source and statically link it into a support module David Bracey 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  2022  2023  2024  2025  <2026
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·