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  <20182019  2020  2021  2022  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: lib/pkgconfig/epics-base-linux-x86_64.pc: are -lca -ldbCore -lCom ... missing from Libs ?
From: Michael Davidsaver via Tech-talk <[email protected]>
To: "Giacomo S." <[email protected]>, "[email protected]" <[email protected]>
Date: Thu, 29 Nov 2018 07:58:49 -0800
On 11/29/18 1:44 AM, Giacomo S. via Tech-talk wrote:
> Hello everyone.
> 
> In epics 3.16 I see a couple of .pc files are generated and installed:
> 
> ./lib/pkgconfig/epics-base-linux-x86_64.pc
> ./lib/pkgconfig/epics-base.pc
> 
> Nonetheless, when using pkgconfig to build/link against Epics, needed  -lca -ldbCore -lCom  are missing from the command line.
> 
> Looking at the "Libs:" line at the bottom of epics-base-linux-x86_64.pc, I see they are actually missing. I added them manually and the build works.
> 
> Am I missing something or is it a bug?

This is an intentional omission as the Base libraries are used in different combinations.
The names 'ca' and 'Com' are meant to be included explicitly in user builds.
The others are listed in the EPICS_BASE_IOC_LIBS variable.

> $ pkg-config --variable=EPICS_BASE_IOC_LIBS epics-base-linux-x86_64
> dbRecStd dbCore ca Com


The basic recipe in a user makefile being something like:

EPICS_HOST_ARCH ?= $(shell pkg-config --variable=ARCH epics-base)
CFLAGS += $(shell pkg-config epics-base-$(EPICS_HOST_ARCH) --cflags)
LDFLAGS += $(shell pkg-config epics-base-$(EPICS_HOST_ARCH) --libs)
EPICS_BASE_IOC_LIBS = $(shell pkg-config epics-base-$(EPICS_HOST_ARCH) --variable=EPICS_BASE_IOC_LIBS)

%.o: %.c
	$(CC) -o $@ -c $< $(CFLAGS)

myexe: some.o
	$(CC) -o $@ $* $(LDFLAGS) $(EPICS_BASE_IOC_LIBS:%=-l%) $(LDADD)


As an aside, thank you for bringing this up.  I've noticed that EPICS_BASE_IOC_LIBS
isn't being populated in the forthcoming 7.0.2 release.

> Thanks.
> 
> Giacomo, Elettra Synchrotron Radiation Facility, Trieste, Italy.
> 
> 
> ======================================
> 
> A portion of the .pc file follows:
> 
> ======================================
> 
> 
> EPICS_BASE_IOC_LIBS=dbRecStd dbCore ca Com
> 
> # Directories
> 
> includedir_osi=${prefix}/include
> includedir_osd=${prefix}/include/os/Linux
> includedir_comp=${prefix}/include/compiler/gcc
> 
> includedirs=${includedir_osi} ${includedir_osd} ${includedir_comp}
> 
> dbddir=${prefix}/dbd
> dbdir=${prefix}/db
> 
> # Tool chain
> 
> CC=/usr/bin/gcc
> CXX=/usr/bin/g++
> CPP=/usr/bin/gcc -x c -E
> AR=/usr/bin/ar -rc
> LD=/usr/bin/ld -r
> 
> Name: epics-base-linux-x86_64
> Version: 3.16.2.0
> Description: EPICS Base for linux-x86_64
> Cflags: -I${includedir_osi} -I${includedir_osd} -I${includedir_comp} -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUSE_TYPED_RSET -D_X86_64_ -DUNIX -Dlinux -mtune=generic -m64
> Libs: -L${libdir} -rdynamic -m64
> Libs.private: -lpthread -lreadline -lm -lrt -ldl -lgcc
> 


Replies:
Re: lib/pkgconfig/epics-base-linux-x86_64.pc: are -lca -ldbCore -lCom ... missing from Libs ? Johnson, Andrew N. via Tech-talk
References:
lib/pkgconfig/epics-base-linux-x86_64.pc: are -lca -ldbCore -lCom ... missing from Libs ? Giacomo S. via Tech-talk

Navigate by Date:
Prev: Re: streamdevice I/O Intr Michael Westfall via Tech-talk
Next: Re: streamdevice I/O Intr William Kirstaedter 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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: lib/pkgconfig/epics-base-linux-x86_64.pc: are -lca -ldbCore -lCom ... missing from Libs ? Giacomo S. via Tech-talk
Next: Re: lib/pkgconfig/epics-base-linux-x86_64.pc: are -lca -ldbCore -lCom ... missing from Libs ? Johnson, Andrew N. 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  <20182019  2020  2021  2022  2023  2024 
ANJ, 29 Nov 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·