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  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: static libraries
From: Andrew Johnson via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Mon, 18 Sep 2023 15:44:57 -0500
The error message is generated by the GNU make program itself, influenced by the. We might be able to modify the build system to change it but I don't think it would be easy to do, there is code in RULES_TARGET that explicitly searches for dependent libraries that might have several possible names in various places. Just understanding this code involves some head-scratching, but it might be possible to change the default case to generating one of our own errors instead.

No promises from me about fixing it in the short term, but if someone else with GNU Makefile experience wanted to look at this I'd be happy to explain how the RULES_TARGET code works.

- Andrew


On 9/18/23 1:55 PM, Siddons, David via Tech-talk wrote:
Thanks very much Mark and Jakub, that fixed it. Indeed the error message is confusing; I spent some time looking for a static configuration!
Pete.


From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Monday, September 18, 2023 2:52 PM
To: Siddons, David <siddons at bnl.gov>
Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: static libraries
 
Hi Pete, 

That fact that it says it is looking for a static library is misleading. It really just means it cannot find the library at all.  You need to change the Makefile to:

ssd1306_i2c_DIR    = /usr/local/lib/

That is telling where to find that specific library.

You could probably also eliminate that line and use:

display_SYS_LIBS   += ssd1306_i2c

assuming /usr/local/lib is in the default system library search path.

Mark

Sent from my iPhone

On Sep 18, 2023, at 2:32 PM, Siddons, David via Tech-talk <tech-talk at aps.anl.gov> wrote:


Hi Tech-talk,
I need to use a library in an EPICS app, set up using MakeBaseApp. It wants to have a static version of the library, which the library package doesn't supply. Why does it need the static library? I'm not trying to build a static program. Here's the Makefile fragment which builds it:

PROD_HOST += display
display_SRCS   += display.c
display_LIBS   += ezca
display_DIR    = /usr/local/lib/
display_LIBS   += ssd1306_i2c
display_LIBS   += $(EPICS_BASE_HOST_LIBS)

and it gives:

make[1]: *** No rule to make target '../../lib/linux-arm/libssd1306_i2c.a', need
ed by 'display'.  Stop.

I'm building it natively on a Zynq Debian 10 system. The shared libraries are in /usr/local/lib:
/usr/local/lib/libssd1306_i2c.la  /usr/local/lib/libssd1306_i2c.so.0
/usr/local/lib/libssd1306_i2c.so  /usr/local/lib/libssd1306_i2c.so.0.0.3

Pete.



-- 
Complexity is free, it's Simplicity that takes work.

References:
Fw: Dante-1-1 Siddons, David via Tech-talk
static libraries Siddons, David via Tech-talk
Re: static libraries Mark Rivers via Tech-talk
Re: static libraries Siddons, David via Tech-talk

Navigate by Date:
Prev: Spawn error when pyepics device puts into nonexistent PV Marco A. Barra Montevechi Filho via Tech-talk
Next: Re: Spawn error when pyepics device puts into nonexistent PV Marco A. Barra Montevechi Filho 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  <20232024 
Navigate by Thread:
Prev: Re: static libraries Siddons, David via Tech-talk
Next: Is there a maximum threshold plugin for areaDetector? Marco A. Barra Montevechi Filho 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  <20232024 
ANJ, 18 Sep 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·