EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: STATIC_BUILD=NO howto ?
From: Mark Rivers via Core-talk <core-talk at aps.anl.gov>
To: Torsten Bögershausen <Torsten.Bogershausen at ess.eu>, Ralph Lange <ralph.lange at gmx.de>
Cc: EPICS Core Talk <core-talk at aps.anl.gov>
Date: Tue, 13 Jun 2023 13:02:57 +0000
Hi Torsten and Ralph,
  • Btw. I should have mentioned before: You only need to add the *_DIR line if the library is not in one of the system paths. Libraries in system paths are always found - adding them to *_LIBS is enough.
Actually if the library is in the system path then it needs to be added to SYS_LIBS, not _LIBS.

This is an example of a Makefile that allows the vendor library to either be in a system location or in a user-defined location.  The latter might be used when the developer does not have permission to install the vendor library into a system location, or wants to test a newer version than the one in the system location:


CONFIG_SITE contains these lines:

#################################
# Set this if the Measurement Computing uldaq library is installed on Linux.
# If this is not YES then this module will not be built on Linux.
HAVE_ULDAQ=YES

# If libuldaq on Linux is not installed in a system directory (e.g. /usr/local)
# then uncomment and edit these lines to define the location of the include and lib directories.
#ULDAQ_DIR=/home/epics/local/lib
#ULDAQ_INCLUDE=/home/epics/local/include
#################################

The Makefile contains these lines:

#################################
ifdef ULDAQ_INCLUDE
  USR_INCLUDES_Linux += -I$(ULDAQ_INCLUDE)
endif

ifdef ULDAQ_DIR
  uldaq_DIR = $(ULDAQ_DIR)
endif

ifeq ($(HAVE_ULDAQ), YES)
  LIBRARY_IOC_Linux+= measComp
endif

ifdef ULDAQ_DIR
  measCompApp_LIBS_Linux += uldaq
else
  measCompApp_SYS_LIBS_Linux += uldaq
endif
measCompApp_SYS_LIBS_Linux += usb-1.0
#################################

So if ULDAQ_DIR is defined then it adds uldaq to LIBS. If ULDAQ_DIR is not defined then it adds uldaq to SYS_LIBS.  

It handles Linux and Windows separately because the vendor provides a pre-built library for Windows which I include in the EPICS module, but they provide source code on Linux which needs to be built locally.  That can be installed into a system directory or not depending on developer privileges.

Mark



From: Core-talk <core-talk-bounces at aps.anl.gov> on behalf of Ralph Lange via Core-talk <core-talk at aps.anl.gov>
Sent: Tuesday, June 13, 2023 7:25 AM
To: Torsten Bögershausen <Torsten.Bogershausen at ess.eu>
Cc: EPICS Core Talk <core-talk at aps.anl.gov>
Subject: Re: STATIC_BUILD=NO howto ?
 
Well,

In that Makefile, the PROD is "ethercatmc", not "ethercatmcsupport".

ethercatmc_LIBS += Vendor
Vendor_DIR = /usr/local/lib

should construct the linker line as you expect.

Btw. I should have mentioned before: You only need to add the *_DIR line if the library is not in one of the system paths. Libraries in system paths are always found - adding them to *_LIBS is enough.

Cheers,
~Ralph


Replies:
Re: STATIC_BUILD=NO howto ? Torsten Bögershausen via Core-talk
References:
STATIC_BUILD=NO howto ? Torsten Bögershausen via Core-talk
Re: STATIC_BUILD=NO howto ? Ralph Lange via Core-talk
Re: STATIC_BUILD=NO howto ? Torsten Bögershausen via Core-talk
Re: STATIC_BUILD=NO howto ? Ralph Lange via Core-talk
Re: STATIC_BUILD=NO howto ? Torsten Bögershausen via Core-talk
Re: STATIC_BUILD=NO howto ? Ralph Lange via Core-talk

Navigate by Date:
Prev: Re: STATIC_BUILD=NO howto ? Ralph Lange via Core-talk
Next: Re: STATIC_BUILD=NO howto ? Torsten Bögershausen via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Re: STATIC_BUILD=NO howto ? Ralph Lange via Core-talk
Next: Re: STATIC_BUILD=NO howto ? Torsten Bögershausen via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
ANJ, 13 Jun 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·